本文整理汇总了Java中org.bukkit.block.Biome.values方法的典型用法代码示例。如果您正苦于以下问题:Java Biome.values方法的具体用法?Java Biome.values怎么用?Java Biome.values使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bukkit.block.Biome
的用法示例。
在下文中一共展示了Biome.values方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerResource
import org.bukkit.block.Biome; //导入方法依赖的package包/类
public static void registerResource(OreGenResource resource)
{
map.put(resource.getName(), resource);
System.out.println((new StringBuilder("[Slimefun - GEO] 正在注册矿物生成器: ")).append(resource.getName()).toString());
Config cfg = new Config((new StringBuilder("plugins/Slimefun/generators/")).append(resource.getName()).append(".cfg").toString());
Biome abiome[];
int j = (abiome = Biome.values()).length;
for(int i = 0; i < j; i++)
{
Biome biome = abiome[i];
cfg.setDefaultValue(biome.toString(), Integer.valueOf(resource.getDefaultSupply(biome)));
}
cfg.save();
}
示例2: getBiome
import org.bukkit.block.Biome; //导入方法依赖的package包/类
@Override
public Biome getBiome( int i, int i1 ) {
int biome = this.getRawBiome( i, i1 );
if( biome == 127 ) {
return Biome.VOID;
}
return Biome.values()[ biome ];
}
示例3: checkBiome
import org.bukkit.block.Biome; //导入方法依赖的package包/类
private boolean checkBiome(String biomename) {
for (Biome biome : Biome.values()) {
if (biome.name().equals(biomename)) {
return true;
}
}
return false;
}
示例4: runCmd
import org.bukkit.block.Biome; //导入方法依赖的package包/类
@Override
public boolean runCmd(final Command cmd, final CommandSender sender, String[] args) {
if (!(sender instanceof Player)) {
/* This is not possible from the server console */
sender.sendMessage(plugin.getYamlManager().getLanguage().noConsoleMode);
return true;
}
/* Build and get all variables */
Player player = (Player) sender;
/* Permission Check */
if (!player.hasPermission(this.permNode)) {
sender.sendMessage(plugin.getYamlManager().getLanguage().errorNoPermission);
return true;
}
Biome[] biomes = Biome.values();
List<String> biomeList = new ArrayList<>();
for (Biome biome : biomes) {
biomeList.add(biome.name());
}
sender.sendMessage(plugin.getYamlManager().getLanguage().landBiomeListHeader);
sender.sendMessage(biomeList.toString().replace("[", " ").replace("]", " "));
return true;
}
示例5: functionSetBiomes
import org.bukkit.block.Biome; //导入方法依赖的package包/类
@Override
public void functionSetBiomes(final String worldname, final int[] x, final int[] z, final int[] biome) {
final World world = getWorld(worldname);
final Biome[] biomes = Biome.values();
for (int i = 0; i < x.length; i++) {
world.setBiome(x[i], z[i], biomes[biome[i]]);
}
}
示例6: getBiomeList
import org.bukkit.block.Biome; //导入方法依赖的package包/类
@Override
public String[] getBiomeList() {
final Biome[] biomes = Biome.values();
final String[] list = new String[biomes.length];
for (int i = 0; i < biomes.length; i++) {
list[i] = biomes[i].name();
}
return list;
}
示例7: WildTab
import org.bukkit.block.Biome; //导入方法依赖的package包/类
public WildTab(){
for(Biome biome : Biome.values())
biomes.add(biome.name());
}
示例8: WildTpTab
import org.bukkit.block.Biome; //导入方法依赖的package包/类
public WildTpTab(){
for(Biome biome : Biome.values())
biomes.add(biome.name());
}
示例9: registerPortalPerms
import org.bukkit.block.Biome; //导入方法依赖的package包/类
private void registerPortalPerms(){
for(Biome biome : Biome.values())
Bukkit.getPluginManager().addPermission(new Permission("wild.wildtp.biome."+biome.name().toLowerCase()));
}
示例10: unRegisterPortalPermissions
import org.bukkit.block.Biome; //导入方法依赖的package包/类
private void unRegisterPortalPermissions(){
for(Biome biome : Biome.values())
Bukkit.getPluginManager().removePermission(new Permission("wild.wildtp.biome."+biome.name().toLowerCase()));
}