Set up config support for suppressing perms errors; relates to #286

This commit is contained in:
Tim Ekl 2011-12-15 22:57:54 -05:00
parent 327f0ce7c4
commit 1894a2e4e7
4 changed files with 5 additions and 1 deletions

View File

@ -57,6 +57,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
public static boolean EnforceAccess;
public static boolean EnforceGameModes;
public static boolean PrefixChat;
public static boolean DisplayPermErrors;
public static Map<String, String> teleportQueue = new HashMap<String, String>();
private AnchorManager anchorManager = new AnchorManager(this);
@ -322,6 +323,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
EnforceAccess = this.multiverseConfig.getBoolean("enforceaccess", false);
EnforceGameModes = this.multiverseConfig.getBoolean("enforcegamemodes", true);
PrefixChat = this.multiverseConfig.getBoolean("worldnameprefix", true);
DisplayPermErrors = this.multiverseConfig.getBoolean("displaypermerrors", true);
this.messaging = new MVMessaging(this);
this.messaging.setCooldown(this.multiverseConfig.getInt("messagecooldown", 5000));
this.saveMVConfigs();

View File

@ -55,6 +55,7 @@ public class VersionCommand extends MultiverseCommand {
logAndAddToPasteBinBuffer("worldnameprefix: " + MultiverseCore.PrefixChat);
logAndAddToPasteBinBuffer("enforceaccess: " + MultiverseCore.EnforceAccess);
logAndAddToPasteBinBuffer("enforcegamemodes: " + MultiverseCore.EnforceGameModes);
logAndAddToPasteBinBuffer("displaypermerrors: " + MultiverseCore.DisplayPermErrors);
logAndAddToPasteBinBuffer("debug: " + MultiverseCore.GlobalDebug);
logAndAddToPasteBinBuffer("Special Code: FRN002");

View File

@ -8,7 +8,7 @@
package com.onarandombox.MultiverseCore.enums;
public enum ConfigProperty {
messagecooldown, teleportcooldown, worldnameprefix, enforcegamemodes, enforceaccess, debug;
messagecooldown, teleportcooldown, worldnameprefix, enforcegamemodes, enforceaccess, displaypermerrors, debug;
public static String getAllValues() {

View File

@ -9,3 +9,4 @@ enforceaccess: true
enforcegamemodes: true
bedrespawn: true
version: 2.4
displaypermerrors: true