mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Improve command system
This commit is contained in:
1 parent
732ac8c78e
commit
706a9df225
15 files changed
+988
-497
No files matched your search
@@ -19,6 +19,7 @@
|
||||
package net.gravitydevelopment.anticheat;
|
||||
|
||||
import com.comphenix.protocol.ProtocolLibrary;
|
||||
import net.gravitydevelopment.anticheat.command.CommandHandler;
|
||||
import net.gravitydevelopment.anticheat.config.Configuration;
|
||||
import net.gravitydevelopment.anticheat.event.*;
|
||||
import net.gravitydevelopment.anticheat.manage.AntiCheatManager;
|
||||
@@ -45,6 +46,7 @@ public class AntiCheat extends JavaPlugin {
|
||||
private static AntiCheat plugin;
|
||||
private static List<Listener> eventList = new ArrayList<Listener>();
|
||||
private static boolean update = false;
|
||||
private static String updateDetails = null;
|
||||
private static Configuration config;
|
||||
private static boolean verbose;
|
||||
private static boolean developer;
|
||||
@@ -156,6 +158,9 @@ public class AntiCheat extends JavaPlugin {
|
||||
Updater updater = new Updater(plugin, PROJECT_ID, file, Updater.UpdateType.DEFAULT, false);
|
||||
update = updater.getResult() == Updater.UpdateResult.SUCCESS;
|
||||
verboseLog("Update available: " + update);
|
||||
if (update) {
|
||||
updateDetails = updater.getLatestName() + " for " + updater.getLatestGameVersion();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -199,6 +204,10 @@ public class AntiCheat extends JavaPlugin {
|
||||
return !update;
|
||||
}
|
||||
|
||||
public static String getUpdateDetails() {
|
||||
return updateDetails;
|
||||
}
|
||||
|
||||
public static String getVersion() {
|
||||
return manager.getPlugin().getDescription().getVersion();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user