mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
Fixed chat kick level not rising
This commit is contained in:
1 parent
ad690d6976
commit
246af0b3aa
1 file changed
+4
-5
@@ -116,7 +116,6 @@ public class Backend
|
|||||||
lastMessage.remove(pN);
|
lastMessage.remove(pN);
|
||||||
flightViolation.remove(pN);
|
flightViolation.remove(pN);
|
||||||
chatLevel.remove(pN);
|
chatLevel.remove(pN);
|
||||||
chatKicks.remove(pN);
|
|
||||||
nofallViolation.remove(pN);
|
nofallViolation.remove(pN);
|
||||||
fastBreakViolation.remove(pN);
|
fastBreakViolation.remove(pN);
|
||||||
yAxisViolations.remove(pN);
|
yAxisViolations.remove(pN);
|
||||||
@@ -1125,7 +1124,7 @@ public class Backend
|
|||||||
{
|
{
|
||||||
if (amount >= magic.CHAT_WARN_LEVEL)
|
if (amount >= magic.CHAT_WARN_LEVEL)
|
||||||
{
|
{
|
||||||
player.sendMessage(ChatColor.RED + "Please stop flooding the server!");
|
player.sendMessage(ChatColor.RED + "Stop flooding the server or you will be kicked!");
|
||||||
}
|
}
|
||||||
if (amount >= magic.CHAT_KICK_LEVEL)
|
if (amount >= magic.CHAT_KICK_LEVEL)
|
||||||
{
|
{
|
||||||
@@ -1134,15 +1133,15 @@ public class Backend
|
|||||||
if (chatKicks.get(name) == null || chatKicks.get(name) == 0)
|
if (chatKicks.get(name) == null || chatKicks.get(name) == 0)
|
||||||
{
|
{
|
||||||
kick = 1;
|
kick = 1;
|
||||||
chatKicks.put(name, 1);
|
chatKicks.put(name, kick);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
kick = (int) chatKicks.get(name) + 1;
|
kick = chatKicks.get(name) + 1;
|
||||||
chatKicks.put(name, kick);
|
chatKicks.put(name, kick);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chatKicks.get(name) <= magic.CHAT_BAN_LEVEL)
|
if (kick <= magic.CHAT_BAN_LEVEL)
|
||||||
{
|
{
|
||||||
player.kickPlayer(ChatColor.RED + "Spamming, kick " + kick + "/"+magic.CHAT_BAN_LEVEL);
|
player.kickPlayer(ChatColor.RED + "Spamming, kick " + kick + "/"+magic.CHAT_BAN_LEVEL);
|
||||||
micromanage.getPlugin().getServer().broadcastMessage(ChatColor.RED + player.getName() + " was kicked for spamming.");
|
micromanage.getPlugin().getServer().broadcastMessage(ChatColor.RED + player.getName() + " was kicked for spamming.");
|
||||||
|
|||||||
Reference in new issue
Block a user