Class AddPlayerToWorldEvent

java.lang.Object
com.hypixel.hytale.server.core.event.events.player.AddPlayerToWorldEvent
All Implemented Interfaces:
IBaseEvent<String>, IEvent<String>

public class AddPlayerToWorldEvent extends Object implements IEvent<String>
An event that is called upon a player being ready in a world
  • Constructor Details

    • AddPlayerToWorldEvent

      public AddPlayerToWorldEvent(@Nonnull Holder<EntityStore> holder, @Nonnull World world, @Nullable Message joinMessage)
      Default Constructor for a AddPlayerToWorldEvent instance
      Parameters:
      holder - The Holder of the player entity
      world - The World instance that the player is now ready in
  • Method Details

    • getHolder

      @Nonnull public Holder<EntityStore> getHolder()
      Returns:
      the Holder of the player entity
    • getWorld

      @Nonnull public World getWorld()
      Returns:
      the World instance that the player is now ready in
    • shouldBroadcastJoinMessage

      public boolean shouldBroadcastJoinMessage()
      Returns:
      true if the player joining should be broadcasted, false otherwise
    • setBroadcastJoinMessage

      public void setBroadcastJoinMessage(boolean broadcastJoinMessage)
      Called to set whether the player joining should be broadcasted
      Parameters:
      broadcastJoinMessage - true if it should, false otherwise
    • getJoinMessage

      @Nullable public Message getJoinMessage()
    • setJoinMessage

      public void setJoinMessage(@Nullable Message joinMessage)
      Sets the message to be broadcasted when a player joins the world. If set to null, no message will be broadcasted.
      Parameters:
      joinMessage - the Message to broadcast when a player joins the world, or null if no message should be broadcasted
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object