Cleanup handling of empty permissions when migrating data (closes #387)

This commit is contained in:
Luck
2017-07-22 20:04:55 +01:00
Unverified
parent b4aeb04d1b
commit 90afd3c3ed
8 changed files with 46 additions and 25 deletions
@@ -174,10 +174,10 @@ public class MigrationBungeePerms extends SubCommand<Object> {
String prefix = entity.getPrefix();
String suffix = entity.getSuffix();
if (prefix != null && !prefix.equals("")) {
if (prefix != null && !prefix.isEmpty()) {
holder.setPermission(NodeFactory.makePrefixNode(weight, prefix).build());
}
if (suffix != null && !suffix.equals("")) {
if (suffix != null && !suffix.isEmpty()) {
holder.setPermission(NodeFactory.makeSuffixNode(weight, suffix).build());
}
}