From b40f07f7636a76dc8590cde3f4ae1c3809d88e99 Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Sun, 7 Apr 2019 09:46:02 +0200 Subject: [PATCH] Added island center related placeholders #621 * island-center-x * island-center-y * island-center-z --- .../bentobox/lists/GameModePlaceholders.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/lists/GameModePlaceholders.java b/src/main/java/world/bentobox/bentobox/lists/GameModePlaceholders.java index 6c7acc0fc..5f64ae9d2 100644 --- a/src/main/java/world/bentobox/bentobox/lists/GameModePlaceholders.java +++ b/src/main/java/world/bentobox/bentobox/lists/GameModePlaceholders.java @@ -15,7 +15,22 @@ public enum GameModePlaceholders { 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_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; /**