Cancellablepublic class WorldGameRuleChangeEvent extends WorldEvent implements Cancellable
Event.Result| Constructor | Description |
|---|---|
WorldGameRuleChangeEvent(World world,
CommandSender commandSender,
GameRule<?> gameRule,
String value) |
| Modifier and Type | Method | Description |
|---|---|---|
CommandSender |
getCommandSender() |
Gets the command sender associated with this event.
|
GameRule<?> |
getGameRule() |
Gets the game rule associated with this event.
|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
String |
getValue() |
Gets the new value of the gamerule.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
void |
setValue(String value) |
Sets the new value of this gamerule.
|
callEvent, getEventName, isAsynchronousclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWorld@Nullable public CommandSender getCommandSender()
null if the gamerule was changed via api, otherwise the CommandSender.@NotNull public GameRule<?> getGameRule()
@NotNull public String getValue()
public void setValue(@NotNull String value)
value - the new value of the gamerule.public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this event@NotNull public HandlerList getHandlers()
getHandlers in class Event@NotNull public static HandlerList getHandlerList()
Copyright © 2021. All rights reserved.