mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 14:38:45 +00:00
Disregard teleports when they come from AntiCheat.
This commit is contained in:
1 parent
9e02ac9c1e
commit
a5dfbb67b0
3 files changed
+59
-1
No files matched your search
@@ -0,0 +1,41 @@
|
||||
package net.h31ix.anticheat.manage;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import net.h31ix.anticheat.Anticheat;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class TeleportManager {
|
||||
public Map<Player,Boolean> teleport = new HashMap<Player,Boolean>();
|
||||
Anticheat plugin;
|
||||
|
||||
public TeleportManager(Anticheat plugin)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
public void logTeleport(final Player player)
|
||||
{
|
||||
teleport.put(player, true);
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
teleport.put(player, false);
|
||||
}
|
||||
}, 40L);
|
||||
}
|
||||
|
||||
public boolean didTeleport(Player player)
|
||||
{
|
||||
if(teleport.get(player) == null || teleport.get(player) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user