mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 11:49:12 +00:00
Don't socialspy broadcast raw /msg and /r.
This commit is contained in:
parent
87adbb477d
commit
c4c303dbfb
1 changed files with 11 additions and 6 deletions
|
@ -384,7 +384,12 @@ public class EssentialsPlayerListener implements Listener {
|
|||
LOGGER.info(tl("mutedUserSpeaks", player.getName()));
|
||||
return;
|
||||
}
|
||||
|
||||
PluginCommand pluginCommand = ess.getServer().getPluginCommand(cmd);
|
||||
|
||||
if (ess.getSettings().getSocialSpyCommands().contains(cmd) || ess.getSettings().getSocialSpyCommands().contains("*")) {
|
||||
if (pluginCommand == null
|
||||
|| (!pluginCommand.getName().equals("msg") && !pluginCommand.getName().equals("r"))) { // /msg and /r are handled in SimpleMessageRecipient
|
||||
User user = ess.getUser(player);
|
||||
if (!user.isAuthorized("essentials.chat.spy.exempt")) {
|
||||
for (User spyer : ess.getOnlineUsers()) {
|
||||
|
@ -394,11 +399,11 @@ public class EssentialsPlayerListener implements Listener {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean broadcast = true; // whether to broadcast the updated activity
|
||||
boolean update = true; // Only modified when the command is afk
|
||||
|
||||
PluginCommand pluginCommand = ess.getServer().getPluginCommand(cmd);
|
||||
if (pluginCommand != null) {
|
||||
// Switch case for commands that shouldn't broadcast afk activity.
|
||||
switch (pluginCommand.getName()) {
|
||||
|
|
Loading…
Reference in a new issue