Add /lmutelist and /lmutehistory commands
- /lmutelist - shows all active mutes with remaining time - /lmutehistory <player> - shows mute history for a player - Added mute history tracking (mute-history.json) - History includes: who muted, when, duration, reason, unmute info - Permissions: lochat.mutelist, lochat.mutehistory
This commit is contained in:
parent
c6175d9d61
commit
d92799613e
7 changed files with 428 additions and 10 deletions
|
|
@ -76,7 +76,8 @@ public class MuteCommand implements CommandExecutor, TabCompleter {
|
|||
}
|
||||
|
||||
// Мутим оффлайн игрока
|
||||
plugin.getMuteManager().mute(offlinePlayer.getUniqueId(), duration, reason, sender.getName());
|
||||
String offlineName = offlinePlayer.getName() != null ? offlinePlayer.getName() : targetName;
|
||||
plugin.getMuteManager().mute(offlinePlayer.getUniqueId(), offlineName, duration, reason, sender.getName());
|
||||
|
||||
String timeDisplay = duration == 0 ? "навсегда" : plugin.getMuteManager().formatTime(duration);
|
||||
sender.sendMessage("§aИгрок §e" + targetName + " §aзамучен на §e" + timeDisplay);
|
||||
|
|
@ -102,7 +103,7 @@ public class MuteCommand implements CommandExecutor, TabCompleter {
|
|||
}
|
||||
|
||||
// Мутим игрока
|
||||
plugin.getMuteManager().mute(target.getUniqueId(), duration, reason, sender.getName());
|
||||
plugin.getMuteManager().mute(target.getUniqueId(), target.getName(), duration, reason, sender.getName());
|
||||
|
||||
String timeDisplay = duration == 0 ? "навсегда" : plugin.getMuteManager().formatTime(duration);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue