Помогите создание плагина работающий в опр мире

  • Автор темы Автор темы Djstil
  • Дата начала Дата начала

Djstil

Активный участник
Пользователь
Баллы
88
Имя в Minecraft
StilGames
Всем привет :D
возникла ситуация как при помощи Bukkit.getWorld сделать так что бы крафт мог применяться только в 1 мире?
почему то через Bukkit.getWorld(name world) не хочет :(
 
Вот
@Override
public void onEnable() {
PluginDescriptionFile pdfFile = this.getDescription();
mainClass.logger.info(pdfFile.getName() + " Has Been Enabled!");
getConfig().options().copyDefaults(true);
saveConfig();

ShapedRecipe fence1 = new ShapedRecipe(new ItemStack(Material.IRON_FENCE, 16)).shape(" ", "***", "***").setIngredient('*', Material.STONE);
ShapedRecipe fence2 = new ShapedRecipe(new ItemStack(Material.IRON_FENCE, 16)).shape("***", "***", " ").setIngredient('*', Material.STONE);
ShapedRecipe sand = new ShapedRecipe(new ItemStack(Material.SAND, 1)).shape(" ", " % ", " ").setIngredient('%', Material.COBBLESTONE);
ShapedRecipe mossy = new ShapedRecipe(new ItemStack(Material.MOSSY_COBBLESTONE, 1)).shape(" ", " * ", " % ").setIngredient('*', Material.VINE).setIngredient('%', Material.COBBLESTONE);
ShapedRecipe vine = new ShapedRecipe(new ItemStack(Material.VINE, 3)).shape(" ", " * ", " ").setIngredient('*', Material.LEAVES);
ShapedRecipe gravell = new ShapedRecipe(new ItemStack(Material.GRAVEL, 2)).shape("$%$", "%*%", "$%$").setIngredient('$', Material.SAND).setIngredient('%', Material.COBBLESTONE).setIngredient('*', Material.POTION);
ShapedRecipe clay = new ShapedRecipe(new ItemStack(Material.CLAY, 1)).shape(" % ", " * ", " ").setIngredient('%', Material.POTION).setIngredient('*', Material.GRAVEL);
ShapedRecipe clay1 = new ShapedRecipe(new ItemStack(Material.CLAY, 8)).shape("%%%", "%*%", "%%%").setIngredient('%', Material.GRAVEL).setIngredient('*', Material.POTION);
ShapedRecipe leather = new ShapedRecipe(new ItemStack(Material.LEATHER, 1)).shape(" ", " * ", " ").setIngredient('*', Material.ROTTEN_FLESH);
ShapedRecipe leather1 = new ShapedRecipe(new ItemStack(Material.LEATHER, 9)).shape("***", "***", "***").setIngredient('*', Material.ROTTEN_FLESH);
ShapedRecipe web = new ShapedRecipe(new ItemStack(Material.WEB, 1)).shape(" * ", " ", " * ").setIngredient('*', Material.STRING);
ShapedRecipe stand = new ShapedRecipe(new ItemStack(Material.BREWING_STAND_ITEM)).shape("*$*", "$*$", "%%%").setIngredient('*', Material.IRON_FENCE).setIngredient('$', Material.GLASS_BOTTLE).setIngredient('%', Material.STONE);
ShapedRecipe cauldron = new ShapedRecipe(new ItemStack(Material.CAULDRON_ITEM)).shape("* *", "* *", "***").setIngredient('*', Material.STONE);
getServer().addRecipe(cauldron);
getServer().addRecipe(stand);
getServer().addRecipe(web);
getServer().addRecipe(leather1);
getServer().addRecipe(leather);
getServer().addRecipe(clay1);
getServer().addRecipe(clay);
getServer().addRecipe(gravell);
getServer().addRecipe(vine);
getServer().addRecipe(fence1);
getServer().addRecipe(fence2);
getServer().addRecipe(sand);
getServer().addRecipe(mossy);
Bukkit.getWorld("SkyBlock");
}

up
никто java не знает??
 
Назад
Верх