Class PetPlayerJoinEvent

java.lang.Object
org.bukkit.event.Event
de.Keyle.MyPet.api.event.PetPlayerJoinEvent

public class PetPlayerJoinEvent extends Event
Fired after a MyPetPlayer has finished joining the server — i.e., after the vanilla PlayerJoinEvent fires AND after MyPet has loaded the player's pet roster from the repository, applied any pet-related tracking (lastSeen timestamp, default-pet activation, etc.), and registered them in the active player map.

Fires from PlayerListener on the join handler.

Not cancellable: the player has already finished joining when this event fires; this is a notification hook.

Related events: for pet-level activation triggered by the join, listen to PetActivatedEvent — it fires earlier in the join flow for each pet that activates.

  • Constructor Details

    • PetPlayerJoinEvent

      public PetPlayerJoinEvent(MyPetPlayer myPetPlayer)
      Creates the event for a player whose MyPet-side join handling is complete.
      Parameters:
      myPetPlayer - the player that joined
  • Method Details

    • getHandlerList

      public static HandlerList getHandlerList()
      Returns the handler list for this event type.
      Returns:
      the shared HandlerList every PetPlayerJoinEvent is dispatched through
    • getPlayer

      public MyPetPlayer getPlayer()
      Returns the player that joined. Unlike the pet-carrying events, this returns the MyPetPlayer itself rather than the Bukkit player.
      Returns:
      the joining player, with their pet roster already loaded
    • getHandlers

      public @NonNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event