Let owner+ disguise as staff - easy way to check a player's rank

This commit is contained in:
Shaun Bennett 2015-12-10 19:20:11 -05:00
parent 7b4f5d5b75
commit 5d96ceb41e

View File

@ -111,6 +111,8 @@ public class DisguiseCommand extends CommandBase<HubManager> 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<HubManager> 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;