From 8a4b1320bda8f579d8100336a57837adc9a57b73 Mon Sep 17 00:00:00 2001 From: Maroon28 <74205260+Maroon28@users.noreply.github.com> Date: Tue, 28 Sep 2021 09:33:25 +0200 Subject: [PATCH] Update methods, and make placeholders persist Previously, when you reloaded placeholderapi, the DXL expansion would get unloaded. This aims to prevent it from unloading whenever PAPI was reloaded. It also updates the onRequest() method --- .../java/de/erethon/dungeonsxl/util/PlaceholderUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/de/erethon/dungeonsxl/util/PlaceholderUtil.java b/core/src/main/java/de/erethon/dungeonsxl/util/PlaceholderUtil.java index 2ccf0bc4..739d1817 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/util/PlaceholderUtil.java +++ b/core/src/main/java/de/erethon/dungeonsxl/util/PlaceholderUtil.java @@ -56,9 +56,14 @@ public class PlaceholderUtil extends PlaceholderExpansion { public String getVersion() { return plugin.getDescription().getVersion(); } + + @Override + public boolean persist() { + return true; + } @Override - public String onPlaceholderRequest(Player player, String identifier) { + public String onRequest(OfflinePlayer player, String identifier) { if (player == null) { return ""; }