RemovedPlayerFromWorldEvent
Package: com.hypixel.hytale.server.core.event.events.player
public class RemovedPlayerFromWorldEvent implements IEvent<String>Fired after a player entity has been removed from a world. Provides access to the entity holder, the world it was removed from, and the leave message. Listeners can suppress the broadcast leave message or replace it.
Constructors
Section titled “Constructors”public RemovedPlayerFromWorldEvent(@Nonnull Holder<EntityStore> holder, @Nonnull World world, @Nullable Message leaveMessage)Methods
Section titled “Methods”@Nonnullpublic Holder<EntityStore> getHolder()Returns the entity holder for the removed player.
@Nonnullpublic World getWorld()Returns the world the player was removed from.
public boolean shouldBroadcastLeaveMessage()Returns whether the leave message should be broadcast to other players.
public void setBroadcastLeaveMessage(boolean broadcastLeaveMessage)Sets whether to broadcast the leave message.
@Nullablepublic Message getLeaveMessage()Returns the leave message, or null if none.
public void setLeaveMessage(@Nullable Message leaveMessage)Replaces the leave message.
Related Types
Section titled “Related Types”AddPlayerToWorldEvent— the counterpart event for player additionWorld— the world the player was removed fromEntityStore— store type parameter
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.