mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Added new permission node to control who can check version number
Negate this permission node to hide the version number from /mcmmo and motd
This commit is contained in:
parent
0a6735110f
commit
c51fde7f1f
@ -30,7 +30,10 @@ public class McmmoCommand implements CommandExecutor {
|
|||||||
sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal");
|
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);
|
mcMMO.getHolidayManager().anniversaryCheck(sender);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -34,7 +34,9 @@ public final class Motd {
|
|||||||
* @param version Plugin version
|
* @param version Plugin version
|
||||||
*/
|
*/
|
||||||
public static void displayVersion(Player player, String 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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,6 +25,7 @@ public final class Permissions {
|
|||||||
public static boolean mobHealthDisplay(Permissible permissible) { return permissible.hasPermission("mcmmo.mobhealthdisplay"); }
|
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 updateNotifications(Permissible permissible) {return permissible.hasPermission("mcmmo.tools.updatecheck"); }
|
||||||
public static boolean chimaeraWing(Permissible permissible) { return permissible.hasPermission("mcmmo.item.chimaerawing"); }
|
public static boolean chimaeraWing(Permissible permissible) { return permissible.hasPermission("mcmmo.item.chimaerawing"); }
|
||||||
|
public static boolean showversion(Permissible permissible) { return permissible.hasPermission("mcmmo.showversion"); }
|
||||||
|
|
||||||
/* BYPASS */
|
/* BYPASS */
|
||||||
public static boolean hardcoreBypass(Permissible permissible) { return permissible.hasPermission("mcmmo.bypass.hardcoremode"); }
|
public static boolean hardcoreBypass(Permissible permissible) { return permissible.hasPermission("mcmmo.bypass.hardcoremode"); }
|
||||||
|
@ -1937,6 +1937,9 @@ permissions:
|
|||||||
children:
|
children:
|
||||||
mcmmo.ability.woodcutting.all: true
|
mcmmo.ability.woodcutting.all: true
|
||||||
mcmmo.commands.woodcutting: true
|
mcmmo.commands.woodcutting: true
|
||||||
|
mcmmo.showversion:
|
||||||
|
default: true
|
||||||
|
description: Show mcMMO version number in /mcmmo and motd
|
||||||
mcmmo.tools.*:
|
mcmmo.tools.*:
|
||||||
default: false
|
default: false
|
||||||
description: Implies all mcmmo.tools permissions.
|
description: Implies all mcmmo.tools permissions.
|
||||||
|
Loading…
Reference in New Issue
Block a user