Change punishment from kicking to muting on spam (FS-97) (#45)

This commit is contained in:
Nathan Curran
2021-04-22 21:54:29 +10:00
committed by GitHub
parent 2cdf1e66a6
commit b9f7ab3ec3
4 changed files with 31 additions and 24 deletions

View File

@ -289,7 +289,7 @@ public class FPlayer
return unmuteTask != null;
}
public void setMuted(boolean muted)
public void setMuted(boolean muted, int minutes)
{
FUtil.cancel(unmuteTask);
plugin.mu.MUTED_PLAYERS.remove(getPlayer().getName());
@ -324,7 +324,12 @@ public class FPlayer
plugin.mu.MUTED_PLAYERS.remove(getName());
}
}
}.runTaskLater(plugin, AUTO_PURGE_TICKS);
}.runTaskLater(plugin, minutes * (60L * 20L));
}
public void setMuted(boolean muted)
{
setMuted(muted, 5);
}
public BukkitTask getLockupScheduleID()