Fixed NPE

This commit is contained in:
BuildTools
2020-11-13 15:29:13 +00:00
parent 0915d4c31a
commit cdd36891d2
2 changed files with 4 additions and 1 deletions

View File

@@ -34,6 +34,9 @@ public class PlaceholderManager {
public static String translatePlaceholders(String text, Player player) {
if(integrations.isEmpty()) {
placeholders.forEach(placeholderEntry -> {
if(player == null && placeholderEntry.requiresPlayer())
return;
String test = "%ecoenchants_" + placeholderEntry.getIdentifier() + "%";
text.replaceAll(test, placeholderEntry.getResult(player));
});