mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-11 00:55:10 +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 getUpdateBedAtDaytime();
|
||||||
|
|
||||||
boolean allowUnsafeEnchantments();
|
boolean allowUnsafeEnchantments();
|
||||||
|
|
||||||
|
boolean allowUnsafeEnchantmentsInKits();
|
||||||
|
|
||||||
boolean getRepairEnchanted();
|
boolean getRepairEnchanted();
|
||||||
|
|
||||||
|
@@ -174,7 +174,7 @@ public class Kit
|
|||||||
IText output = new KeywordReplacer(input, user.getSource(), ess);
|
IText output = new KeywordReplacer(input, user.getSource(), ess);
|
||||||
|
|
||||||
boolean spew = false;
|
boolean spew = false;
|
||||||
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments();
|
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantmentsInKits();
|
||||||
for (String kitItem : output.getLines())
|
for (String kitItem : output.getLines())
|
||||||
{
|
{
|
||||||
if (kitItem.startsWith(ess.getSettings().getCurrencySymbol()))
|
if (kitItem.startsWith(ess.getSettings().getCurrencySymbol()))
|
||||||
|
@@ -944,6 +944,12 @@ public class Settings implements net.ess3.api.ISettings
|
|||||||
return config.getBoolean("repair-enchanted", true);
|
return config.getBoolean("repair-enchanted", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean allowUnsafeEnchantmentsInKits()
|
||||||
|
{
|
||||||
|
return config.getBoolean("unsafe-enchantments-in-kits", config.getBoolean("unsafe-enchantments", false));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean allowUnsafeEnchantments()
|
public boolean allowUnsafeEnchantments()
|
||||||
{
|
{
|
||||||
|
@@ -395,7 +395,11 @@ oversized-stacksize: 64
|
|||||||
# essentials.repair.enchanted
|
# essentials.repair.enchanted
|
||||||
repair-enchanted: true
|
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.
|
# Warning: Mixing and overleveling some enchantments can cause issues with clients, servers and plugins.
|
||||||
unsafe-enchantments: false
|
unsafe-enchantments: false
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user