mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 06:28:52 +00:00
Add configuration value for exempting players in creative mode from xray checks
This commit is contained in:
1 parent
bde77cff98
commit
ad690d6976
3 files changed
+35
-17
No files matched your search
@@ -22,6 +22,7 @@ import net.h31ix.anticheat.Anticheat;
|
||||
import net.h31ix.anticheat.manage.CheckManager;
|
||||
import net.h31ix.anticheat.manage.CheckType;
|
||||
import net.h31ix.anticheat.util.Configuration;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@@ -40,6 +41,13 @@ public class XRayListener implements Listener
|
||||
if (config.logXRay())
|
||||
{
|
||||
Player p = event.getPlayer();
|
||||
if(p.getGameMode() == GameMode.CREATIVE)
|
||||
{
|
||||
if(!config.trackCreativeXRay())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
String player = p.getName();
|
||||
if (checkManager.willCheck(p, CheckType.XRAY))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user