Class BukkitFunctionalityListener

java.lang.Object
eu.cloudnetservice.modules.npc.impl.platform.bukkit.listener.BukkitFunctionalityListener
All Implemented Interfaces:
org.bukkit.event.Listener

@Singleton public final class BukkitFunctionalityListener extends Object implements org.bukkit.event.Listener
  • Field Details

    • ITEM_SLOTS

      private static final com.github.juliarn.npclib.api.protocol.enums.ItemSlot[] ITEM_SLOTS
    • plugin

      private final org.bukkit.plugin.Plugin plugin
    • scheduler

      private final org.bukkit.scheduler.BukkitScheduler scheduler
    • management

      private final BukkitPlatformNPCManagement management
  • Constructor Details

  • Method Details

    • handleNpcShow

      public void handleNpcShow(@NonNull com.github.juliarn.npclib.api.event.ShowNpcEvent.Post event)
    • handleNpcAttack

      public void handleNpcAttack(@NonNull @NonNull com.github.juliarn.npclib.api.event.AttackNpcEvent event)
    • handleNpcInteract

      public void handleNpcInteract(@NonNull @NonNull com.github.juliarn.npclib.api.event.InteractNpcEvent event)
    • handle

      public void handle(@NonNull @NonNull org.bukkit.event.player.PlayerInteractEntityEvent event)
    • handle

      public void handle(@NonNull @NonNull org.bukkit.event.entity.EntityDamageByEntityEvent event)
    • handle

      public void handle(@NonNull @NonNull org.bukkit.event.inventory.InventoryClickEvent event)
    • handle

      public void handle(@NonNull @NonNull org.bukkit.event.player.PlayerJoinEvent event)
    • playOnJoinEmoteIds

      public void playOnJoinEmoteIds(@NonNull @NonNull org.bukkit.event.player.PlayerJoinEvent event)
    • collectEntityStatus

      @NonNull private @NonNull Collection<com.github.juliarn.npclib.api.protocol.enums.EntityStatus> collectEntityStatus(@NonNull @NonNull eu.cloudnetservice.modules.npc.NPC npc)
    • handleClick

      private void handleClick(@NonNull @NonNull org.bukkit.entity.Player player, @Nullable @Nullable org.bukkit.event.Cancellable cancellable, int entityId, boolean left, boolean onlyCancel)
      Handles a click by the given player to the entity with the given id, in case the associated entity is a selector entity. An optional cancellable can be provided that will be marked as canceled in case and selector entity exists for the entity with the given id.
      Parameters:
      player - the player that clicked the entity.
      cancellable - optional cancelable that will be marked as canceled if a selector entity was clicked.
      entityId - the id of the entity that was clicked.
      left - true if the click was performed with the left mouse button, false otherwise.
      onlyCancel - true to only mark the cancelable as canceled and ignore the click action otherwise.
      Throws:
      NullPointerException - if the given player is null.