本文整理了Java中org.bukkit.Bukkit.addRecipe()
方法的一些代码示例,展示了Bukkit.addRecipe()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bukkit.addRecipe()
方法的具体详情如下:
包路径:org.bukkit.Bukkit
类名称:Bukkit
方法名:addRecipe
暂无
代码示例来源:origin: gvlfm78/BukkitOldCombatMechanics
private void registerCrafting(){
if(isEnabled() && module().getBoolean("enchanted-golden-apple-crafting")){
if(Bukkit.getRecipesFor(napple).size() > 0) return;
Bukkit.addRecipe(r);
Messenger.debug("Added napple recipe");
}
}
代码示例来源:origin: dzikoysk/WildSkript
public void register() {
if (this.result == null || this.ingredients == null) {
return;
}
while (this.register) {
this.unregister();
}
ShapedRecipe recipe = new ShapedRecipe(this.result);
recipe.shape("123", "456", "789");
this.patcher();
for (Integer i = 1; i < 10; i++) {
if (this.ingredients[i - 1] != null && !(this.ingredients[i - 1].getType() == Material.AIR)) {
recipe.setIngredient((i.toString()).charAt(0), this.ingredients[i - 1].getType());
}
}
this.recipe = recipe;
Bukkit.addRecipe(recipe);
this.register = true;
}
代码示例来源:origin: NyaaCat/RPGItems-reloaded
Bukkit.addRecipe(shapedRecipe);
} catch (IllegalStateException exception) {
plugin.getLogger().log(Level.INFO, "Error adding recipe. It's ok when reloading plugin", exception);
内容来源于网络,如有侵权,请联系作者删除!