mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
More chat fix bugs
This commit is contained in:
1 parent
58bd065360
commit
33d0188a9e
3 files changed
+7
-18
No files matched your search
@@ -1,6 +1,5 @@
|
||||
package net.h31ix.anticheat;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
public class Language
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
|
||||
@@ -685,12 +685,12 @@ public class Backend
|
||||
String name = player.getName();
|
||||
if(chatLevel.get(name) == null)
|
||||
{
|
||||
logEventNoCheck(chatLevel,player,1,CHAT_MIN);
|
||||
logEvent(chatLevel,player,1,CHAT_MIN);
|
||||
}
|
||||
else
|
||||
{
|
||||
int amount = chatLevel.get(name)+1;
|
||||
chatLevel.put(name, amount);
|
||||
logEvent(chatLevel,player,amount,CHAT_MIN);
|
||||
checkChatLevel(player, amount);
|
||||
}
|
||||
}
|
||||
@@ -939,22 +939,13 @@ public class Backend
|
||||
{
|
||||
map.remove(player.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
//Don't remove this, for some reason it's fixing chat bugs.
|
||||
}
|
||||
}
|
||||
}, time);
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
private void logEventNoCheck(@SuppressWarnings("rawtypes") final Map map, final Player player, final Object obj, long time)
|
||||
{
|
||||
map.put(player.getName(),obj);
|
||||
micromanage.getPlugin().getServer().getScheduler().scheduleSyncDelayedTask(micromanage.getPlugin(), new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
map.remove(player.getName());
|
||||
}
|
||||
}, time);
|
||||
}
|
||||
}
|
||||
private void checkChatLevel(Player player, int amount)
|
||||
{
|
||||
if(amount >= CHAT_WARN_LEVEL)
|
||||
|
||||
Reference in new issue
Block a user