com.quartercode.quarterbukkit.api.exception
Class NoCommandPermissionException

java.lang.Object
  extended by org.bukkit.event.Event
      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:
org.bukkit.event.Cancellable

public class NoCommandPermissionException
extends NoPermissionException

The NoPermissionException represents an exception caused by not enough permissions.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
 
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, isCancelled, setCancelled
 
Methods inherited from class com.quartercode.quarterbukkit.api.exception.GameException
getHandlerList, getHandlers, getMessage, getPlugin
 
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
 

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.