From f00f67a844156836041b53b48cdad527b63f887a Mon Sep 17 00:00:00 2001 From: elmon Date: Sun, 23 Jan 2022 13:26:22 +0100 Subject: [PATCH] order of messages fix https://media.discordapp.net/attachments/874713176082636882/934559012991680532/unknown.png --- .../totalfreedommod/command/Command_mute.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java index 0ce530d4..e66c0c73 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_mute.java @@ -130,17 +130,19 @@ public class Command_mute extends FreedomCommand { playerdata.setMuted(true); player.sendTitle(ChatColor.RED + "You've been muted.", ChatColor.YELLOW + "Be sure to follow the rules!", 20, 100, 60); + + if (quiet) + { + msg("Muted " + player.getName() + " quietly"); + return true; // doesn't announce reason + } + + FUtil.adminAction(sender.getName(), "Muting " + player.getName(), true); + if (reason != null) { msg(player, ChatColor.RED + "Reason: " + ChatColor.YELLOW + reason); } - if (quiet) - { - msg("Muted " + player.getName() + " quietly"); - return true; - } - - FUtil.adminAction(sender.getName(), "Muting " + player.getName(), true); if (smite) { @@ -178,4 +180,4 @@ public class Command_mute extends FreedomCommand return Collections.emptyList(); } -} \ No newline at end of file +}