Skip to content

Commit

Permalink
Fix UPlayer.HasPermission
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardosnt committed Feb 14, 2016
1 parent 0b3cfeb commit 58b00a0
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/Api/Unturned/UPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
using System.Linq;
using Essentials.Api.Command;
using Essentials.Api.Command.Source;
using Essentials.Common;
using Essentials.Core;
using Rocket.API;
using Rocket.Core;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Player;
Expand Down Expand Up @@ -188,18 +188,7 @@ public void Teleport( Vector3 pos, float rotation )

public bool HasPermission( string permission )
{
if ( IsAdmin ) return true;

foreach ( var perm in Permissions )
{
if ( permission.EqualsIgnoreCase( perm ) )
return true;

if ( ("!" + permission).EqualsIgnoreCase( perm ) )
return false;
}

return false;
return IsAdmin || RocketPlayer.HasPermission( permission );
}

public void SendMessage( object message, Color color )
Expand Down

0 comments on commit 58b00a0

Please sign in to comment.