mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 05:01:28 +00:00
Split unsafe enchantments in kits to a new config option
This commit is contained in:
parent
a1a190bb02
commit
3f2c2aadbb
4 changed files with 14 additions and 2 deletions
|
@ -155,6 +155,8 @@ public interface ISettings extends IConf
|
|||
boolean getUpdateBedAtDaytime();
|
||||
|
||||
boolean allowUnsafeEnchantments();
|
||||
|
||||
boolean allowUnsafeEnchantmentsInKits();
|
||||
|
||||
boolean getRepairEnchanted();
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ public class Kit
|
|||
IText output = new KeywordReplacer(input, user.getSource(), ess);
|
||||
|
||||
boolean spew = false;
|
||||
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments();
|
||||
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantmentsInKits();
|
||||
for (String kitItem : output.getLines())
|
||||
{
|
||||
if (kitItem.startsWith(ess.getSettings().getCurrencySymbol()))
|
||||
|
|
|
@ -944,6 +944,12 @@ public class Settings implements net.ess3.api.ISettings
|
|||
return config.getBoolean("repair-enchanted", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowUnsafeEnchantmentsInKits()
|
||||
{
|
||||
return config.getBoolean("unsafe-enchantments-in-kits", config.getBoolean("unsafe-enchantments", false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowUnsafeEnchantments()
|
||||
{
|
||||
|
|
|
@ -395,7 +395,11 @@ oversized-stacksize: 64
|
|||
# essentials.repair.enchanted
|
||||
repair-enchanted: true
|
||||
|
||||
# Allow 'unsafe' enchantments in kits and item spawning.
|
||||
# Allow 'unsafe' enchantments in kits.
|
||||
# Warning: Mixing and overleveling some enchantments can cause issues with clients, servers and plugins.
|
||||
unsafe-enchantments-in-kits: false
|
||||
|
||||
# Allow 'unsafe' enchantments in item spawning.
|
||||
# Warning: Mixing and overleveling some enchantments can cause issues with clients, servers and plugins.
|
||||
unsafe-enchantments: false
|
||||
|
||||
|
|
Loading…
Reference in a new issue