com.quartercode.quarterbukkit.api.exception
Class NoPermissionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.quartercode.quarterbukkit.api.exception.GameException
              extended by com.quartercode.quarterbukkit.api.exception.NoPermissionException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
NoCommandPermissionException

public class NoPermissionException
extends GameException

The NoPermissionException represents an exception caused by not enough permissions.

See Also:
Serialized Form

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.
 
Methods inherited from class com.quartercode.quarterbukkit.api.exception.GameException
getPlugin
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.