if (attachment == null) {
System.err.println("Calculating permissions on " + player.getName() + ": attachment was null");
return;
}
for (String key : attachment.getPermissions().keySet()) {
attachment.unsetPermission(key);
}
// load from the data we have
for (PPackage pack : packages) {
for (PPermission perm : pack.getPermissions()) {
attachment.setPermission(perm.getName().toLowerCase(), perm.isTrue());