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>

public class PlayerJoinEvent extends Object implements 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 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 wrapper
      originalEvent - the original Hytale event
  • Method Details

    • getPlayer

      public Player getPlayer()
      Gets the player who joined.
      Returns:
      the HytaleLoader player wrapper
    • getPlayerRef

      public com.hypixel.hytale.server.core.universe.PlayerRef getPlayerRef()
      Gets the player reference.
      Returns:
      the player reference
    • getPlayerName

      public String getPlayerName()
      Gets the player's username.
      Returns:
      the player's username
    • 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 - true to broadcast the join message, false to hide it