From 5d96ceb41ee7b1eeaca90456906bd6a58b0e576f Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Thu, 10 Dec 2015 19:20:11 -0500 Subject: [PATCH] Let owner+ disguise as staff - easy way to check a player's rank --- .../src/mineplex/hub/commands/DisguiseCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/commands/DisguiseCommand.java b/Plugins/Mineplex.Hub/src/mineplex/hub/commands/DisguiseCommand.java index cc55696c8..4f7e3aa8e 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/commands/DisguiseCommand.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/commands/DisguiseCommand.java @@ -111,6 +111,8 @@ public class DisguiseCommand extends CommandBase implements Listener return; } + final Rank rank = Plugin.GetClients().Get(caller).GetRank(); + Bukkit.getServer().getScheduler().runTaskAsynchronously(Plugin.getPlugin(), new Runnable() { @Override @@ -162,7 +164,7 @@ public class DisguiseCommand extends CommandBase implements Listener otherRank = other.GetRank(); } catch(NullPointerException exception) {} - if(otherRank.has(Rank.TWITCH)) + if(otherRank.has(Rank.TWITCH) && !rank.has(Rank.OWNER)) { UtilPlayer.message(caller, C.cRed + C.Bold + "You can't disguise as staff!"); return;