com.quartercode.quarterbukkit.api.exception
Class NoPermissionException
java.lang.Object
org.bukkit.event.Event
com.quartercode.quarterbukkit.api.exception.GameException
com.quartercode.quarterbukkit.api.exception.NoPermissionException
- All Implemented Interfaces:
- org.bukkit.event.Cancellable
- Direct Known Subclasses:
- NoCommandPermissionException
public class NoPermissionException
- extends GameException
- implements org.bukkit.event.Cancellable
The NoPermissionException represents an exception caused by not enough permissions.
Nested classes/interfaces inherited from class org.bukkit.event.Event |
org.bukkit.event.Event.Result |
Constructor Summary |
NoPermissionException(org.bukkit.plugin.Plugin plugin,
java.lang.String permission,
org.bukkit.command.CommandSender causer)
Creates an NoPermissionException filled with a CommandSender causer and the permission. |
NoPermissionException(org.bukkit.plugin.Plugin plugin,
java.lang.String permission,
org.bukkit.command.CommandSender causer,
java.lang.String message)
Creates an NoPermissionException filled with a CommandSender causer, the permission and an informational message. |
Method Summary |
org.bukkit.command.CommandSender |
getCauser()
Returns the CommandSender causer. |
java.lang.String |
getPermission()
Returns the permission which the causer doesn't have. |
boolean |
isCancelled()
|
void |
setCancelled(boolean cancelled)
|
Methods inherited from class org.bukkit.event.Event |
getEventName, isAsynchronous |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NoPermissionException
public NoPermissionException(org.bukkit.plugin.Plugin plugin,
java.lang.String permission,
org.bukkit.command.CommandSender causer)
- Creates an NoPermissionException filled with a
CommandSender
causer and the permission.
- Parameters:
plugin
- The causing Plugin
.permission
- The permission which the causer doesn't have.causer
- The CommandSender
who has't enough permissions.
NoPermissionException
public NoPermissionException(org.bukkit.plugin.Plugin plugin,
java.lang.String permission,
org.bukkit.command.CommandSender causer,
java.lang.String message)
- Creates an NoPermissionException filled with a
CommandSender
causer, the permission and an informational message.
- Parameters:
plugin
- The causing Plugin
.permission
- The permission which the causer doesn't have.causer
- The CommandSender
who has't enough permissions.message
- The information message.
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface org.bukkit.event.Cancellable
setCancelled
public void setCancelled(boolean cancelled)
- Specified by:
setCancelled
in interface org.bukkit.event.Cancellable
getPermission
public java.lang.String getPermission()
- Returns the permission which the causer doesn't have.
- Returns:
- The permission.
getCauser
public org.bukkit.command.CommandSender getCauser()
- Returns the
CommandSender
causer.
- Returns:
- The causer who hasn't enough permissions.