Add support for permissions

This commit is contained in:
Telesphoreo 2022-03-18 14:19:50 -05:00
parent c1d7d7812f
commit e5f7370853

View file

@ -34,11 +34,21 @@ public class DisguiseListener extends PlexListener
else else
{ {
PlexPlayer plexPlayer = DataUtils.getPlayer(player.getUniqueId()); PlexPlayer plexPlayer = DataUtils.getPlayer(player.getUniqueId());
if (plugin.getSystem().equalsIgnoreCase("ranks"))
{
if (!plugin.getRankManager().isAdmin(plexPlayer)) if (!plugin.getRankManager().isAdmin(plexPlayer))
{ {
DisguiseAPI.undisguiseToAll(player); DisguiseAPI.undisguiseToAll(player);
} }
} }
else if (plugin.getSystem().equalsIgnoreCase("permissions"))
{
if (!player.hasPermission("plex.libsdisguises.bypass"))
{
DisguiseAPI.undisguiseToAll(player);
}
}
}
} }
} }