Class PlayerEnteringModEvent
java.lang.Object
com.minecolonies.api.eventbus.events.AbstractModEvent
com.minecolonies.api.eventbus.events.colony.AbstractColonyModEvent
com.minecolonies.api.eventbus.events.colony.permissions.PlayerEnteringModEvent
- All Implemented Interfaces:
IModEvent
Player entering colony mod event.
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerEnteringModEvent(@NotNull IColony colony, net.minecraft.world.entity.player.Player player) Constructs a colony-based event. -
Method Summary
Modifier and TypeMethodDescriptionvoidDisable the anti spectator check, allowing you to add custom logic under which to disable the notifications.voidDisable sending out the notifications.net.minecraft.world.entity.player.PlayerGet the player that is entering the colony.booleanWhether we should show the notification for the player entering.Methods inherited from class com.minecolonies.api.eventbus.events.colony.AbstractColonyModEvent
getColonyMethods inherited from class com.minecolonies.api.eventbus.events.AbstractModEvent
getEventId
-
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.
-