Enum Class ClaimType

java.lang.Object
java.lang.Enum<ClaimType>
net.mathias2246.buildmc.api.claims.ClaimType
All Implemented Interfaces:
Serializable, Comparable<ClaimType>, Constable

public enum ClaimType extends Enum<ClaimType>
Represents the type of owner associated with a Claim.

Claims can be owned by different entities such as individual players, teams, or the server itself. This enum is used to differentiate between these ownership types.

  • Enum Constant Details

    • PLAYER

      public static final ClaimType PLAYER
      A claim owned by an individual player.

      The ownerId of the claim should correspond to the player's unique identifier (typically their UUID in string form).

    • TEAM

      public static final ClaimType TEAM
      A claim owned by a team.

      The ownerId of the claim should correspond to a team name. Teams are represented using the vanilla scoreboard team system.

    • SERVER

      public static final ClaimType SERVER
      A claim owned by the server.

      The ownerId is always set to "server". Functionally, this type behaves like a normal claim: it has protections, and users with buildmc.admin permission can modify it. There is no limit to the claim amount. This type is used to designate areas as being under server control.

    • PLACEHOLDER

      public static final ClaimType PLACEHOLDER
      A placeholder claim that does not provide any protections.

      The ownerId is also set to "server". Unlike normal claims, this type does not restrict player actions. Its sole purpose is to reserve an area so that it cannot be claimed by players. This is useful for preventing conflicts in specific regions without modifying their existing properties or gameplay.

  • Method Details

    • values

      public static ClaimType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ClaimType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null