mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-09 16:17:37 +02:00
Split unsafe enchantments in kits to a new config option
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user