Class PlayerEnteringModEvent

All Implemented Interfaces:
IModEvent

public final class PlayerEnteringModEvent extends AbstractColonyModEvent
Player entering colony mod event.
  • Constructor Details

    • PlayerEnteringModEvent

      public PlayerEnteringModEvent(@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 entering the colony.
  • Method Details

    • getPlayer

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

      public boolean shouldShowNotification()
      Whether we should show the notification for the player entering.
      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.