本文整理了Java中org.bukkit.Server.addRecipe()
方法的一些代码示例,展示了Server.addRecipe()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.addRecipe()
方法的具体详情如下:
包路径:org.bukkit.Server
类名称:Server
方法名:addRecipe
[英]Adds a recipe to the crafting manager.
[中]向工艺经理添加配方。
代码示例来源:origin: Bukkit/Bukkit
/**
* @see Server#addRecipe(Recipe recipe)
*/
public static boolean addRecipe(Recipe recipe) {
return server.addRecipe(recipe);
}
代码示例来源:origin: SpigotMC/Spigot-API
/**
* @see Server#addRecipe(Recipe recipe)
*/
public static boolean addRecipe(Recipe recipe) {
return server.addRecipe(recipe);
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public boolean addRecipe(MCRecipe recipe) {
return s.addRecipe(((BukkitMCRecipe) recipe).r);
}
代码示例来源:origin: eccentricdevotion/TARDIS
public void addShapedRecipes() {
keyDisplay = key_colour_lookup.get(plugin.getConfig().getString("preferences.default_key").toLowerCase(Locale.ENGLISH));
sonicDisplay = sonic_colour_lookup.get(plugin.getConfig().getString("preferences.default_sonic").toLowerCase(Locale.ENGLISH));
Set<String> shaped = plugin.getRecipesConfig().getConfigurationSection("shaped").getKeys(false);
shaped.forEach((s) -> plugin.getServer().addRecipe(makeRecipe(s)));
}
代码示例来源:origin: eccentricdevotion/TARDIS
public void addShapelessRecipes() {
Set<String> shapeless = plugin.getRecipesConfig().getConfigurationSection("shapeless").getKeys(false);
shapeless.forEach((s) -> plugin.getServer().addRecipe(makeRecipe(s)));
}
代码示例来源:origin: elBukkit/MagicPlugin
plugin.getServer().addRecipe(recipe);
} catch (Exception ex) {
plugin.getLogger().log(Level.WARNING, "Failed to add recipe", ex);
代码示例来源:origin: mcMMO-Dev/mcMMO
private void registerCustomRecipes() {
getServer().getScheduler().scheduleSyncDelayedTask(this, () -> {
if (Config.getInstance().getChimaeraEnabled()) {
getServer().addRecipe(ChimaeraWing.getChimaeraWingRecipe());
}
}, 40);
}
内容来源于网络,如有侵权,请联系作者删除!