mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
A bit of cleanup and made sure liquids won't block interaction
This commit is contained in:
1 parent
a3cdd6a839
commit
0f8d66905d
3 files changed
+17
-9
No files matched your search
@@ -44,7 +44,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||||||
public class Anticheat extends JavaPlugin
|
public class Anticheat extends JavaPlugin
|
||||||
{
|
{
|
||||||
private static AnticheatManager manager;
|
private static AnticheatManager manager;
|
||||||
private final List<Listener> eventList = new ArrayList<Listener>();
|
private static List<Listener> eventList = new ArrayList<Listener>();
|
||||||
private static boolean update = false;
|
private static boolean update = false;
|
||||||
private static final int BYTE_SIZE = 1024;
|
private static final int BYTE_SIZE = 1024;
|
||||||
private static Logger logger;
|
private static Logger logger;
|
||||||
@@ -67,6 +67,7 @@ public class Anticheat extends JavaPlugin
|
|||||||
}
|
}
|
||||||
config.saveLevels();
|
config.saveLevels();
|
||||||
getServer().getScheduler().cancelAllTasks();
|
getServer().getScheduler().cancelAllTasks();
|
||||||
|
cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -380,4 +381,12 @@ public class Anticheat extends JavaPlugin
|
|||||||
{
|
{
|
||||||
return this.getLogger();
|
return this.getLogger();
|
||||||
}
|
}
|
||||||
|
private void cleanup()
|
||||||
|
{
|
||||||
|
this.eventList = null;
|
||||||
|
this.manager = null;
|
||||||
|
this.config = null;
|
||||||
|
this.metrics = null;
|
||||||
|
this.logger = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -18,16 +18,15 @@
|
|||||||
|
|
||||||
package net.h31ix.anticheat;
|
package net.h31ix.anticheat;
|
||||||
|
|
||||||
import net.h31ix.anticheat.util.Configuration;
|
|
||||||
import net.h31ix.anticheat.util.PastebinReport;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.h31ix.anticheat.manage.CheckType;
|
import net.h31ix.anticheat.manage.CheckType;
|
||||||
import net.h31ix.anticheat.util.Permission;
|
|
||||||
import net.h31ix.anticheat.manage.PlayerManager;
|
import net.h31ix.anticheat.manage.PlayerManager;
|
||||||
|
import net.h31ix.anticheat.util.Configuration;
|
||||||
|
import net.h31ix.anticheat.util.PastebinReport;
|
||||||
|
import net.h31ix.anticheat.util.Permission;
|
||||||
import net.h31ix.anticheat.util.Utilities;
|
import net.h31ix.anticheat.util.Utilities;
|
||||||
import net.h31ix.anticheat.xray.XRayTracker;
|
import net.h31ix.anticheat.xray.XRayTracker;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@@ -41,9 +40,9 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
public class CommandHandler implements CommandExecutor
|
public class CommandHandler implements CommandExecutor
|
||||||
{
|
{
|
||||||
private Configuration config = Anticheat.getManager().getConfiguration();
|
private static final Configuration config = Anticheat.getManager().getConfiguration();
|
||||||
private PlayerManager playerManager = Anticheat.getManager().getPlayerManager();
|
private static final PlayerManager playerManager = Anticheat.getManager().getPlayerManager();
|
||||||
private XRayTracker xtracker = Anticheat.getManager().getXRayTracker();
|
private static final XRayTracker xtracker = Anticheat.getManager().getXRayTracker();
|
||||||
private static final ChatColor RED = ChatColor.RED;
|
private static final ChatColor RED = ChatColor.RED;
|
||||||
private static final ChatColor YELLOW = ChatColor.YELLOW;
|
private static final ChatColor YELLOW = ChatColor.YELLOW;
|
||||||
private static final ChatColor GREEN = ChatColor.GREEN;
|
private static final ChatColor GREEN = ChatColor.GREEN;
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ public class Backend
|
|||||||
|
|
||||||
public boolean checkVisuals(Player player, Block targetBlock, Block playerClick)
|
public boolean checkVisuals(Player player, Block targetBlock, Block playerClick)
|
||||||
{
|
{
|
||||||
if (!Utilities.isInteractable(targetBlock.getType()))
|
if (!Utilities.isInteractable(targetBlock.getType()) || playerClick.isLiquid())
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user