public class WorldGameRuleChangeEvent extends WorldEvent implements Cancellable
Event.Result| Constructor and Description |
|---|
WorldGameRuleChangeEvent(@NotNull World world,
@Nullable CommandSender commandSender,
@NotNull GameRule<?> gameRule,
@NotNull String value) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable CommandSender |
getCommandSender()
Gets the command sender associated with this event.
|
@NotNull GameRule<?> |
getGameRule()
Gets the game rule associated with this event.
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@NotNull 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(@NotNull String value)
Sets the new value of this gamerule.
|
getWorldcallEvent, getEventName, isAsynchronous@Nullable public @Nullable CommandSender getCommandSender()
null if the gamerule was changed via api, otherwise the CommandSender.@NotNull public @NotNull GameRule<?> getGameRule()
@NotNull public @NotNull String getValue()
public void setValue(@NotNull @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 @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.