mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-24 03:12:45 +00:00
Fix permanent muting option for anti spam mute system
This commit is contained in:
parent
d64de56e6d
commit
b2b1a0ec38
@ -296,8 +296,8 @@ public class ChatListener implements Listener {
|
|||||||
if (dateTimeSeconds < spamtime
|
if (dateTimeSeconds < spamtime
|
||||||
+ plugin.getConfig().getConfigurationSection("antispam").getInt("spamtime")) {
|
+ plugin.getConfig().getConfigurationSection("antispam").getInt("spamtime")) {
|
||||||
if (spamcount + 1 >= spamtimeconfig) {
|
if (spamcount + 1 >= spamtimeconfig) {
|
||||||
mcp.addMute(eventChannel.getName(), dateTime + (mutedForTime * MILLISECONDS_PER_MINUTE));
|
|
||||||
if (mutedForTime > 0) {
|
if (mutedForTime > 0) {
|
||||||
|
mcp.addMute(eventChannel.getName(), dateTime + (mutedForTime * MILLISECONDS_PER_MINUTE));
|
||||||
String units = LocalizedMessage.UNITS_MINUTE_PLURAL.toString();
|
String units = LocalizedMessage.UNITS_MINUTE_PLURAL.toString();
|
||||||
if (mutedForTime == 1) {
|
if (mutedForTime == 1) {
|
||||||
units = LocalizedMessage.UNITS_MINUTE_SINGULAR.toString();
|
units = LocalizedMessage.UNITS_MINUTE_SINGULAR.toString();
|
||||||
@ -309,6 +309,7 @@ public class ChatListener implements Listener {
|
|||||||
.replace("{time}", String.valueOf(mutedForTime)).replace("{units}", units));
|
.replace("{time}", String.valueOf(mutedForTime)).replace("{units}", units));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
mcp.addMute(eventChannel.getName(), 0);
|
||||||
mcp.getPlayer()
|
mcp.getPlayer()
|
||||||
.sendMessage(LocalizedMessage.MUTE_PLAYER_SPAM.toString()
|
.sendMessage(LocalizedMessage.MUTE_PLAYER_SPAM.toString()
|
||||||
.replace("{channel_color}", eventChannel.getColor())
|
.replace("{channel_color}", eventChannel.getColor())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user