Ensure plugin reloaders (or /reload) won't work

This commit is contained in:
filoghost 2020-06-26 10:49:06 +02:00
parent f7fc2f2baa
commit 022040c81f

View File

@ -69,11 +69,13 @@ public class ChestCommands extends JavaPlugin {
@Override @Override
public void onEnable() { public void onEnable() {
if (instance != null) { if (instance != null || System.getProperty("ChestCommandsLoaded") != null) {
getLogger().warning("Please do not use /reload or plugin reloaders. Do \"/cc reload\" instead."); getLogger().warning("Please do not use /reload or plugin reloaders. Use the command \"/cc reload\" instead.");
return; return;
} }
System.setProperty("ChestCommandsLoaded", "true");
instance = this; instance = this;
menuManager = new MenuManager(); menuManager = new MenuManager();
settings = new Settings(); settings = new Settings();