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 Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.github.juliarn.npclib.api.protocol.enums.ItemSlot[]private final BukkitPlatformNPCManagementprivate final org.bukkit.plugin.Pluginprivate final org.bukkit.scheduler.BukkitScheduler -
Constructor Summary
ConstructorsConstructorDescriptionBukkitFunctionalityListener(@NonNull org.bukkit.plugin.Plugin plugin, @NonNull org.bukkit.scheduler.BukkitScheduler scheduler, @NonNull BukkitPlatformNPCManagement management) -
Method Summary
Modifier and TypeMethodDescriptionprivate @NonNull Collection<com.github.juliarn.npclib.api.protocol.enums.EntityStatus> collectEntityStatus(@NonNull eu.cloudnetservice.modules.npc.NPC npc) voidvoidvoidvoidprivate voidhandleClick(@NonNull org.bukkit.entity.Player player, @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.voidhandleNpcAttack(@NonNull com.github.juliarn.npclib.api.event.AttackNpcEvent event) voidhandleNpcInteract(@NonNull com.github.juliarn.npclib.api.event.InteractNpcEvent event) voidhandleNpcShow(com.github.juliarn.npclib.api.event.ShowNpcEvent.Post event) voidplayOnJoinEmoteIds(@NonNull org.bukkit.event.player.PlayerJoinEvent event)
-
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
-
-
Constructor Details
-
BukkitFunctionalityListener
-
-
Method Details
-
handleNpcShow
-
handleNpcAttack
-
handleNpcInteract
-
handle
-
handle
-
handle
-
handle
-
playOnJoinEmoteIds
-
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.
-