com.cliffblaster.game.api.event
Class PermissionRequestEvent

java.lang.Object
  extended by com.cliffblaster.game.api.event.Event
      extended by com.cliffblaster.game.api.event.ServerEvent
          extended by com.cliffblaster.game.api.event.PermissionRequestEvent

public class PermissionRequestEvent
extends ServerEvent


Nested Class Summary
 
Nested classes/interfaces inherited from class com.cliffblaster.game.api.event.Event
Event.Priority, Event.Type
 
Field Summary
 ServerHandler commander
          The sender of this command
 java.lang.String permission
          The permission asked
 
Fields inherited from class com.cliffblaster.game.api.event.Event
evtType
 
Constructor Summary
PermissionRequestEvent(ServerHandler commander, java.lang.String permission)
           
 
Method Summary
 void cancel()
          Deprecated. Do not use. Throws RuntimeException as such events can not to be cancelled.
 boolean hasPermission()
          Returns the permission status
 void setPermission(boolean perm)
          Sets the permission status and sets the event as handled
 boolean wasHandled()
          Returns whether the event was handled
 
Methods inherited from class com.cliffblaster.game.api.event.Event
getType, isCancelled, unCancel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commander

public final ServerHandler commander
The sender of this command


permission

public final java.lang.String permission
The permission asked

Constructor Detail

PermissionRequestEvent

public PermissionRequestEvent(ServerHandler commander,
                              java.lang.String permission)
Method Detail

hasPermission

public final boolean hasPermission()
Returns the permission status


setPermission

public final void setPermission(boolean perm)
Sets the permission status and sets the event as handled


wasHandled

public final boolean wasHandled()
Returns whether the event was handled


cancel

@Deprecated
public final void cancel()
Deprecated. Do not use. Throws RuntimeException as such events can not to be cancelled.

Description copied from class: Event
Sets the event as cancelled. The event will not continue on the server and will be reverted, unless a subsequent plug-in calls Event.unCancel() on the event.

Overrides:
cancel in class Event