소스 검색

Add UUID to admin notifications

nossr50 6 년 전
부모
커밋
66425ba48d
3개의 변경된 파일6개의 추가작업 그리고 9개의 파일을 삭제
  1. 1 1
      Changelog.txt
  2. 2 5
      src/main/java/com/gmail/nossr50/util/player/NotificationManager.java
  3. 3 3
      src/main/resources/locale/locale_en_US.properties

+ 1 - 1
Changelog.txt

@@ -8,7 +8,7 @@ Version 2.1.62
     Guardian default combat XP multiplier reduced from 3.0 to 1.0 (update config if you want this change)
     Guardian default combat XP multiplier reduced from 3.0 to 1.0 (update config if you want this change)
     New locale string - 'Server.ConsoleName' the name of the server console, this will be used in place of player names when sending admin notifications out if the command was used from console
     New locale string - 'Server.ConsoleName' the name of the server console, this will be used in place of player names when sending admin notifications out if the command was used from console
     New locale string - 'Notifications.Admin.Format.Others' style formatting + prefix for admin notifications used in the other new strings below
     New locale string - 'Notifications.Admin.Format.Others' style formatting + prefix for admin notifications used in the other new strings below
-    New locale string - 'Notifications.Admin.Format.Self' style formatting + prefix for admin command confirmations send to the user who executed the command
+    New locale string - 'Notifications.Admin.Format.Self' style formatting + prefix for admin command confirmations sent to the user who executed the command
     New locale string - 'Notifications.Admin.XPRate.Start.Self' sent to the user who modifies the XP rate regardless of whether or not messages for the event are enabled
     New locale string - 'Notifications.Admin.XPRate.Start.Self' sent to the user who modifies the XP rate regardless of whether or not messages for the event are enabled
     New locale string - 'Notifications.Admin.XPRate.Start.Others' details of who started an XP rate event are sent to players who have Operator status or admin chat permission when the command to start or modify XP of an event has been issued
     New locale string - 'Notifications.Admin.XPRate.Start.Others' details of who started an XP rate event are sent to players who have Operator status or admin chat permission when the command to start or modify XP of an event has been issued
     New locale string - 'Notifications.Admin.XPRate.End.Self' sent to the user who ended the XP rate event regardless of whether or not messages for the event are enabled
     New locale string - 'Notifications.Admin.XPRate.End.Self' sent to the user who ended the XP rate event regardless of whether or not messages for the event are enabled

+ 2 - 5
src/main/java/com/gmail/nossr50/util/player/NotificationManager.java

@@ -17,10 +17,7 @@ import com.gmail.nossr50.util.sounds.SoundManager;
 import com.gmail.nossr50.util.sounds.SoundType;
 import com.gmail.nossr50.util.sounds.SoundType;
 import net.md_5.bungee.api.ChatMessageType;
 import net.md_5.bungee.api.ChatMessageType;
 import net.md_5.bungee.api.chat.TextComponent;
 import net.md_5.bungee.api.chat.TextComponent;
-import org.bukkit.Bukkit;
-import org.bukkit.Location;
-import org.bukkit.Server;
-import org.bukkit.SoundCategory;
+import org.bukkit.*;
 import org.bukkit.command.CommandSender;
 import org.bukkit.command.CommandSender;
 import org.bukkit.entity.Player;
 import org.bukkit.entity.Player;
 
 
@@ -205,7 +202,7 @@ public class NotificationManager {
 
 
         if(commandSender instanceof Player)
         if(commandSender instanceof Player)
         {
         {
-            senderName = ((Player) commandSender).getDisplayName();
+            senderName = ((Player) commandSender).getDisplayName() + ChatColor.RESET + "-" + ((Player) commandSender).getUniqueId();
         }
         }
 
 
         //Send the notification
         //Send the notification

+ 3 - 3
src/main/resources/locale/locale_en_US.properties

@@ -831,9 +831,9 @@ Commands.xprate.started.1=[[GOLD]]mcMMO XP RATE IS NOW {0}x!
 Server.ConsoleName=[[YELLOW]][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.Start.Others=The user {0} [[GRAY]]has started or modified an XP rate event with global multiplier {1}x
-Notifications.Admin.Format.Others=[[GOLD]]([[GREEN]]mcMMO [[DARK_AQUA]]Admin Notification[[GOLD]]) [[GRAY]]{0}
+Notifications.Admin.XPRate.End.Others={0} [[GRAY]]has ended the XP rate event
+Notifications.Admin.XPRate.Start.Others={0} [[GRAY]]has started or modified an XP rate event with global multiplier {1}x
+Notifications.Admin.Format.Others=[[GOLD]]([[GREEN]]mcMMO [[DARK_AQUA]]Admin[[GOLD]]) [[GRAY]]{0}
 Notifications.Admin.Format.Self=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[GRAY]]{0}
 Notifications.Admin.Format.Self=[[GOLD]]([[GREEN]]mcMMO[[GOLD]]) [[GRAY]]{0}
 
 
 # Event
 # Event