mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Added cache update post-load
This commit is contained in:
parent
cdd36891d2
commit
8815c774b7
@ -32,19 +32,8 @@ 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));
|
||||
});
|
||||
return text;
|
||||
} 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();
|
||||
}
|
||||
}
|
||||
|
@ -447,6 +447,10 @@ public class Loader {
|
||||
}
|
||||
|
||||
Logger.info("");
|
||||
|
||||
Logger.info("Updating cache...");
|
||||
EnchantmentCache.update();
|
||||
Logger.info("");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
name: "Curse of Breaklessness"
|
||||
description: &a%ecoenchants_breaklessnesscurse_chance_per_level_percentage%%&f chance to prevent block breaking.
|
||||
description: "&a%ecoenchants_breaklessnesscurse_chance_per_level_percentage%%&f chance to prevent block breaking."
|
||||
enabled: true
|
||||
|
||||
obtaining:
|
||||
|
Loading…
Reference in New Issue
Block a user