Adds a configuration option to allow explosion/piston protection to be turned off

This commit is contained in:
2022-01-22 17:10:11 +01:00
parent 0283c917e7
commit 6cee659bd0
4 changed files with 24 additions and 10 deletions

View File

@ -44,6 +44,7 @@ public final class PermissionSigns extends JavaPlugin {
private static PermissionSigns instance;
private static boolean perWorldPermissions;
private static boolean enableExtensiveSignProtection;
private static boolean enableIndirectSignProtection;
/**
* Instantiates the permission signs class
@ -131,6 +132,15 @@ public final class PermissionSigns extends JavaPlugin {
return enableExtensiveSignProtection;
}
/**
* Gets whether permission sign explosion and piston protection is enabled
*
* @return <p>Whether permission sign explosion and piston protection is enabled</p>
*/
public static boolean indirectProtectionEnabled() {
return enableIndirectSignProtection;
}
@Override
public void reloadConfig() {
super.reloadConfig();
@ -172,6 +182,7 @@ public final class PermissionSigns extends JavaPlugin {
String language = config.getString("language", "en");
perWorldPermissions = config.getBoolean("perWorldPermissions", false);
enableExtensiveSignProtection = config.getBoolean("enableExtensiveSignProtection", false);
enableIndirectSignProtection = config.getBoolean("enableIndirectSignProtection", true);
saveConfig();
return language;
}