Class PlayerLeavingModEvent

All Implemented Interfaces:
IModEvent

public final class PlayerLeavingModEvent extends AbstractColonyModEvent
Player leaving colony mod event.
  • Constructor Details

    • PlayerLeavingModEvent

      public PlayerLeavingModEvent(@NotNull @NotNull IColony colony, net.minecraft.world.entity.player.Player player)
      Constructs a colony-based event.
      Parameters:
      colony - the colony related to the event.
      player - the player that is leaving the colony.
  • Method Details

    • getPlayer

      public net.minecraft.world.entity.player.Player getPlayer()
      Get the player that is leaving the colony.
    • shouldShowNotification

      public boolean shouldShowNotification()
      Whether we should show the notification for the player leaving.
      Returns:
      true if so.
    • disableNotification

      public void disableNotification()
      Disable sending out the notifications.
    • allowForSpectators

      public void allowForSpectators()
      Disable the anti spectator check, allowing you to add custom logic under which to disable the notifications.