Skip to content

Commit

Permalink
Whelp, not setting the permission sure leads to an NPE!
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoenix616 committed May 2, 2016
1 parent 4040202 commit 77a6dce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,7 @@ public boolean checkPermission(ResourcepacksPlayer player, String perm) {
public boolean checkPermission(UUID playerId, String perm) {
ProxiedPlayer proxiedPlayer = getProxy().getPlayer(playerId);
if(proxiedPlayer != null) {
try {
return proxiedPlayer.hasPermission(perm);
} catch(NullPointerException e) {
// Catch an error some BungeePerms version apparently has
return false;
}
return proxiedPlayer.hasPermission(perm);
}
return false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public ResourcePack(String name, String url, String hash, int format, boolean re
}
this.format = format;
this.restricted = restricted;
this.permission = permission;
}

/**
Expand Down

0 comments on commit 77a6dce

Please sign in to comment.