mirror of
https://github.com/plexusorg/Module-LibsDisguises.git
synced 2024-10-31 20:09:17 +00:00
Add support for permissions
This commit is contained in:
parent
c1d7d7812f
commit
e5f7370853
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue