Interface IProtectionModule


public interface IProtectionModule
  • Method Details

    • getPluginName

      @NotNull @NotNull String getPluginName()
      Get the name of the corresponding plugin
      Returns:
      the name of the corresponding plugin
    • isInProtectionRange

      default boolean isInProtectionRange(@NotNull @NotNull org.bukkit.entity.Player player)
      Check if the player is in the protection range
      Parameters:
      player - the player
      Returns:
      true if the player is in the protection range
    • getProtectionRangeInfo

      @Nullable default @Nullable ProtectionRangeInfo getProtectionRangeInfo(@NotNull @NotNull org.bukkit.entity.Player player)
      Get the protection range info of the player's location
      Parameters:
      player - the player
      Returns:
      the protection range info
    • getProtectionRangeInfos

      List<? extends ProtectionRangeInfo> getProtectionRangeInfos(@NotNull @NotNull org.bukkit.OfflinePlayer player)
      Get all protection range info that the player owns
      Parameters:
      player - the player
      Returns:
      the protection range info
    • isInProtectionRange

      boolean isInProtectionRange(@NotNull @NotNull org.bukkit.Location location)
      Check if the location is in the protection range
      Parameters:
      location - the location
      Returns:
      true if the location is in the protection range
    • getProtectionRangeInfo

      @Nullable @Nullable ProtectionRangeInfo getProtectionRangeInfo(@NotNull @NotNull org.bukkit.Location location)
      Get the protection range info of the location
      Parameters:
      location - the location
      Returns:
      the protection range info (if the location is not in the protection range, return null)
    • isSupportGlobalFlags

      boolean isSupportGlobalFlags()
      Whether the module supports global flags
      Returns:
      true if the module supports global flags
    • getGlobalFlag

      IFlagState<?> getGlobalFlag(@NotNull @NotNull String flag, @NotNull @NotNull String world)
      Get the global flag
      Parameters:
      flag - the flag
      world - the world
      Returns:
      the global flag
      Throws:
      UnsupportedOperationException - if the module does not support global flags
    • getGlobalFlag

      IFlagState<?> getGlobalFlag(@NotNull @NotNull CommonFlags flag, @NotNull @NotNull String world)
      Get the global flag
      Parameters:
      flag - the flag
      world - the world
      Returns:
      the global flag
      Throws:
      UnsupportedOperationException - if the module does not support global flags
    • setGlobalFlag

      void setGlobalFlag(@NotNull @NotNull String world, @NotNull @NotNull String flag, Object value)
      Set the global flag
      Parameters:
      flag - the flag
      Throws:
      UnsupportedOperationException - if the module does not support global flags
    • setGlobalFlag

      void setGlobalFlag(@NotNull @NotNull String world, @NotNull @NotNull CommonFlags flag, Object value)
      Set the global flag
      Parameters:
      world - the world
      flag - the flag
      Throws:
      UnsupportedOperationException - if the module does not support global flags