Interface AntiCheatHook

All Known Implementing Classes:
AntiCheatHookAAC, AntiCheatHookAntiAura, AntiCheatHookGrim, AntiCheatHookLightAntiCheat, AntiCheatHookMatrix, AntiCheatHookNCP, AntiCheatHookSpartan

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

    Modifier and Type
    Method
    Description
    void
    exempt(@NotNull Player player)
    Exempt a player from a fast-break check in the hooked anti cheat.
    default boolean
    Check whether or not this anti cheat hook is supported.
    default boolean
    shouldUnexempt(@NotNull Player player)
    Check whether the provided player should be unexempted.
    void
    unexempt(@NotNull Player player)
    Unexempt a player from a fast-break check in the hooked anti cheat.
  • Method Details

    • exempt

      void exempt(@NotNull @NotNull Player player)
      Exempt a player from a fast-break check in the hooked anti cheat.
      Parameters:
      player - the player to exempt
    • unexempt

      void unexempt(@NotNull @NotNull Player player)
      Unexempt a player from a fast-break check in the hooked anti cheat.
      Parameters:
      player - the player to unexempt
    • shouldUnexempt

      default boolean shouldUnexempt(@NotNull @NotNull 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.

      For anti cheats where temporary exemptions can be made, this method is not relevant and should be left implemented as default.

      Parameters:
      player - the player to check
      Returns:
      true if should unexempt, false otherwise
    • isSupported

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