Your cart is empty
Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shoppingMaven, exactly as documented on API:
<repositories>
<repository>
<id>phoenixplugins</id>
<url>https://repo.phoenixplugins.com/</url>
</repository>
</repositories>
<dependency>
<groupId>com.phoenixplugins.phoenixlobby</groupId>
<artifactId>api</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
The docs only show Maven snippets; no Gradle snippet is documented yet. Dependency details: see API.
The Lobby docs don't describe an add-on loader. They show a regular plugin that declares PhoenixLobby as a dependency and calls PhoenixLobbyAPI.
Add PhoenixLobby to your plugin.yml so your plugin loads after it.
depend: [PhoenixLobby]
Use softdepend instead if your plugin should still work when PhoenixLobby is not installed. In that case check PhoenixLobbyAPI.isAvailable() before calling anything.
PhoenixLobbyAPI answers questions about the lobby without going through placeholders.
if (!PhoenixLobbyAPI.isAvailable()) {
return;
}
PhoenixLobbyAPI api = PhoenixLobbyAPI.get();
| Method | Returns |
|---|---|
getVersion() |
The version of PhoenixLobby that is running |
getNpcTypes() |
Every NPC configured on this server |
getNpcType(String identifier) |
One NPC by its identifier, as an Optional
|
isLobbyWorld(String worldName) |
Whether the plugin treats that world as a lobby |
isInPvpMode(Player player) |
Whether the player is in PvP mode |
getPlayingParkour(Player player) |
The parkour the player is running, as an Optional
|
getParkourHighScore(Player, String) |
That player's best score on a parkour |
PhoenixLobbyAPI.get().getPlayingParkour(player).ifPresent(parkour -> {
player.sendMessage("You are running " + parkour + ".");
});
An NpcType gives you isEnabled(), getIdentifier(), getDisplayName() and getEngineData(), which in turn reports the engine that NPC is drawn with.
PhoenixLobbyAPI.get() throws if the plugin has not finished loading. Call it from inside your own onEnable or later, never from a static initialiser, and guard it with isAvailable() when PhoenixLobby is only a soft dependency.
Source: API.
4 documented events, from Events. All are Bukkit events, listened to with @EventHandler.
| Event | Fires when | Cancellable | Reference |
|---|---|---|---|
PlayerDoubleJumpEvent |
A player uses the double jump | Yes | Docs · Javadoc |
PlayerParkourStartEvent |
A player starts a parkour run | Yes | Docs · Javadoc |
PlayerParkourJumpEvent |
A player lands on the next parkour block | No | Docs · Javadoc |
PlayerParkourEndEvent |
A parkour run ends | No | Docs · Javadoc |
Parkour record listener, verbatim from Events:
public class ParkourListener implements Listener {
@EventHandler
public void onParkourEnd(PlayerParkourEndEvent event) {
if (!event.isNewRecord()) {
return;
}
Bukkit.broadcastMessage(event.getPlayer().getName()
+ " set a new record on " + event.getParkourIdentifier()
+ " with " + event.getScore() + " points.");
}
}
The docs don't show listener registration inside an add-on yet.
For offline reading, scripts and tools, all Phoenix Lobby docs are available as one text file. Any docs page can be read as plain markdown by adding .md to its URL.
Your cart is empty
Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shopping