com.quartercode.quarterbukkit.api.exception
Class NoCommandPermissionException

java.lang.Object
  extended by com.quartercode.quarterbukkit.api.exception.GameException
      extended by com.quartercode.quarterbukkit.api.exception.NoPermissionException
          extended by com.quartercode.quarterbukkit.api.exception.NoCommandPermissionException

public class NoCommandPermissionException
extends NoPermissionException

The NoPermissionException represents an exception caused by not enough permissions.


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
getMessage, getPlugin
 
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.