Class Permissible

java.lang.Object
io.github.simplexdevelopment.cl.Permissible
Direct Known Subclasses:
CommandBase

public abstract class Permissible extends Object
  • Constructor Details

    • Permissible

      public Permissible(String permission, String permissionMessage, boolean allowConsole)
      Parameters:
      permission - The permission the user should have to run the command
      permissionMessage - The message to send when the user does not have the permission to run the command.
      allowConsole - Whether to allow the command to be run anywhere, or only in game.
  • Method Details

    • getPermission

      public String getPermission()
      Gets the permission for the command it represents.
      Returns:
      The permission required to run the command.
    • getPermissionMessage

      public String getPermissionMessage()
      Gets the message to display when a user doesn't have permission to run the command.
      Returns:
      The message to send the user when they do not have the required permission.
    • hasPermission

      public boolean hasPermission(org.bukkit.command.CommandSender sender)
      Checks if the source of the command has the permission required to run it.
      Parameters:
      sender - The command source
      Returns:
      Whether the sender has the permission or not.
    • allowConsole

      public boolean allowConsole()
      Returns:
      Whether to allow the command to be run from anywhere, or only players.