mirror of
https://github.com/plexusorg/Module-LibsDisguises.git
synced 2024-11-24 12:45:00 +00:00
Add support for permissions
This commit is contained in:
parent
c1d7d7812f
commit
e5f7370853
@ -34,9 +34,19 @@ public class DisguiseListener extends PlexListener
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
PlexPlayer plexPlayer = DataUtils.getPlayer(player.getUniqueId());
|
PlexPlayer plexPlayer = DataUtils.getPlayer(player.getUniqueId());
|
||||||
if (!plugin.getRankManager().isAdmin(plexPlayer))
|
if (plugin.getSystem().equalsIgnoreCase("ranks"))
|
||||||
{
|
{
|
||||||
DisguiseAPI.undisguiseToAll(player);
|
if (!plugin.getRankManager().isAdmin(plexPlayer))
|
||||||
|
{
|
||||||
|
DisguiseAPI.undisguiseToAll(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (plugin.getSystem().equalsIgnoreCase("permissions"))
|
||||||
|
{
|
||||||
|
if (!player.hasPermission("plex.libsdisguises.bypass"))
|
||||||
|
{
|
||||||
|
DisguiseAPI.undisguiseToAll(player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user