mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Permissions.showversion(sender)) {
|
||||||
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
|
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
|
||||||
|
}
|
||||||
|
|
||||||
mcMMO.getHolidayManager().anniversaryCheck(sender);
|
mcMMO.getHolidayManager().anniversaryCheck(sender);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -34,8 +34,10 @@ 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) {
|
||||||
|
if (Permissions.showversion(player)) {
|
||||||
player.sendMessage(LocaleLoader.getString("MOTD.Version", version));
|
player.sendMessage(LocaleLoader.getString("MOTD.Version", version));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display Hardcore Mode settings.
|
* Display Hardcore Mode settings.
|
||||||
|
@ -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