Class BukkitActionController

java.lang.Object
com.github.juliarn.npclib.common.flag.CommonNpcFlaggedObject
com.github.juliarn.npclib.common.CommonNpcActionController
com.github.juliarn.npclib.bukkit.BukkitActionController
All Implemented Interfaces:
com.github.juliarn.npclib.api.flag.NpcFlaggedObject, com.github.juliarn.npclib.api.NpcActionController, org.bukkit.event.Listener

public final class BukkitActionController extends com.github.juliarn.npclib.common.CommonNpcActionController implements org.bukkit.event.Listener
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static final class 
     

    Nested classes/interfaces inherited from interface com.github.juliarn.npclib.api.NpcActionController

    com.github.juliarn.npclib.api.NpcActionController.Builder
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
    private final com.github.juliarn.npclib.api.NpcTracker<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin>
     
    private final int
     

    Fields inherited from class com.github.juliarn.npclib.common.flag.CommonNpcFlaggedObject

    flags

    Fields inherited from interface com.github.juliarn.npclib.api.NpcActionController

    AUTO_SYNC_POSITION_ON_SPAWN, IMITATE_DISTANCE, SPAWN_DISTANCE, TAB_REMOVAL_TICKS
  • Constructor Summary

    Constructors
    Constructor
    Description
    BukkitActionController(@NotNull Map<com.github.juliarn.npclib.api.flag.NpcFlag<?>,Optional<?>> flags, @NotNull org.bukkit.plugin.Plugin plugin, @NotNull com.github.juliarn.npclib.api.event.manager.NpcEventManager eventManager, @NotNull com.github.juliarn.npclib.api.PlatformVersionAccessor versionAccessor, @NotNull com.github.juliarn.npclib.api.NpcTracker<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> tracker)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static com.github.juliarn.npclib.api.NpcActionController.Builder
    actionControllerBuilder(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull com.github.juliarn.npclib.api.event.manager.NpcEventManager eventManager, @NotNull com.github.juliarn.npclib.api.PlatformVersionAccessor versionAccessor, @NotNull com.github.juliarn.npclib.api.NpcTracker<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> npcTracker)
     
    void
    handleLeftClick(@NotNull org.bukkit.event.player.PlayerInteractEvent event)
     
    void
    handleMove(@NotNull org.bukkit.event.player.PlayerMoveEvent event)
     
    void
    handleQuit(@NotNull org.bukkit.event.player.PlayerQuitEvent event)
     
    void
    handleSneak(@NotNull org.bukkit.event.player.PlayerToggleSneakEvent event)
     

    Methods inherited from class com.github.juliarn.npclib.common.flag.CommonNpcFlaggedObject

    flagValue, flagValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.github.juliarn.npclib.api.flag.NpcFlaggedObject

    flagValue, flagValue, flagValueOrDefault
  • Field Details

    • npcTracker

      private final com.github.juliarn.npclib.api.NpcTracker<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> npcTracker
    • spawnDistance

      private final int spawnDistance
    • imitateDistance

      private final int imitateDistance
  • Constructor Details

    • BukkitActionController

      public BukkitActionController(@NotNull @NotNull Map<com.github.juliarn.npclib.api.flag.NpcFlag<?>,Optional<?>> flags, @NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull com.github.juliarn.npclib.api.event.manager.NpcEventManager eventManager, @NotNull @NotNull com.github.juliarn.npclib.api.PlatformVersionAccessor versionAccessor, @NotNull @NotNull com.github.juliarn.npclib.api.NpcTracker<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> tracker)
  • Method Details

    • actionControllerBuilder

      @NotNull static com.github.juliarn.npclib.api.NpcActionController.Builder actionControllerBuilder(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull com.github.juliarn.npclib.api.event.manager.NpcEventManager eventManager, @NotNull @NotNull com.github.juliarn.npclib.api.PlatformVersionAccessor versionAccessor, @NotNull @NotNull com.github.juliarn.npclib.api.NpcTracker<org.bukkit.World,org.bukkit.entity.Player,org.bukkit.inventory.ItemStack,org.bukkit.plugin.Plugin> npcTracker)
    • handleMove

      public void handleMove(@NotNull @NotNull org.bukkit.event.player.PlayerMoveEvent event)
    • handleSneak

      public void handleSneak(@NotNull @NotNull org.bukkit.event.player.PlayerToggleSneakEvent event)
    • handleLeftClick

      public void handleLeftClick(@NotNull @NotNull org.bukkit.event.player.PlayerInteractEvent event)
    • handleQuit

      public void handleQuit(@NotNull @NotNull org.bukkit.event.player.PlayerQuitEvent event)