Skip to content

Commit

Permalink
Fix BungeeCord specific skin permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
games647 committed Jun 17, 2016
1 parent 66a0a6f commit 455c133
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void applySkin(ProxiedPlayer player, SkinData skinData) {
LoginResult loginResult = new LoginResult(player.getUniqueId().toString(), new Property[]{});
profileField.set(initialHandler, loginResult);
} else {
Property textures = convertToProperty(skinData);
Property textures = convertToProperty(skinData);
Property[] properties = new Property[]{textures};

LoginResult loginResult = new LoginResult(player.getUniqueId().toString(), properties);
Expand Down Expand Up @@ -192,6 +192,14 @@ public ChangeSkinCore getCore() {

public boolean checkPermission(CommandSender invoker, UUID uuid) {
if (invoker.hasPermission(getName().toLowerCase() + ".skin.whitelist." + uuid.toString())) {
return true;
} else if (invoker.hasPermission(getName().toLowerCase() + ".skin.whitelist.*")) {
if (invoker.hasPermission('-' + getName().toLowerCase() + ".skin.whitelist." + uuid.toString())) {
//backlisted explicit
sendMessage(invoker, "no-permission");
return false;
}

return true;
}

Expand Down

0 comments on commit 455c133

Please sign in to comment.