mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Removed internal parser (again)
This commit is contained in:
parent
baf34470d8
commit
730c940a22
@ -32,20 +32,8 @@ public class PlaceholderManager {
|
||||
}
|
||||
|
||||
public static String translatePlaceholders(String text, Player player) {
|
||||
if(integrations.isEmpty()) {
|
||||
AtomicReference<String> 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<String> translatedReference = new AtomicReference<>(text);
|
||||
integrations.forEach(placeholderIntegration -> translatedReference.set(placeholderIntegration.translate(translatedReference.get(), player)));
|
||||
return translatedReference.get();
|
||||
}
|
||||
AtomicReference<String> translatedReference = new AtomicReference<>(text);
|
||||
integrations.forEach(placeholderIntegration -> translatedReference.set(placeholderIntegration.translate(translatedReference.get(), player)));
|
||||
return translatedReference.get();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user