Class PermissionHandler

java.lang.Object
net.lewmc.essence.utils.PermissionHandler

public class PermissionHandler extends Object
Essence's Permission Handler.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PermissionHandler(org.bukkit.command.CommandSender commandSender, MessageUtil message)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getHomesLimit(org.bukkit.entity.Player player)
    Gets the maximum number of homes a player can set from the permission system.
    int
    getTeamHomesLimit(org.bukkit.entity.Player player)
    Gets the maximum number of team homes a player can set from the permission system.
    int
    getWarpsLimit(org.bukkit.entity.Player player)
    Gets the maximum number of warps a player can set from the permission system.
    boolean
    has(String node)
    Checks if the user has a specific permission.
    boolean
    not()
    Informs the user that they do not have a permission.

    Methods inherited from class java.lang.Object

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

    • PermissionHandler

      public PermissionHandler(org.bukkit.command.CommandSender commandSender, MessageUtil message)
      Constructor.
      Parameters:
      commandSender - CommandSender - The user who executed the command.
      message - MessageUtil - A reference to the MessageUtil class.
  • Method Details

    • has

      public boolean has(String node)
      Checks if the user has a specific permission.
      Parameters:
      node - String - the permission node to check.
      Returns:
      boolean - If the user has a permission (true/false)
    • not

      public boolean not()
      Informs the user that they do not have a permission.
    • getHomesLimit

      public int getHomesLimit(org.bukkit.entity.Player player)
      Gets the maximum number of homes a player can set from the permission system.
      Parameters:
      player - Player - The player to check.
      Returns:
      int - The number of homes (-1 is unlimited)
    • getTeamHomesLimit

      public int getTeamHomesLimit(org.bukkit.entity.Player player)
      Gets the maximum number of team homes a player can set from the permission system.
      Parameters:
      player - Player - The player to check.
      Returns:
      int - The number of team homes (-1 is unlimited)
    • getWarpsLimit

      public int getWarpsLimit(org.bukkit.entity.Player player)
      Gets the maximum number of warps a player can set from the permission system.
      Parameters:
      player - Player - The player to check.
      Returns:
      int - The number of warps (-1 is unlimited)