minor improvements to the spigot-side

This commit is contained in:
ajgeiss0702
2022-08-07 08:33:48 -07:00
parent bcc62c7ef3
commit 26b4f7dc33
2 changed files with 11 additions and 6 deletions
@@ -17,7 +17,7 @@ public class Commands implements CommandExecutor {
@Override @Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) { public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
if(!pl.hasProxy() && pl.config.getBoolean("check-proxy-response")) { if(!pl.hasProxy() && pl.getAConfig().getBoolean("check-proxy-response")) {
sender.sendMessage(color("&cajQueue must also be installed on the proxy!&7 If it has been installed on the proxy, make sure it loaded correctly and try relogging.")); sender.sendMessage(color("&cajQueue must also be installed on the proxy!&7 If it has been installed on the proxy, make sure it loaded correctly and try relogging."));
return true; return true;
} }
@@ -53,7 +53,7 @@ public class Commands implements CommandExecutor {
player = tply; player = tply;
srvname = args[1]; srvname = args[1];
} }
if(pl.config.getBoolean("send-queue-commands-in-batches")) { if(pl.getAConfig().getBoolean("send-queue-commands-in-batches")) {
pl.queuebatch.put(player, srvname); pl.queuebatch.put(player, srvname);
} else { } else {
assert player != null; assert player != null;
@@ -23,12 +23,12 @@ import java.util.HashMap;
@SuppressWarnings("UnstableApiUsage") @SuppressWarnings("UnstableApiUsage")
public class SpigotMain extends JavaPlugin implements PluginMessageListener,Listener { public class SpigotMain extends JavaPlugin implements PluginMessageListener,Listener {
boolean papi = false; private boolean papi = false;
Placeholders placeholders; private Placeholders placeholders;
ConfigFile config; private ConfigFile config;
boolean hasProxy = false; private boolean hasProxy = false;
@SuppressWarnings("ConstantConditions") @SuppressWarnings("ConstantConditions")
public void onEnable() { public void onEnable() {
@@ -242,4 +242,9 @@ public class SpigotMain extends JavaPlugin implements PluginMessageListener,List
} }
e.setMotd("ajQueue;whitelisted="+whitelist); e.setMotd("ajQueue;whitelisted="+whitelist);
} }
public ConfigFile getAConfig() {
return config;
}
} }