Class PlayerJoinEvent
java.lang.Object
fr.hytale.loader.event.types.player.PlayerJoinEvent
- All Implemented Interfaces:
com.hypixel.hytale.event.IBaseEvent<Void>, com.hypixel.hytale.event.IEvent<Void>
Called when a player joins the server.
This event is fired after the player has successfully connected to the server and their data has been loaded. It provides access to the player entity and allows customization of the join message.
- Since:
- 1.0.0
- Version:
- 1.0.4
- Author:
- HytaleLoader
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerJoinEvent(Player player, com.hypixel.hytale.server.core.event.events.player.AddPlayerToWorldEvent originalEvent) Constructs a new PlayerJoinEvent. -
Method Summary
Modifier and TypeMethodDescriptioncom.hypixel.hytale.server.core.event.events.player.AddPlayerToWorldEventGets the original Hytale event.Gets the player who joined.Gets the player's username.com.hypixel.hytale.server.core.universe.PlayerRefGets the player reference.voidsetJoinMessage(boolean broadcast) Sets whether the join message should be broadcast to all players.
-
Constructor Details
-
PlayerJoinEvent
public PlayerJoinEvent(Player player, com.hypixel.hytale.server.core.event.events.player.AddPlayerToWorldEvent originalEvent) Constructs a new PlayerJoinEvent.- Parameters:
player- the HytaleLoader player wrapperoriginalEvent- the original Hytale event
-
-
Method Details
-
getPlayer
-
getPlayerRef
public com.hypixel.hytale.server.core.universe.PlayerRef getPlayerRef()Gets the player reference.- Returns:
- the player reference
-
getPlayerName
-
getOriginalEvent
public com.hypixel.hytale.server.core.event.events.player.AddPlayerToWorldEvent getOriginalEvent()Gets the original Hytale event.- Returns:
- the wrapped AddPlayerToWorldEvent
-
setJoinMessage
public void setJoinMessage(boolean broadcast) Sets whether the join message should be broadcast to all players.- Parameters:
broadcast-trueto broadcast the join message,falseto hide it
-