mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Move admin notification toggle check
This commit is contained in:
parent
663757352a
commit
2433ef5db7
@ -53,6 +53,7 @@ public class XprateCommand implements TabExecutor {
|
|||||||
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.Event.Stop.Subtitle"));
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.Event.Stop.Subtitle"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Admin notification
|
||||||
NotificationManager.processSensitiveCommandNotification(sender, SensitiveCommandType.XPRATE_END);
|
NotificationManager.processSensitiveCommandNotification(sender, SensitiveCommandType.XPRATE_END);
|
||||||
|
|
||||||
mcMMO.p.toggleXpEventEnabled();
|
mcMMO.p.toggleXpEventEnabled();
|
||||||
|
@ -167,6 +167,10 @@ public class NotificationManager {
|
|||||||
* @param msg message fetched from locale
|
* @param msg message fetched from locale
|
||||||
*/
|
*/
|
||||||
private static void sendAdminNotification(String msg) {
|
private static void sendAdminNotification(String msg) {
|
||||||
|
//If its not enabled exit
|
||||||
|
if(!Config.getInstance().adminNotifications())
|
||||||
|
return;
|
||||||
|
|
||||||
for(Player player : Bukkit.getServer().getOnlinePlayers())
|
for(Player player : Bukkit.getServer().getOnlinePlayers())
|
||||||
{
|
{
|
||||||
if(player.isOp() || Permissions.adminChat(player))
|
if(player.isOp() || Permissions.adminChat(player))
|
||||||
@ -194,10 +198,6 @@ public class NotificationManager {
|
|||||||
* @param sensitiveCommandType type of command issued
|
* @param sensitiveCommandType type of command issued
|
||||||
*/
|
*/
|
||||||
public static void processSensitiveCommandNotification(CommandSender commandSender, SensitiveCommandType sensitiveCommandType, String... args) {
|
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
|
* Determine the 'identity' of the one who executed the command to pass as a parameters
|
||||||
*/
|
*/
|
||||||
|
@ -828,7 +828,7 @@ Commands.xprate.started.0=[[GOLD]]XP EVENT FOR mcMMO HAS STARTED!
|
|||||||
Commands.xprate.started.1=[[GOLD]]mcMMO XP RATE IS NOW {0}x!
|
Commands.xprate.started.1=[[GOLD]]mcMMO XP RATE IS NOW {0}x!
|
||||||
|
|
||||||
# Admin Notifications
|
# Admin Notifications
|
||||||
Server.ConsoleName=[Server]
|
Server.ConsoleName=[[YELLOW]][Server]
|
||||||
Notifications.Admin.XPRate.Start.Self=[[GRAY]]You have set the global XP rate multiplier to [[GOLD]]{0}x
|
Notifications.Admin.XPRate.Start.Self=[[GRAY]]You have set the global XP rate multiplier to [[GOLD]]{0}x
|
||||||
Notifications.Admin.XPRate.End.Self=[[GRAY]]You ended the XP rate event.
|
Notifications.Admin.XPRate.End.Self=[[GRAY]]You ended the XP rate event.
|
||||||
Notifications.Admin.XPRate.End.Others=The user {0} [[GRAY]]has ended the XP rate event
|
Notifications.Admin.XPRate.End.Others=The user {0} [[GRAY]]has ended the XP rate event
|
||||||
|
Loading…
Reference in New Issue
Block a user