本文整理匯總了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()));
}