Minecraft MoonLake Recipe Plugin By Month_Light
这个插件提供了添加更高级的 合成配方 到服务器
图形化的添加、编辑、查看、方式,以及更好的开发者 API。
- 这是我们未来即将开发的 API 功能
-
- 添加非固定合成配方
-
- 添加熔炉合成配方
-
- 待添加...
/recipe help
- 查看月色之湖高级合成命令帮助./recipe view <N>
- 查看指定名称的月色之湖高级合成./recipe edit <N>
- 编辑指定名称的月色之湖高级合成./recipe remove <N>
- 删除指定名称的月色之湖高级合成./recipe create <T> <N>
- 创建新的指定名称的月色之湖高级合成.
参数 N
为数据文件的名称, 参数 T
为可以创建的高级合成类型
全部命令均需要 moonlake.recipe.option
权限.
注意将您的插件内 plugin.yml
添加 depend: [MoonLakeRecipe]
前置支持
private MoonLakeRecipeManager manager;
/**
* 加载月色之湖前置 Recipe 插件
*
* @return 是否加载成功
*/
private boolean setupMoonLakeRecipe() {
Plugin plugin = this.getServer().getPluginManager().getPlugin("MoonLakeRecipe");
return plugin != null && plugin instanceof Recipelugin && (this.manager = ((RecipePlugin)plugin).getManager()) != null;
}
调用的话就在主类的 onEnable
函数里面
@Override
public void onEnable() {
if(!setupMoonLakeRecipe()) {
// 前置插件 MoonLakeRecipe 加载失败
return;
}
// 前置插件 MoonLakeRecipe 加载成功
}
开发者添加新的合成配方
// 固定合成配方
ItemStack result = new ItemStack(Material.DIAMOND); // 创建结果为钻石1个
AdvancedShapedRecipe shapedRecipe = new AdvancedShapedRecipe(result); // 创建固定合成对象
shapedRecipe.shape("###", "#@#", "###"); // 设置固定合成的形状
shapedRecipe.setIngredient('#', Material.COAL_BLOCK); // 设置形状中字符的配方
shapedRecipe.setIngredient('@', Material.IRON_INGOT); // 同上
shapedRecipe.register(); // 注册此高级合成
MoonLake
核心 API 插件 👉GOMoonLakeGUI
图形化界面插件 👉GOMoonLakeKitPvP
职业战争插件 👉GOMoonLakeSkinme
玩家皮肤披风操作插件 👉GOMoonLakeEconomy
基于MySQL
的经济插件 👉GO
Website: MoonLake
Minecraft MoonLake Core API Plugin
By Month_Light