Adds a configuration option to allow explosion/piston protection to be turned off
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user