From 402a6be5adb54c68c9800f1585878429c983d8a9 Mon Sep 17 00:00:00 2001 From: Elmon11 Date: Mon, 28 Dec 2020 00:04:57 +0100 Subject: [PATCH 1/2] Make gcmd not work on admins --- .../totalfreedommod/command/Command_gcmd.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java index c0b007e4..7e42a1eb 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java @@ -32,6 +32,12 @@ public class Command_gcmd extends FreedomCommand { return true; } + + if (plugin.al.isAdmin(player)) + { + msg(ChatColor.RED + "You can not use gcmd on admins"); + return true; + } try { @@ -52,4 +58,4 @@ public class Command_gcmd extends FreedomCommand return true; } -} \ No newline at end of file +} From 0c60cbc739dbd82826440f834fedb8b0249c8369 Mon Sep 17 00:00:00 2001 From: Elmon11 Date: Mon, 28 Dec 2020 00:18:05 +0100 Subject: [PATCH 2/2] Update Command_gcmd.java --- .../me/totalfreedom/totalfreedommod/command/Command_gcmd.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java index 7e42a1eb..410fb8b4 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_gcmd.java @@ -3,6 +3,7 @@ package me.totalfreedom.totalfreedommod.command; import me.totalfreedom.totalfreedommod.rank.Rank; import org.apache.commons.lang3.StringUtils; import org.bukkit.command.Command; +import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player;