From cd5c409266a895d0a3b4d404fc0acb43edfc5395 Mon Sep 17 00:00:00 2001 From: d0by Date: Sat, 27 Nov 2021 00:15:53 +0100 Subject: [PATCH] Fix --- .../holograms/api/holograms/HologramLine.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramLine.java b/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramLine.java index 0f2e5d4e..4a16b1a5 100644 --- a/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramLine.java +++ b/src/main/java/eu/decentsoftware/holograms/api/holograms/HologramLine.java @@ -269,11 +269,10 @@ private String getText(Player player, boolean update) { if (!hasFlag(EnumFlag.DISABLE_PLACEHOLDERS)) { string = PAPI.setPlaceholders(player, string); } - playerTextMap.put(uuid, string - .replace("{player}", player.getName()) - .replace("{page}", String.valueOf(hasParent() ? parent.getIndex() : 1)) - .replace("{pages}", String.valueOf(hasParent() ? parent.getParent().size() : 1)) - ); + string = string.replace("{player}", player.getName()) + .replace("{page}", String.valueOf(hasParent() ? parent.getIndex() + 1 : 1)) + .replace("{pages}", String.valueOf(hasParent() ? parent.getParent().size() : 1)); + playerTextMap.put(uuid, string); } // Replace Animations if (!hasFlag(EnumFlag.DISABLE_ANIMATIONS)) {