Class GroupSwitchPreEvent
java.lang.Object
com.github.happyuky7.swi.api.event.PlayerEvent
com.github.happyuky7.swi.api.event.GroupSwitchPreEvent
- All Implemented Interfaces:
Cancellable, SwiEvent
Fired right before a player's data is swapped from one context to another.
Cancelling it keeps the player's current data (nothing is saved, cleared or loaded) and the player keeps being tracked in the old context. The world change/teleport itself is not undone.
-
Constructor Summary
ConstructorsConstructorDescriptionGroupSwitchPreEvent(@NotNull Object player, @NotNull UUID uuid, @NotNull String name, @NotNull GroupContext from, @NotNull GroupContext to, @Nullable String regionId) -
Method Summary
Modifier and TypeMethodDescription@NotNull GroupContextfrom()boolean@Nullable StringregionId()voidsetCancelled(boolean cancelled) @NotNull GroupContextto()Methods inherited from class PlayerEvent
platformPlayer, player, playerName, playerUuid
-
Constructor Details
-
GroupSwitchPreEvent
public GroupSwitchPreEvent(@NotNull @NotNull Object player, @NotNull @NotNull UUID uuid, @NotNull @NotNull String name, @NotNull @NotNull GroupContext from, @NotNull @NotNull GroupContext to, @Nullable @Nullable String regionId)
-
-
Method Details
-
from
-
to
-
regionId
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceCancellable
-