mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Removed outdated and broken xray check
This commit is contained in:
1 parent
eb6372b344
commit
9af31633ea
16 files changed
+33
-478
No files matched your search
@@ -18,24 +18,23 @@
|
||||
|
||||
package net.gravitydevelopment.anticheat.command;
|
||||
|
||||
import net.gravitydevelopment.anticheat.AntiCheat;
|
||||
import net.gravitydevelopment.anticheat.config.Configuration;
|
||||
import net.gravitydevelopment.anticheat.manage.CheckManager;
|
||||
import net.gravitydevelopment.anticheat.manage.UserManager;
|
||||
import net.gravitydevelopment.anticheat.util.Permission;
|
||||
import net.gravitydevelopment.anticheat.xray.XRayTracker;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.gravitydevelopment.anticheat.AntiCheat;
|
||||
import net.gravitydevelopment.anticheat.config.Configuration;
|
||||
import net.gravitydevelopment.anticheat.manage.CheckManager;
|
||||
import net.gravitydevelopment.anticheat.manage.UserManager;
|
||||
import net.gravitydevelopment.anticheat.util.Permission;
|
||||
|
||||
public class CommandBase {
|
||||
|
||||
public static final Configuration CONFIG = AntiCheat.getManager().getConfiguration();
|
||||
public static final UserManager USER_MANAGER = AntiCheat.getManager().getUserManager();
|
||||
public static final CheckManager CHECK_MANAGER = AntiCheat.getManager().getCheckManager();
|
||||
public static final XRayTracker XRAY_TRACKER = AntiCheat.getManager().getXRayTracker();
|
||||
public static final ChatColor RED = ChatColor.RED;
|
||||
public static final ChatColor YELLOW = ChatColor.YELLOW;
|
||||
public static final ChatColor GREEN = ChatColor.GREEN;
|
||||
|
||||
@@ -18,13 +18,23 @@
|
||||
|
||||
package net.gravitydevelopment.anticheat.command;
|
||||
|
||||
import net.gravitydevelopment.anticheat.command.executors.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.gravitydevelopment.anticheat.command.executors.CommandCheck;
|
||||
import net.gravitydevelopment.anticheat.command.executors.CommandDebug;
|
||||
import net.gravitydevelopment.anticheat.command.executors.CommandDeveloper;
|
||||
import net.gravitydevelopment.anticheat.command.executors.CommandHelp;
|
||||
import net.gravitydevelopment.anticheat.command.executors.CommandLog;
|
||||
import net.gravitydevelopment.anticheat.command.executors.CommandReload;
|
||||
import net.gravitydevelopment.anticheat.command.executors.CommandReport;
|
||||
import net.gravitydevelopment.anticheat.command.executors.CommandReset;
|
||||
import net.gravitydevelopment.anticheat.command.executors.CommandSpy;
|
||||
import net.gravitydevelopment.anticheat.command.executors.CommandUpdate;
|
||||
|
||||
public class CommandHandler implements CommandExecutor {
|
||||
|
||||
@@ -42,7 +52,6 @@ public class CommandHandler implements CommandExecutor {
|
||||
commands.add(new CommandReset());
|
||||
commands.add(new CommandSpy());
|
||||
commands.add(new CommandUpdate());
|
||||
commands.add(new CommandXray());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,7 +37,6 @@ public class CommandHelp extends CommandBase {
|
||||
GRAY + "/anti " + AQUA + "log " + GOLD + "[file/console] [on/off]",
|
||||
GRAY + "/anti " + AQUA + "report " + GOLD + "[group/user]",
|
||||
GRAY + "/anti " + AQUA + "reset " + GOLD + "[user]",
|
||||
GRAY + "/anti " + AQUA + "xray " + GOLD + "[user]",
|
||||
GRAY + "/anti " + AQUA + "spy " + GOLD + "[user]",
|
||||
};
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ public class CommandReset extends CommandBase {
|
||||
User user = USER_MANAGER.getUser(args[0]);
|
||||
if (user != null) {
|
||||
user.resetLevel();
|
||||
XRAY_TRACKER.reset(args[0]);
|
||||
user.clearMessages();
|
||||
AntiCheat.getManager().getBackend().resetChatLevel(user);
|
||||
cs.sendMessage(args[0] + GREEN + " has been reset.");
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* AntiCheat for Bukkit.
|
||||
* Copyright (C) 2012-2014 AntiCheat Team | http://gravitydevelopment.net
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.gravitydevelopment.anticheat.command.executors;
|
||||
|
||||
import net.gravitydevelopment.anticheat.command.CommandBase;
|
||||
import net.gravitydevelopment.anticheat.util.Permission;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandXray extends CommandBase {
|
||||
|
||||
private static final String NAME = "AntiCheat XRAY Stats";
|
||||
private static final String COMMAND = "xray";
|
||||
private static final String USAGE = "anticheat xray [user]";
|
||||
private static final Permission PERMISSION = Permission.SYSTEM_XRAY;
|
||||
private static final String[] HELP = {
|
||||
GRAY + "Use: " + AQUA + "/anticheat xray [user]" + GRAY + " to view xray statistics for a user",
|
||||
};
|
||||
|
||||
public CommandXray() {
|
||||
super(NAME, COMMAND, USAGE, HELP, PERMISSION);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
if (CONFIG.getConfig().checkXRay.getValue()) {
|
||||
Player player = Bukkit.getPlayer(args[0]);
|
||||
if (player != null) {
|
||||
if (XRAY_TRACKER.sufficientData(player.getName())) {
|
||||
XRAY_TRACKER.sendStats(cs, player.getName());
|
||||
} else {
|
||||
cs.sendMessage(RED + "Insufficient data collected from " + WHITE + args[0] + RED + ".");
|
||||
cs.sendMessage(RED + "Please wait until more info is collected before predictions are calculated.");
|
||||
}
|
||||
} else if (XRAY_TRACKER.sufficientData(args[0])) {
|
||||
XRAY_TRACKER.sendStats(cs, args[1]);
|
||||
} else {
|
||||
cs.sendMessage(RED + "Insufficient data collected from " + WHITE + args[0] + RED + ".");
|
||||
cs.sendMessage(RED + "Please wait until more info is collected before predictions are calculated.");
|
||||
}
|
||||
} else {
|
||||
cs.sendMessage(RED + "XRay logging is off in the config.");
|
||||
}
|
||||
} else {
|
||||
sendHelp(cs);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user