From 90dee39068f7c693d9ced05f5d66dcb9794dc638 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Sun, 26 Mar 2023 09:20:43 -0700 Subject: [PATCH] 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) --- .../src/main/java/us/ajg0702/queue/spigot/Commands.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spigot/src/main/java/us/ajg0702/queue/spigot/Commands.java b/spigot/src/main/java/us/ajg0702/queue/spigot/Commands.java index 7acad6d..982ec0a 100644 --- a/spigot/src/main/java/us/ajg0702/queue/spigot/Commands.java +++ b/spigot/src/main/java/us/ajg0702/queue/spigot/Commands.java @@ -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;