mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 14:38:45 +00:00
Implement new levels system.
This commit is contained in:
1 parent
14ca51bac9
commit
52a90b9bc8
11 files changed
+307
-131
No files matched your search
@@ -97,7 +97,7 @@ public class Anticheat extends JavaPlugin {
|
||||
cleanup();
|
||||
}
|
||||
|
||||
private void save(InputStream in, File file) {
|
||||
private boolean save(InputStream in, File file) {
|
||||
if (!file.exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
try {
|
||||
@@ -115,7 +115,9 @@ public class Anticheat extends JavaPlugin {
|
||||
if (verbose) {
|
||||
getLogger().log(Level.INFO, file.getName() + " created.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void setupXray() {
|
||||
@@ -210,6 +212,7 @@ public class Anticheat extends JavaPlugin {
|
||||
|
||||
private void setupConfig() {
|
||||
config = manager.getConfiguration();
|
||||
config.load();
|
||||
checkConfigs();
|
||||
verbose = config.verboseStartup();
|
||||
if (verbose) {
|
||||
@@ -231,6 +234,9 @@ public class Anticheat extends JavaPlugin {
|
||||
save(getResource("config.yml"), new File(getDataFolder() + "/config.yml"));
|
||||
save(getResource("lang.yml"), new File(getDataFolder() + "/lang.yml"));
|
||||
save(getResource("magic.yml"), new File(getDataFolder() + "/magic.yml"));
|
||||
if(!save(getResource("events.yml"), new File(getDataFolder() + "/events.yml"))) {
|
||||
config.updateEvents();
|
||||
}
|
||||
}
|
||||
|
||||
public static Anticheat getPlugin() {
|
||||
|
||||
Reference in new issue
Block a user