Interface AntiCheatHook

All Known Implementing Classes:
AntiCheatHookAAC, AntiCheatHookAntiAura, AntiCheatHookNCP, AntiCheatHookSpartan

public interface AntiCheatHook
Represents a hook for an anticheat plugin. Implementations of this hook should exempt and unexempt players in the respective methods
  • Method Summary

    Modifier and Type Method Description
    void exempt​(@NotNull org.bukkit.entity.Player player)
    Exempt a player from a fast-break check in the hooked anticheat
    @NotNull String getPluginName()
    Get the name of the plugin representing this hook
    default boolean isSupported()
    Check whether this anticheat hook is supported or not.
    default boolean shouldUnexempt​(@NotNull org.bukkit.entity.Player player)
    Check whether the provided player should be unexempted.
    void unexempt​(@NotNull org.bukkit.entity.Player player)
    Unexempt a player from a fast-break check in the hooked anticheat
  • Method Details

    • getPluginName

      @NotNull @NotNull String getPluginName()
      Get the name of the plugin representing this hook
      Returns:
      this plugin hook
    • exempt

      void exempt​(@NotNull @NotNull org.bukkit.entity.Player player)
      Exempt a player from a fast-break check in the hooked anticheat
      Parameters:
      player - the player to exempt
    • unexempt

      void unexempt​(@NotNull @NotNull org.bukkit.entity.Player player)
      Unexempt a player from a fast-break check in the hooked anticheat
      Parameters:
      player - the player to unexempt
    • shouldUnexempt

      default boolean shouldUnexempt​(@NotNull @NotNull org.bukkit.entity.Player player)
      Check whether the provided player should be unexempted. This is a special-case method used to check if players should be unexempted under certain situations. For example, in the case of AntiCheatHookNCP, this method returns false if the player was exempted prior to the execution of exempt(Player) and should not be unexempted
      Parameters:
      player - the player to check
      Returns:
      true if should unexempt, false otherwise
    • isSupported

      default boolean isSupported()
      Check whether this anticheat hook is supported or not. This should return false if, for example in AntiAura, an API method to exempt players was added in a later version of the anticheat plugin
      Returns:
      true if supported, false otherwise