mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-29 16:15:17 +01:00
Fixed NPE
This commit is contained in:
parent
0915d4c31a
commit
cdd36891d2
@ -34,6 +34,9 @@ public class PlaceholderManager {
|
|||||||
public static String translatePlaceholders(String text, Player player) {
|
public static String translatePlaceholders(String text, Player player) {
|
||||||
if(integrations.isEmpty()) {
|
if(integrations.isEmpty()) {
|
||||||
placeholders.forEach(placeholderEntry -> {
|
placeholders.forEach(placeholderEntry -> {
|
||||||
|
if(player == null && placeholderEntry.requiresPlayer())
|
||||||
|
return;
|
||||||
|
|
||||||
String test = "%ecoenchants_" + placeholderEntry.getIdentifier() + "%";
|
String test = "%ecoenchants_" + placeholderEntry.getIdentifier() + "%";
|
||||||
text.replaceAll(test, placeholderEntry.getResult(player));
|
text.replaceAll(test, placeholderEntry.getResult(player));
|
||||||
});
|
});
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
name: "Curse of Breaklessness"
|
name: "Curse of Breaklessness"
|
||||||
description: Chance to prevent block breaking.
|
description: &a%ecoenchants_breaklessnesscurse_chance_per_level_percentage%%&f chance to prevent block breaking.
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
obtaining:
|
obtaining:
|
||||||
|
Loading…
Reference in New Issue
Block a user