mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
More chat fix bugs
This commit is contained in:
1 parent
58bd065360
commit
33d0188a9e
3 files changed
+6
-17
No files matched your search
@@ -1,6 +1,5 @@
|
|||||||
package net.h31ix.anticheat;
|
package net.h31ix.anticheat;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
|
||||||
public class Language
|
public class Language
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import org.bukkit.ChatColor;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.Sign;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
|
|||||||
@@ -685,12 +685,12 @@ public class Backend
|
|||||||
String name = player.getName();
|
String name = player.getName();
|
||||||
if(chatLevel.get(name) == null)
|
if(chatLevel.get(name) == null)
|
||||||
{
|
{
|
||||||
logEventNoCheck(chatLevel,player,1,CHAT_MIN);
|
logEvent(chatLevel,player,1,CHAT_MIN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int amount = chatLevel.get(name)+1;
|
int amount = chatLevel.get(name)+1;
|
||||||
chatLevel.put(name, amount);
|
logEvent(chatLevel,player,amount,CHAT_MIN);
|
||||||
checkChatLevel(player, amount);
|
checkChatLevel(player, amount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -939,19 +939,10 @@ public class Backend
|
|||||||
{
|
{
|
||||||
map.remove(player.getName());
|
map.remove(player.getName());
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
}, time);
|
{
|
||||||
}
|
//Don't remove this, for some reason it's fixing chat bugs.
|
||||||
@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);
|
}, time);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user