com.quartercode.quarterbukkit.api.exception
Class NoCommandPermissionException

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
                  extended by com.quartercode.quarterbukkit.api.exception.NoCommandPermissionException
All Implemented Interfaces:
java.io.Serializable

public class NoCommandPermissionException
extends NoPermissionException

The NoPermissionException represents an exception caused by not enough permissions.

See Also:
Serialized Form

Constructor Summary
NoCommandPermissionException(org.bukkit.plugin.Plugin plugin, java.lang.String permission, org.bukkit.command.CommandSender causer, Command command)
          Creates an NoCommandPermissionException filled with a CommandSender causer, the permission and the tried command.
NoCommandPermissionException(org.bukkit.plugin.Plugin plugin, java.lang.String permission, org.bukkit.command.CommandSender causer, Command command, java.lang.String message)
          Creates an NoCommandPermissionException filled with a CommandSender causer, the permission, the tried command and an informational message.
 
Method Summary
 Command getCommand()
          Returns the tried Command.
 
Methods inherited from class com.quartercode.quarterbukkit.api.exception.NoPermissionException
getCauser, getPermission
 
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

NoCommandPermissionException

public NoCommandPermissionException(org.bukkit.plugin.Plugin plugin,
                                    java.lang.String permission,
                                    org.bukkit.command.CommandSender causer,
                                    Command command)
Creates an NoCommandPermissionException filled with a CommandSender causer, the permission and the tried command.

Parameters:
plugin - The causing Plugin.
permission - The permission which the causer doesn't have.
causer - The CommandSender who has't enough permissions.
command - The Command which the CommandSender tried to execute.

NoCommandPermissionException

public NoCommandPermissionException(org.bukkit.plugin.Plugin plugin,
                                    java.lang.String permission,
                                    org.bukkit.command.CommandSender causer,
                                    Command command,
                                    java.lang.String message)
Creates an NoCommandPermissionException filled with a CommandSender causer, the permission, the tried command 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.
command - The Command which the CommandSender tried to execute.
message - The information message.
Method Detail

getCommand

public Command getCommand()
Returns the tried Command.

Returns:
The Command which the CommandSender tried to execute.