Class PlayerSkinInitEvent

java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.player.PlayerSkinInitEvent

public class PlayerSkinInitEvent
extends Event
Called at the player connection to initialize his skin.
  • Constructor Summary

    Constructors 
    Constructor Description
    PlayerSkinInitEvent​(Player player, PlayerSkin currentSkin)  
  • Method Summary

    Modifier and Type Method Description
    Player getPlayer()
    Gets the player whose the skin is getting initialized.
    PlayerSkin getSkin()
    Gets the spawning skin of the player.
    void setSkin​(PlayerSkin skin)
    Sets the spawning skin of the player.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getPlayer

      @NotNull public Player getPlayer()
      Gets the player whose the skin is getting initialized.
      Returns:
      the player
    • getSkin

      @Nullable public PlayerSkin getSkin()
      Gets the spawning skin of the player.
      Returns:
      the player skin, or null if not any
    • setSkin

      public void setSkin​(@Nullable PlayerSkin skin)
      Sets the spawning skin of the player.
      Parameters:
      skin - the new player skin