Removed useless classes, fixed API issues

This commit is contained in:
Rammelkast committed 2016-05-30 19:49:27 +02:00
1 parent 671329369e
commit bd01cc376a
3 files changed
+9 -58

No files matched your search

@@ -44,8 +44,8 @@ public class AntiCheatAPI {
*
* @param type Check to start watching for
*/
public static void activateCheck(CheckType type) {
chk.activateCheck(type, getCallingClass());
public static void activateCheck(CheckType type, Class caller) {
chk.activateCheck(type, caller.getName());
}
/**
@@ -53,8 +53,8 @@ public class AntiCheatAPI {
*
* @param type Check to stop watching for
*/
public static void deactivateCheck(CheckType type) {
chk.deactivateCheck(type, getCallingClass());
public static void deactivateCheck(CheckType type, Class caller) {
chk.deactivateCheck(type, caller.getName());
}
/**
@@ -73,8 +73,8 @@ public class AntiCheatAPI {
* @param player Player to stop watching
* @param type Check to stop watching for
*/
public static void exemptPlayer(Player player, CheckType type) {
chk.exemptPlayer(player, type, getCallingClass());
public static void exemptPlayer(Player player, CheckType type, Class caller) {
chk.exemptPlayer(player, type, caller.getName());
}
/**
@@ -83,8 +83,8 @@ public class AntiCheatAPI {
* @param player Player to start watching
* @param type Check to start watching for
*/
public static void unexemptPlayer(Player player, CheckType type) {
chk.unexemptPlayer(player, type, getCallingClass());
public static void unexemptPlayer(Player player, CheckType type, Class caller) {
chk.unexemptPlayer(player, type, caller.getName());
}
/**
@@ -176,7 +176,5 @@ public class AntiCheatAPI {
return AntiCheat.getManager();
}
private static String getCallingClass() {
return sun.reflect.Reflection.getCallerClass(2).getName();
}
}
@@ -42,7 +42,6 @@ public class CommandHandler implements CommandExecutor {
public CommandHandler() {
commands.add(new CommandHelp());
//commands.add(new CommandCalibrate());
commands.add(new CommandCheck());
commands.add(new CommandDebug());
commands.add(new CommandDeveloper());
@@ -1,46 +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.AntiCheat;
import net.gravitydevelopment.anticheat.command.CommandBase;
import net.gravitydevelopment.anticheat.util.Calibrator;
import net.gravitydevelopment.anticheat.util.Permission;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CommandCalibrate extends CommandBase {
private static final String NAME = "AntiCheat Calibration";
private static final String COMMAND = "calibrate";
private static final String USAGE = "anticheat calibrate";
private static final Permission PERMISSION = Permission.SYSTEM_CALIBRATE;
private static final String[] HELP = {
GRAY + "Use: " + AQUA + "/anticheat calibrate" + GRAY + " to calibrate AntiCheat settings",
};
public CommandCalibrate() {
super(NAME, COMMAND, USAGE, HELP, PERMISSION);
}
@Override
protected void execute(CommandSender cs, String[] args) {
Calibrator c = new Calibrator(AntiCheat.getPlugin(), (Player) cs);
}
}