mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
We shouldn't be storing player objects.
This commit is contained in:
1 parent
21df280f4c
commit
d44df9a7a5
2 files changed
+5
-6
No files matched your search
@@ -23,7 +23,6 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class CheckManager
|
||||
{
|
||||
public AnticheatManager manager = null;
|
||||
private static List<CheckType> checkIgnoreList = new ArrayList<CheckType>();
|
||||
private static Multimap<Player,CheckType> exemptList = ArrayListMultimap.create();
|
||||
private static Multimap<String,CheckType> exemptList = ArrayListMultimap.create();
|
||||
|
||||
public CheckManager(AnticheatManager instance)
|
||||
{
|
||||
@@ -63,21 +63,21 @@ public class CheckManager
|
||||
public void exemptPlayer(Player player, CheckType type)
|
||||
{
|
||||
manager.log(player.getName()+" was exempted from the "+type.toString()+" check.");
|
||||
exemptList.put(player, type);
|
||||
exemptList.put(player.getName(), type);
|
||||
}
|
||||
|
||||
public void unexemptPlayer(Player player, CheckType type)
|
||||
{
|
||||
if(exemptList.containsEntry(player, type))
|
||||
if(exemptList.containsEntry(player.getName(), type))
|
||||
{
|
||||
manager.log(player.getName()+" was re-added to the "+type.toString()+" check.");
|
||||
exemptList.remove(player, type);
|
||||
exemptList.remove(player.getName(), type);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isExempt(Player player, CheckType type)
|
||||
{
|
||||
return exemptList.containsEntry(player, type);
|
||||
return exemptList.containsEntry(player.getName(), type);
|
||||
}
|
||||
|
||||
private boolean hasPermission(Player player, String permission)
|
||||
|
||||
Reference in new issue
Block a user