Class GemDropEvent

java.lang.Object
org.bukkit.event.Event
me.qscbm.inlayx.api.event.GemDropEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public final class GemDropEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
在插件为怪物选定掉落宝石之后, 把宝石加进掉落物之前触发.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    GemDropEvent(@NonNull org.bukkit.entity.LivingEntity entity, @NonNull org.bukkit.entity.Player killer, @NonNull DropSource source, @Nullable Gem gem, @NonNull org.bukkit.configuration.ConfigurationSection settings)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull org.bukkit.entity.LivingEntity
    触发掉落的怪物.
    @Nullable Gem
    插件选中的宝石, 监听器可以替换或清空它.
    static @NonNull org.bukkit.event.HandlerList
     
    @NonNull org.bukkit.event.HandlerList
     
    @NonNull org.bukkit.entity.Player
    杀死怪物的玩家.
    @NonNull org.bukkit.configuration.ConfigurationSection
    本次掉落实际使用的合并配置.
    @NonNull DropSource
    本次掉落的注册式来源.
    @NonNull String
    掉落来源 ID.
    boolean
     
    void
    setCancelled(boolean cancelled)
     
    void
    setGem(@Nullable Gem gem)
     

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GemDropEvent

      public GemDropEvent(@NonNull @NonNull org.bukkit.entity.LivingEntity entity, @NonNull @NonNull org.bukkit.entity.Player killer, @NonNull @NonNull DropSource source, @Nullable Gem gem, @NonNull @NonNull org.bukkit.configuration.ConfigurationSection settings)
  • Method Details

    • getEntity

      @NonNull public @NonNull org.bukkit.entity.LivingEntity getEntity()
      触发掉落的怪物.
    • getKiller

      @NonNull public @NonNull org.bukkit.entity.Player getKiller()
      杀死怪物的玩家.
    • getSource

      @NonNull public @NonNull DropSource getSource()
      本次掉落的注册式来源.
    • getSourceId

      @NonNull public @NonNull String getSourceId()
      掉落来源 ID.
    • getSettings

      @NonNull public @NonNull org.bukkit.configuration.ConfigurationSection getSettings()
      本次掉落实际使用的合并配置.
    • getGem

      public @Nullable Gem getGem()
      插件选中的宝石, 监听器可以替换或清空它.
    • setGem

      public void setGem(@Nullable Gem gem)
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NonNull public @NonNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      @NonNull public static @NonNull org.bukkit.event.HandlerList getHandlerList()