diff --git a/src/main/java/com/gmail/nossr50/commands/McmmoCommand.java b/src/main/java/com/gmail/nossr50/commands/McmmoCommand.java index 3fa4fed10..8a6cecbfa 100644 --- a/src/main/java/com/gmail/nossr50/commands/McmmoCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/McmmoCommand.java @@ -30,7 +30,10 @@ public class McmmoCommand implements CommandExecutor { sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal"); } - sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion())); + if (Permissions.showversion(sender)) { + sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion())); + } + mcMMO.getHolidayManager().anniversaryCheck(sender); return true; diff --git a/src/main/java/com/gmail/nossr50/util/Motd.java b/src/main/java/com/gmail/nossr50/util/Motd.java index bebec0b5e..3ede5b77b 100644 --- a/src/main/java/com/gmail/nossr50/util/Motd.java +++ b/src/main/java/com/gmail/nossr50/util/Motd.java @@ -34,7 +34,9 @@ public final class Motd { * @param version Plugin version */ public static void displayVersion(Player player, String version) { - player.sendMessage(LocaleLoader.getString("MOTD.Version", version)); + if (Permissions.showversion(player)) { + player.sendMessage(LocaleLoader.getString("MOTD.Version", version)); + } } /** diff --git a/src/main/java/com/gmail/nossr50/util/Permissions.java b/src/main/java/com/gmail/nossr50/util/Permissions.java index c85e28eec..2947085ee 100644 --- a/src/main/java/com/gmail/nossr50/util/Permissions.java +++ b/src/main/java/com/gmail/nossr50/util/Permissions.java @@ -25,6 +25,7 @@ public final class Permissions { public static boolean mobHealthDisplay(Permissible permissible) { return permissible.hasPermission("mcmmo.mobhealthdisplay"); } public static boolean updateNotifications(Permissible permissible) {return permissible.hasPermission("mcmmo.tools.updatecheck"); } public static boolean chimaeraWing(Permissible permissible) { return permissible.hasPermission("mcmmo.item.chimaerawing"); } + public static boolean showversion(Permissible permissible) { return permissible.hasPermission("mcmmo.showversion"); } /* BYPASS */ public static boolean hardcoreBypass(Permissible permissible) { return permissible.hasPermission("mcmmo.bypass.hardcoremode"); } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 670d3b44b..89f1dfef6 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1937,6 +1937,9 @@ permissions: children: mcmmo.ability.woodcutting.all: true mcmmo.commands.woodcutting: true + mcmmo.showversion: + default: true + description: Show mcMMO version number in /mcmmo and motd mcmmo.tools.*: default: false description: Implies all mcmmo.tools permissions.