mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-29 03:36:42 +00:00
Resolves FS-318 by rewriting the /mute command
This has the fortunate side-effect of also fixing several bugs present in the original command.
This commit is contained in:
@ -294,7 +294,6 @@ public class FPlayer
|
||||
public void setMuted(boolean muted, int minutes)
|
||||
{
|
||||
FUtil.cancel(unmuteTask);
|
||||
plugin.mu.MUTED_PLAYERS.remove(getPlayer().getName());
|
||||
unmuteTask = null;
|
||||
|
||||
if (!muted)
|
||||
@ -307,8 +306,6 @@ public class FPlayer
|
||||
return;
|
||||
}
|
||||
|
||||
plugin.mu.MUTED_PLAYERS.add(getPlayer().getName());
|
||||
|
||||
// TODO: Simplify this into a Consumer<BukkitTask> lambda?
|
||||
unmuteTask = new BukkitRunnable()
|
||||
{
|
||||
@ -323,7 +320,6 @@ public class FPlayer
|
||||
else
|
||||
{
|
||||
FUtil.adminAction(ConfigEntry.SERVER_NAME.getString(), "Unmuting " + getName(), false);
|
||||
plugin.mu.MUTED_PLAYERS.remove(getName());
|
||||
}
|
||||
}
|
||||
}.runTaskLater(plugin, minutes * (60L * 20L));
|
||||
|
Reference in New Issue
Block a user