Staff with a higher rank can see lower rank and same ranked vanished staff.

This commit is contained in:
Sarah 2015-11-02 04:32:07 +01:00
parent 5c2ade8270
commit da6bf27c77

View File

@ -65,7 +65,7 @@ public class HubVisibilityManager extends MiniPlugin
{
boolean hideMe = Manager.GetTutorial().InTutorial(player) ||
UtilMath.offset2d(player.getLocation(), Manager.GetSpawn()) == 0 ||
Manager.getPreferences().Get(player).Invisibility ||
// Manager.getPreferences().Get(player).Invisibility ||
_hiddenPlayers.contains(player);
for (Player other : UtilServer.getPlayers())
@ -73,6 +73,11 @@ public class HubVisibilityManager extends MiniPlugin
if (player.equals(other))
continue;
if(Manager.getPreferences().Get(player).Invisibility &&
!Manager.GetClients().Get(other).GetRank().has(Manager.GetClients().Get(player).GetRank()))
{
hideMe = true;
}
if (hideMe ||
!Manager.getPreferences().Get(other).ShowPlayers ||
Manager.GetTutorial().InTutorial(other))