1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

feat: add display limit level

This commit is contained in:
StarWishsama 2021-01-23 17:07:30 +08:00
parent 5e279d7c40
commit 018cfc33c8
3 changed files with 3 additions and 4 deletions

View File

@ -82,8 +82,7 @@ public class AutoDisenchanter extends AContainer {
amount++;
} else {
if (!menu.toInventory().getViewers().isEmpty()) {
menu.toInventory().getViewers().forEach(p -> SlimefunPlugin.getLocalization().sendMessage(p, "messages.above-limit-level", true));
}
menu.toInventory().getViewers().forEach(p -> SlimefunPlugin.getLocalization().sendMessage(p, "messages.above-limit-level", true, (message -> message.replace("%level%", enchantLevelLimit.getValue().toString()))));}
}
}

View File

@ -59,7 +59,7 @@ public class AutoEnchanter extends AContainer {
enchantments.put(e.getKey(), e.getValue());
} else {
if (!menu.toInventory().getViewers().isEmpty()) {
menu.toInventory().getViewers().forEach(p -> SlimefunPlugin.getLocalization().sendMessage(p, "messages.above-limit-level", true));
menu.toInventory().getViewers().forEach(p -> SlimefunPlugin.getLocalization().sendMessage(p, "messages.above-limit-level", true, (message -> message.replace("%level%", enchantLevelLimit.getValue().toString()))));
}
}
}

View File

@ -208,7 +208,7 @@ messages:
- '&7This one was actually a Biscuit and not a Cookie'
- '&7Neon signs are LIT!'
above-limit-level: '&cThe enchant level you want to enchant exceeds the limit'
above-limit-level: '&cThe enchant level you want to enchant exceeds the limit level: %level%'
machines:
pattern-not-found: '&eSorry, I could not recognize this Recipe. Please place the Items in the correct pattern into the Dispenser.'