Allow admins to force enable /recipe if they want

Add `force-enable-recipe`, which allows server admins to manually enable `/recipe` despite potential duplication exploits. Use this at your own risk!

Related: #1397
This commit is contained in:
md678685 2018-12-08 16:41:09 +00:00
parent 44301fae4f
commit 6a6383462d
4 changed files with 20 additions and 3 deletions

View file

@ -1463,7 +1463,7 @@ public class Settings implements net.ess3.api.ISettings {
return isAllowWorldInBroadcastworld;
}
private String itemDbType;
private String itemDbType; // #EasterEgg - admins can manually switch items provider if they want
private String _getItemDbType() {
return config.getString("item-db-type", "auto");
@ -1473,4 +1473,15 @@ public class Settings implements net.ess3.api.ISettings {
public String getItemDbType() {
return itemDbType;
}
private boolean forceEnableRecipe; // https://github.com/EssentialsX/Essentials/issues/1397
private boolean _isForceEnableRecipe() {
return config.getBoolean("force-enable-recipe", false);
}
@Override
public boolean isForceEnableRecipe() {
return false;
}
}