Class PlayerLifecycleEvents

java.lang.Object
net.timtaran.interactivemc.event.player.PlayerLifecycleEvents

public class PlayerLifecycleEvents extends Object
Handles player lifecycle events such as joining, respawning, and leaving the game.

This class listens to player lifecycle events and manages the creation and removal of player bodies in the physics world accordingly.

  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Initializes and registers all player lifecycle event listeners.
    static void
    removePlayer(net.minecraft.world.entity.player.Player player)
    Removes player bodies when a player leaves the game.
    static void
    spawnPlayer(net.minecraft.world.entity.player.Player player)
    Spawns player bodies when a player joins or respawns.

    Methods inherited from class java.lang.Object

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

    • init

      public static void init()
      Initializes and registers all player lifecycle event listeners.
    • spawnPlayer

      public static void spawnPlayer(net.minecraft.world.entity.player.Player player)
      Spawns player bodies when a player joins or respawns.
      Parameters:
      player - the player that joined or respawned
    • removePlayer

      public static void removePlayer(net.minecraft.world.entity.player.Player player)
      Removes player bodies when a player leaves the game.
      Parameters:
      player - the player that left