Changed command system (#304)

* Save Cacheable expansions data on shutdown

* Prepare for 1.16

* 1.16.1 is out apparently

* Further fixes, still not done

* Inline JSONMessages & fix for 1.16

* Done :O

* Done for real now, (hopefully)

* Changed to static instead of DI for plugin instance

* Cleanup

* Modified tab completions. Removed extra command.

* Apparently this is needed

* Started cleaning stuff up

basically just pushing so I can continue on laptop

* did more cleaning, probs like half way done

* more cleaning. reverted back to a min arg system somewhat similar to what frosty had, but less boilerplate.

* Started debugging and fixing runtime/compile errors

* Fixed bugs, still needs thorough testing

* Re-enable metrics

* relocated stuff again

* - Remove json message relocation
- uncomment other relocations
- reformat pom
- remove useless scope declaration
- Fix metrics constructor
- Switch commands to use inline json message

Co-authored-by: iGabyTM <contactgabytm@gmail.com>
Co-authored-by: darbyjack <admin@glaremasters.me>
Co-authored-by: PiggyPiglet <noreply@piggypiglet.me>
This commit is contained in:
Frcsty
2020-07-13 21:27:59 +02:00
committed by GitHub
parent 82fa8d7393
commit 3e396a97b0
60 changed files with 4253 additions and 2750 deletions

View File

@@ -24,47 +24,47 @@ import me.clip.placeholderapi.PlaceholderAPIPlugin;
public class PlaceholderAPIConfig {
private final PlaceholderAPIPlugin plugin;
private final PlaceholderAPIPlugin plugin;
public PlaceholderAPIConfig(PlaceholderAPIPlugin i) {
plugin = i;
}
public PlaceholderAPIConfig(PlaceholderAPIPlugin i) {
plugin = i;
}
public void loadDefConfig() {
plugin.saveDefaultConfig();
plugin.reloadConfig();
}
public void loadDefConfig() {
plugin.saveDefaultConfig();
plugin.reloadConfig();
}
public boolean checkUpdates() {
return plugin.getConfig().getBoolean("check_updates");
}
public boolean checkUpdates() {
return plugin.getConfig().getBoolean("check_updates");
}
public boolean cloudAllowUnverifiedExpansions() {
return plugin.getConfig().getBoolean("cloud_allow_unverified_expansions");
}
public boolean cloudAllowUnverifiedExpansions() {
return plugin.getConfig().getBoolean("cloud_allow_unverified_expansions");
}
public boolean isCloudEnabled() {
return plugin.getConfig().getBoolean("cloud_enabled");
}
public boolean isCloudEnabled() {
return plugin.getConfig().getBoolean("cloud_enabled");
}
public boolean isDebugMode() {
return plugin.getConfig().getBoolean("debug", false);
}
public void setCloudEnabled(boolean b) {
plugin.getConfig().set("cloud_enabled", b);
plugin.reloadConfig();
}
public void setCloudEnabled(boolean b) {
plugin.getConfig().set("cloud_enabled", b);
plugin.reloadConfig();
}
public boolean isDebugMode() {
return plugin.getConfig().getBoolean("debug", false);
}
public String booleanTrue() {
return plugin.getConfig().getString("boolean.true");
}
public String booleanTrue() {
return plugin.getConfig().getString("boolean.true");
}
public String booleanFalse() {
return plugin.getConfig().getString("boolean.false");
}
public String booleanFalse() {
return plugin.getConfig().getString("boolean.false");
}
public String dateFormat() {
return plugin.getConfig().getString("date_format");
}
public String dateFormat() {
return plugin.getConfig().getString("date_format");
}
}