From 6de8ed282b4794687947bc0555e299cb084f9a79 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 17 Feb 2023 15:22:05 +0100 Subject: [PATCH] Add usage messsage on no permission --- src/de/steamwar/bungeecore/commands/JoinmeCommand.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/commands/JoinmeCommand.java b/src/de/steamwar/bungeecore/commands/JoinmeCommand.java index 953655d..3b165ca 100644 --- a/src/de/steamwar/bungeecore/commands/JoinmeCommand.java +++ b/src/de/steamwar/bungeecore/commands/JoinmeCommand.java @@ -41,7 +41,10 @@ public class JoinmeCommand extends SWCommand { @Register(description = "JOINME_USAGE") public void genericCommand(ProxiedPlayer player) { - if (!player.hasPermission("bungeecore.joinme")) return; + if (!player.hasPermission("bungeecore.joinme")) { + Message.send("JOINME_USAGE", player); + return; + } Message.broadcast("JOINME_BROADCAST", "JOINME_BROADCAST_HOVER", new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()), player.getName(), player.getServer().getInfo().getName()); }