Class Lock

java.lang.Object
me.fami6xx.rpuniverse.core.locks.Lock

public class Lock extends Object
Lock class
  • Constructor Summary

    Constructors
    Constructor
    Description
    Lock​(org.bukkit.Location location, List<String> owners, String jobName, int minWorkingLevel, org.bukkit.Material shownMaterial)
     
    Lock​(org.bukkit.Location location, org.bukkit.Material shownMaterial, String jobName, int minWorkingLevel)
     
    Lock​(org.bukkit.Location location, org.bukkit.Material shownMaterial, Job job, int minWorkingLevel)
     
    Lock​(org.bukkit.Location location, org.bukkit.Material shownMaterial, org.bukkit.entity.Player owner)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addOwner​(UUID uuid)
    Add an owner to the lock
    void
    addOwner​(org.bukkit.entity.Player player)
    Add an owner to the lock
    Get the job name of the lock
    org.bukkit.Location
    Get the location of the lock
    int
    Get the minimum working level of the lock
    Get the owners of the lock
    Get the owners of the lock as a string
    org.bukkit.Material
    Get the material shown in the All Locks menu
    Get the UUID of the lock
    void
    removeOwner​(UUID uuid)
    Remove an owner from the lock
    void
    removeOwner​(org.bukkit.entity.Player player)
    Remove an owner from the lock
    void
    setJobName​(String jobName)
    Set the job name of the lock
    void
    setMinWorkingLevel​(int minWorkingLevel)
    Set the minimum working level of the lock
    void
    setOwners​(List<String> owners)
    Set owners of the lock
    void
    setShownMaterial​(org.bukkit.Material shownMaterial)
    Set the material shown in the All Locks menu

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Lock

      public Lock(org.bukkit.Location location, List<String> owners, String jobName, int minWorkingLevel, org.bukkit.Material shownMaterial)
    • Lock

      public Lock(org.bukkit.Location location, org.bukkit.Material shownMaterial, org.bukkit.entity.Player owner)
    • Lock

      public Lock(org.bukkit.Location location, org.bukkit.Material shownMaterial, Job job, int minWorkingLevel)
    • Lock

      public Lock(org.bukkit.Location location, org.bukkit.Material shownMaterial, String jobName, int minWorkingLevel)
  • Method Details

    • getLocation

      public org.bukkit.Location getLocation()
      Get the location of the lock
      Returns:
      The location of the lock
    • getOwners

      @Nullable public List<String> getOwners()
      Get the owners of the lock
      Returns:
      The list of owners of the lock
    • addOwner

      public void addOwner(org.bukkit.entity.Player player)
      Add an owner to the lock
      Parameters:
      player - The player to add as an owner
    • addOwner

      public void addOwner(UUID uuid)
      Add an owner to the lock
      Parameters:
      uuid - The UUID of the player to add as an owner
    • removeOwner

      public void removeOwner(org.bukkit.entity.Player player)
      Remove an owner from the lock
      Parameters:
      player - The player to remove as an owner
    • removeOwner

      public void removeOwner(UUID uuid)
      Remove an owner from the lock
      Parameters:
      uuid - The UUID of the player to remove as an owner
    • setOwners

      public void setOwners(List<String> owners)
      Set owners of the lock
      Parameters:
      owners - The list of owners to set
    • getJobName

      @Nullable public String getJobName()
      Get the job name of the lock
      Returns:
      The job name of the lock
    • setJobName

      public void setJobName(String jobName)
      Set the job name of the lock
      Parameters:
      jobName - The job name to set
    • getMinWorkingLevel

      public int getMinWorkingLevel()
      Get the minimum working level of the lock
      Returns:
      The minimum working level of the lock
    • setMinWorkingLevel

      public void setMinWorkingLevel(int minWorkingLevel)
      Set the minimum working level of the lock
      Parameters:
      minWorkingLevel - The minimum working level to set
    • getShownMaterial

      public org.bukkit.Material getShownMaterial()
      Get the material shown in the All Locks menu
      Returns:
      The material shown in the All Locks menu
    • setShownMaterial

      public void setShownMaterial(org.bukkit.Material shownMaterial)
      Set the material shown in the All Locks menu
      Parameters:
      shownMaterial - The material shown in the All Locks menu
    • getUUID

      public UUID getUUID()
      Get the UUID of the lock
      Returns:
      The UUID of the lock
    • getOwnersAsString

      public String getOwnersAsString()
      Get the owners of the lock as a string
      Returns:
      The owners of the lock as a string