If the proxy check fails, ajQueue will no longer "advertise" itself to players (it will just say "the queue plugin" instead of "ajQueue". It will still say "ajQueue" to players with permissions)

This commit is contained in:
ajgeiss0702
2023-03-26 09:20:43 -07:00
parent ae2886ca9f
commit 90dee39068
@@ -18,7 +18,14 @@ public class Commands implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
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."));
if(sender instanceof Player) pl.sendMessage((Player) sender, "ack", "");
sender.sendMessage(
color(
"&c" +
(sender.hasPermission("ajqueue.manage") ? "ajQueue" : "The queue plugin") +
" must also be installed on the proxy!&7 If it has been installed on the proxy, make sure it loaded correctly and try again."
)
);
return true;
}
Player player = null;