Fix migrating false zPerms nodes

This commit is contained in:
Luck 2017-05-06 21:06:22 +01:00
parent 7dc41e15d3
commit 4731ad8061
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -150,9 +150,9 @@ public class MigrationZPermissions extends SubCommand<Object> {
private void migrateEntity(PermissionHolder holder, PermissionEntity entity, List<Membership> memberships) {
for (Entry e : entity.getPermissions()) {
if (e.getWorld() != null && !e.getWorld().getName().equals("")) {
holder.setPermission(MigrationUtils.parseNode(e.getPermission(), true).setWorld(e.getWorld().getName()).build());
holder.setPermission(NodeFactory.newBuilder(e.getPermission()).setValue(e.isValue()).setWorld(e.getWorld().getName()).build());
} else {
holder.setPermission(MigrationUtils.parseNode(e.getPermission(), true).build());
holder.setPermission(NodeFactory.newBuilder(e.getPermission()).setValue(e.isValue()).build());
}
}