Added island center related placeholders

#621

* island-center-x
* island-center-y
* island-center-z
This commit is contained in:
Florian CUNY 2019-04-07 09:46:02 +02:00
parent 0bcbdf245a
commit b40f07f763

View File

@ -15,7 +15,22 @@ public enum GameModePlaceholders {
ISLAND_OWNER("island-owner", (addon, user, island) -> addon.getPlayers().getName(island.getOwner())), ISLAND_OWNER("island-owner", (addon, user, island) -> addon.getPlayers().getName(island.getOwner())),
ISLAND_CREATION_DATE("island-creation-date", (addon, user, island) -> String.valueOf(island.getProtectionRange())), ISLAND_CREATION_DATE("island-creation-date", (addon, user, island) -> String.valueOf(island.getProtectionRange())),
ISLAND_SPAWNPOINT("island-spawnpoint", (addon, user, island) -> Util.xyz(island.getCenter().toVector())), ISLAND_SPAWNPOINT("island-spawnpoint", (addon, user, island) -> Util.xyz(island.getCenter().toVector())),
ISLAND_NAME("island-name", (addon, user, island) -> island.getName() == null ? "" : island.getName()); ISLAND_NAME("island-name", (addon, user, island) -> island.getName() == null ? "" : island.getName()),
/**
* Displays the X coordinate of the island's center.
* @since 1.5.0
*/
ISLAND_CENTER_X("island-center-x", (addon, user, island) -> String.valueOf(island.getCenter().getBlockX())),
/**
* Displays the Y coordinate of the island's center.
* @since 1.5.0
*/
ISLAND_CENTER_Y("island-center-y", (addon, user, island) -> String.valueOf(island.getCenter().getBlockY())),
/**
* Displays the Z coordinate of the island's center.
* @since 1.5.0
*/
ISLAND_CENTER_Z("island-center-z", (addon, user, island) -> String.valueOf(island.getCenter().getBlockZ()));
private String placeholder; private String placeholder;
/** /**