Class AbstractInputHandler

java.lang.Object
top.magstar.framework.input.abstraction.AbstractInputHandler
All Implemented Interfaces:
InputHandler

public abstract class AbstractInputHandler extends Object implements InputHandler
输入处理器抽象实现 - 实现了会话管理和call方法
Since:
1.0.0
Version:
1.0.0
Author:
Berry_so
See Also:
  • Field Details

    • timeout

      protected long timeout
      超时时间(毫秒),0表示永不超时
    • cancelOnMove

      protected boolean cancelOnMove
      是否在移动时取消
    • cancelOnDamage

      protected boolean cancelOnDamage
      是否在受伤时取消
  • Constructor Details

    • AbstractInputHandler

      public AbstractInputHandler()
  • Method Details

    • call

      public void call(@NotNull @NotNull org.bukkit.entity.Player player)
      Description copied from interface: InputHandler
      将输入会话应用到指定玩家
      Specified by:
      call in interface InputHandler
      Parameters:
      player - 目标玩家
    • getSession

      public static AbstractInputHandler.InputSession getSession(org.bukkit.entity.Player player)
      获取玩家的活跃会话
      Parameters:
      player - 玩家
      Returns:
      玩家的输入会话,如果不存在则返回null
    • removeSession

      public static void removeSession(org.bukkit.entity.Player player)
      移除玩家的会话
      Parameters:
      player - 玩家
    • hasSession

      public static boolean hasSession(org.bukkit.entity.Player player)
      检查玩家是否有活跃会话
      Parameters:
      player - 玩家
      Returns:
      true表示有活跃会话,false表示没有