Class PlayerUseSpecialItemCommandEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
me.metallicgoat.specialItems.api.event.PlayerUseSpecialItemCommandEvent
- All Implemented Interfaces:
ArenaEvent
Gets called when a player is about to use the
ExtraSpecialItemType.COMMAND special item.
It is not possible to cancel this event. Listen to PlayerUseSpecialItemEvent instead.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerUseSpecialItemCommandEvent(PlayerUseSpecialItemEvent origin, String command, boolean asConsole) -
Method Summary
Modifier and TypeMethodDescriptiongetArena()Gets the unformatted command to be executed.static HandlerListbooleanGets whether the command will be executed as console.voidsetAsConsole(boolean asConsole) Sets whether the command will be executed as console.voidsetCommand(String command) Sets the unformatted command to be executed.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerUseSpecialItemCommandEvent
public PlayerUseSpecialItemCommandEvent(PlayerUseSpecialItemEvent origin, String command, boolean asConsole)
-
-
Method Details
-
getArena
- Specified by:
getArenain interfaceArenaEvent
-
getCommand
Gets the unformatted command to be executed.- Returns:
- The unformatted command
-
setCommand
Sets the unformatted command to be executed.- Parameters:
command- The new unformatted command
-
isAsConsole
public boolean isAsConsole()Gets whether the command will be executed as console.- Returns:
trueif executed as console,falseif executed as player
-
setAsConsole
public void setAsConsole(boolean asConsole) Sets whether the command will be executed as console.- Parameters:
asConsole-trueto execute as console,falseto execute as player
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-