Package net.lewmc.essence.utils
Class PermissionHandler
java.lang.Object
net.lewmc.essence.utils.PermissionHandler
Essence's Permission Handler.
-
Constructor Summary
ConstructorDescriptionPermissionHandler
(org.bukkit.command.CommandSender commandSender, MessageUtil message) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
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
Checks if the user has a specific permission.boolean
not()
Informs the user that they do not have a permission.
-
Constructor Details
-
PermissionHandler
Constructor.- Parameters:
commandSender
- CommandSender - The user who executed the command.message
- MessageUtil - A reference to the MessageUtil class.
-
-
Method Details
-
has
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)
-