From 730c940a2244f3720820fd39a3bdfac4bfef4f11 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Fri, 13 Nov 2020 15:49:26 +0000 Subject: [PATCH] Removed internal parser (again) --- .../placeholder/PlaceholderManager.java | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/integrations/placeholder/PlaceholderManager.java b/Plugin/src/main/java/com/willfp/ecoenchants/integrations/placeholder/PlaceholderManager.java index fe6dfa0f..cdd18c3c 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/integrations/placeholder/PlaceholderManager.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/integrations/placeholder/PlaceholderManager.java @@ -32,20 +32,8 @@ public class PlaceholderManager { } public static String translatePlaceholders(String text, Player player) { - if(integrations.isEmpty()) { - AtomicReference returnText = new AtomicReference<>(); - placeholders.forEach(placeholderEntry -> { - if(player == null && placeholderEntry.requiresPlayer()) - return; - - String test = "%ecoenchants_" + placeholderEntry.getIdentifier() + "%"; - returnText.set(text.replaceAll(test, placeholderEntry.getResult(player))); - }); - return returnText.get(); - } else { - AtomicReference translatedReference = new AtomicReference<>(text); - integrations.forEach(placeholderIntegration -> translatedReference.set(placeholderIntegration.translate(translatedReference.get(), player))); - return translatedReference.get(); - } + AtomicReference translatedReference = new AtomicReference<>(text); + integrations.forEach(placeholderIntegration -> translatedReference.set(placeholderIntegration.translate(translatedReference.get(), player))); + return translatedReference.get(); } }