mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +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
+18
No files matched your search
@@ -49,6 +49,7 @@ public class Configuration
|
|||||||
private boolean commandSpam;
|
private boolean commandSpam;
|
||||||
private boolean silentMode;
|
private boolean silentMode;
|
||||||
private boolean opExempt;
|
private boolean opExempt;
|
||||||
|
private boolean trackCreativeXRay;
|
||||||
private int fileLogLevel = 0;
|
private int fileLogLevel = 0;
|
||||||
private int medThreshold = 0;
|
private int medThreshold = 0;
|
||||||
private int highThreshold = 0;
|
private int highThreshold = 0;
|
||||||
@@ -128,6 +129,11 @@ public class Configuration
|
|||||||
return opExempt;
|
return opExempt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean trackCreativeXRay()
|
||||||
|
{
|
||||||
|
return trackCreativeXRay;
|
||||||
|
}
|
||||||
|
|
||||||
public int medThreshold()
|
public int medThreshold()
|
||||||
{
|
{
|
||||||
return medThreshold;
|
return medThreshold;
|
||||||
@@ -171,6 +177,7 @@ public class Configuration
|
|||||||
medThreshold = getInt("Events.Medium threshold", 20);
|
medThreshold = getInt("Events.Medium threshold", 20);
|
||||||
highThreshold = getInt("Events.High threshold", 50);
|
highThreshold = getInt("Events.High threshold", 50);
|
||||||
opExempt = getBoolean("System.Exempt op", false);
|
opExempt = getBoolean("System.Exempt op", false);
|
||||||
|
trackCreativeXRay = getBoolean("XRay.Track creative", true);
|
||||||
|
|
||||||
if (config.getList("Enable in") == null)
|
if (config.getList("Enable in") == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import net.h31ix.anticheat.Anticheat;
|
|||||||
import net.h31ix.anticheat.manage.CheckManager;
|
import net.h31ix.anticheat.manage.CheckManager;
|
||||||
import net.h31ix.anticheat.manage.CheckType;
|
import net.h31ix.anticheat.manage.CheckType;
|
||||||
import net.h31ix.anticheat.util.Configuration;
|
import net.h31ix.anticheat.util.Configuration;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@@ -40,6 +41,13 @@ public class XRayListener implements Listener
|
|||||||
if (config.logXRay())
|
if (config.logXRay())
|
||||||
{
|
{
|
||||||
Player p = event.getPlayer();
|
Player p = event.getPlayer();
|
||||||
|
if(p.getGameMode() == GameMode.CREATIVE)
|
||||||
|
{
|
||||||
|
if(!config.trackCreativeXRay())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
String player = p.getName();
|
String player = p.getName();
|
||||||
if (checkManager.willCheck(p, CheckType.XRAY))
|
if (checkManager.willCheck(p, CheckType.XRAY))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
# Please report any bugs: http://dev.bukkit.org/server-mods/anticheat/
|
# Please report any bugs: http://dev.bukkit.org/server-mods/anticheat/
|
||||||
XRay:
|
XRay:
|
||||||
Log xray stats: true
|
Log xray stats: true
|
||||||
|
# Should a warning be sent to admins when a person is found that could be xraying?
|
||||||
Alert when xray is found: false
|
Alert when xray is found: false
|
||||||
|
# Should players in creative mode be tracked for possible xray usage?
|
||||||
|
Track creative: true
|
||||||
# Events occur when a player's hack level changes. You may configure reactions to these events here.
|
# Events occur when a player's hack level changes. You may configure reactions to these events here.
|
||||||
# Valid events = NONE,WARN,KICK,BAN,COMMAND[command]
|
# Valid events = NONE,WARN,KICK,BAN,COMMAND[command]
|
||||||
# Use commands like so: COMMAND[ban &player 30] or COMMAND[kick &player hacking] or COMMAND[jail &player 10]
|
# Use commands like so: COMMAND[ban &player 30] or COMMAND[kick &player hacking] or COMMAND[jail &player 10]
|
||||||
|
|||||||
Reference in new issue
Block a user