java.lang.Object
com.minecolonies.api.colony.permissions.Rank

public class Rank extends Object
  • Constructor Details

    • Rank

      public Rank(int id, long permissionData, String name, boolean isInitial, boolean isColonyManager, boolean isHostile)
      Rank constructor
      Parameters:
      id - the id of the rank
      name - the name of the rank
      isInitial - whether the rank is an initial rank
    • Rank

      public Rank(int id, String name, boolean isInitial)
  • Method Details

    • getId

      public int getId()
      Get the id of the rank
      Returns:
      the id
    • getName

      public String getName()
      Get the name of the rank
      Returns:
      the name
    • isInitial

      public boolean isInitial()
      Get whether this ranks is an initial rank which cannot be deleted
      Returns:
      true if so
    • isColonyManager

      public boolean isColonyManager()
      Get whether this rank is a colony manager
      Returns:
      true if so
    • isHostile

      public boolean isHostile()
      Get whether this rank is hostile
      Returns:
      true if so
    • setColonyManager

      public void setColonyManager(boolean isColonyManager)
      Set whether this rank is a colony manager
      Parameters:
      isColonyManager - whether the rank is a colony manager
    • setHostile

      public void setHostile(boolean isHostile)
      Set whether this rank is hostile
      Parameters:
      isHostile - whether the rank is hostile
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(Rank rank)
    • addPermission

      public boolean addPermission(Action action)
      Adds the given action permission if it is not set yet
      Parameters:
      action -
      Returns:
    • removePermission

      public boolean removePermission(Action action)
      Adds the given action permission if it is not set yet
      Parameters:
      action -
      Returns:
    • getPermissions

      public long getPermissions()