From 741d855fc5713e4692ea82aa84040d4399a769c1 Mon Sep 17 00:00:00 2001 From: ASangarin Date: Sat, 29 Aug 2020 16:07:12 +0200 Subject: [PATCH] Placeholders no longer break when reloading PAPI --- .../mmocore/comp/placeholder/RPGPlaceholders.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java index 1a276b33..8f58bc81 100644 --- a/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java +++ b/src/main/java/net/Indyuce/mmocore/comp/placeholder/RPGPlaceholders.java @@ -18,7 +18,16 @@ import net.Indyuce.mmocore.api.quest.PlayerQuests; import net.mmogroup.mmolib.api.util.AltChar; public class RPGPlaceholders extends PlaceholderExpansion { - + @Override + public boolean persist(){ + return true; + } + + @Override + public boolean canRegister(){ + return true; + } + @Override public String getAuthor() { return "Indyuce"; @@ -36,7 +45,6 @@ public class RPGPlaceholders extends PlaceholderExpansion { @Override public String onRequest(@Nullable OfflinePlayer player, @NotNull String identifier) { - if (identifier.equals("level")) return "" + PlayerData.get(player).getLevel();