PlayerRecipeDiscoverEvent
PlayerRecipeDiscoverEvent
=> org.bukkit.event.Event
=> org.bukkit.event.player.PlayerEvent
=> org.bukkit.event.player.PlayerRecipeDiscoverEvent
Called when a player discovers a new recipe in the recipe book.当玩家在配方书中解锁新配方时触发。译注:配方书即显示在工作台、熔炉等界面上的绿色封面书本。有关配方与配方书的信息可参见Minecraft Wiki
的相关页面 https://minecraft.fandom.com/wiki/Recipe 。除非doLimitedCrafting
这一GameRule
为true
,玩家可以任意使用未解锁的配方来合成、烧炼物品。
方法声明: public NamespacedKey getRecipe()
方法签名: ()Lorg/bukkit/NamespacedKey;
Get the namespaced key of the discovered recipe.@return the discovered recipe该方法用于获取被解锁配方的NamespacedKey
对象。@return 被解锁配方的NamespacedKey
对象。译注:NamespacedKey
对象提供了配方的命名空间信息(原版配方以minecraft:
起首,插件配方以插件名起首)和配方的内部名。
方法声明: public boolean isCancelled()
方法签名: ()Z
方法声明: public void setCancelled(boolean cancel)
方法签名: (Z)V
方法声明: public HandlerList getHandlers()
方法签名: ()Lorg/bukkit/event/HandlerList;
方法声明: public static HandlerList getHandlerList()
方法签名: ()Lorg/bukkit/event/HandlerList;
Last modified 1mo ago