PlayerEvent
PlayerEvent is the abstract base for KOTL events associated with one Bukkit player. It exposes both the Bukkit player and the plugin-specific user.
Technical Overview
Section titled “Technical Overview”- Package:
dev.despical.kotl.api.events.player - Parent Class:
KOTLEvent
Methods
Section titled “Methods”| Method | Return Type | Description |
|---|---|---|
getPlayer() | Player | Bukkit player associated with the event. |
getUser() | User | KOTL user containing statistics and current arena access. |
Known Subclasses
Section titled “Known Subclasses”Example
Section titled “Example”import dev.despical.kotl.api.events.player.PlayerEnterArenaEvent;import dev.despical.kotl.user.User;import org.bukkit.event.EventHandler;
@EventHandlerpublic void onArenaEntry(PlayerEnterArenaEvent event) { User user = event.getUser(); String arenaId = event.getArena().getId();
user.sendRawMessage("Entering " + arenaId);}