diff --git a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java index 2a5429cf..0d05ac89 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java @@ -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 teleportQueue = new HashMap(); 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(); @@ -426,7 +428,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { } ArrayList allArgs = new ArrayList(Arrays.asList(args)); allArgs.add(0, command.getName()); - return this.commandHandler.locateAndRunCommand(sender, allArgs); + return this.commandHandler.locateAndRunCommand(sender, allArgs, DisplayPermErrors); } /** diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java index 63586e82..14228da2 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java @@ -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"); diff --git a/src/main/java/com/onarandombox/MultiverseCore/enums/ConfigProperty.java b/src/main/java/com/onarandombox/MultiverseCore/enums/ConfigProperty.java index a1e952c2..96d1fee0 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/enums/ConfigProperty.java +++ b/src/main/java/com/onarandombox/MultiverseCore/enums/ConfigProperty.java @@ -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() { diff --git a/src/main/resources/defaults/config.yml b/src/main/resources/defaults/config.yml index 4ef8952b..0a74ebd6 100644 --- a/src/main/resources/defaults/config.yml +++ b/src/main/resources/defaults/config.yml @@ -9,3 +9,4 @@ enforceaccess: true enforcegamemodes: true bedrespawn: true version: 2.4 +displaypermerrors: true