Class ChangeGameModeEvent

All Implemented Interfaces:
ICancellableEcsEvent

public class ChangeGameModeEvent extends CancellableEcsEvent
An event that is called when a player entity is changing their game-mode.

If cancelled, the players game-mode will not be changed.

  • Constructor Details

    • ChangeGameModeEvent

      public ChangeGameModeEvent(@Nonnull GameMode gameMode)
      Default Constructor for a ChangeGameModeEvent instance.
      Parameters:
      gameMode - The GameMode that the player is changing to.
  • Method Details

    • getGameMode

      @Nonnull public GameMode getGameMode()
      Returns:
      the GameMode that the player is changing to.
    • setGameMode

      public void setGameMode(@Nonnull GameMode gameMode)
      Called to set the new game-mode that the player should be switching to.
      Parameters:
      gameMode - The new GameMode to switch the player to.