mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 18:24:43 +02:00
Move admin notification toggle check
This commit is contained in:
@ -53,6 +53,7 @@ public class XprateCommand implements TabExecutor {
|
||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.Event.Stop.Subtitle"));
|
||||
}
|
||||
|
||||
//Admin notification
|
||||
NotificationManager.processSensitiveCommandNotification(sender, SensitiveCommandType.XPRATE_END);
|
||||
|
||||
mcMMO.p.toggleXpEventEnabled();
|
||||
|
@ -167,6 +167,10 @@ public class NotificationManager {
|
||||
* @param msg message fetched from locale
|
||||
*/
|
||||
private static void sendAdminNotification(String msg) {
|
||||
//If its not enabled exit
|
||||
if(!Config.getInstance().adminNotifications())
|
||||
return;
|
||||
|
||||
for(Player player : Bukkit.getServer().getOnlinePlayers())
|
||||
{
|
||||
if(player.isOp() || Permissions.adminChat(player))
|
||||
@ -194,10 +198,6 @@ public class NotificationManager {
|
||||
* @param sensitiveCommandType type of command issued
|
||||
*/
|
||||
public static void processSensitiveCommandNotification(CommandSender commandSender, SensitiveCommandType sensitiveCommandType, String... args) {
|
||||
//If its not enabled exit
|
||||
if(!Config.getInstance().adminNotifications())
|
||||
return;
|
||||
|
||||
/*
|
||||
* Determine the 'identity' of the one who executed the command to pass as a parameters
|
||||
*/
|
||||
|
Reference in New Issue
Block a user