Reference
API
LobbyEnterEvent and LobbyLeaveEvent, the AreaCause values, and how to depend on the plugin.
ExyliaLobby has no published API artifact. Its two events are in the plugin jar, in the package
net.exylia.exyliaLobby.area. Compile against the jar from the
GitHub releases as compileOnly, and list
ExyliaLobby under softdepend in your plugin.yml.
Events
Both are fired on the player's own thread, once per crossing, and after the modules have already handled the change. They are asynchronous events when fired off the primary thread, as on Folia.
| Event | When | Methods |
|---|---|---|
LobbyEnterEvent | A player is now inside a lobby area. | getPlayer(), getCause() |
LobbyLeaveEvent | A player is no longer inside one. | getPlayer(), getCause() |
AreaCause
| Value | Meaning |
|---|---|
JOIN | Joined the server inside a lobby area. |
MOVE | Walked, teleported, respawned or changed world across the edge. |
QUIT | Quit the server while inside. |
CHANGE | The areas changed under them: an admin edited them, or a reload. |
MODULE | A module was switched on while they were inside, so it catches up. Sent only to that module. |
DISABLE | The plugin is stopping. |
Example
@EventHandler
void onEnter(LobbyEnterEvent event) {
if (event.getCause() == AreaCause.JOIN) {
event.getPlayer().sendMessage("Welcome to the lobby!");
}
}Something missing on this page? Tell us on Discord