Fix group expiry time not being exported (#474)

This commit is contained in:
Luck 2017-09-14 19:10:18 +01:00
parent 67602b8d85
commit 214929e5e5
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -140,12 +140,11 @@ public class NodeFactory {
sb.append("/luckperms ").append(group ? "group " : "user ").append(id).append(" ");
if (node.isGroupNode()) {
if (node.isTemporary()) {
sb.append(set ? "parent addtemp " : "parent removetemp ");
sb.append(node.getGroupName());
} else {
sb.append(set ? "parent add " : "parent remove ");
sb.append(node.getGroupName());
sb.append(node.isTemporary() ? (set ? "parent addtemp " : "parent removetemp ") : (set ? "parent add " : "parent remove "));
sb.append(node.getGroupName());
if (node.isTemporary() && set) {
sb.append(" ").append(node.getExpiryUnixTime());
}
return appendContextToCommand(sb, node).toString();
@ -155,7 +154,6 @@ public class NodeFactory {
ChatMetaType type = node.isPrefix() ? ChatMetaType.PREFIX : ChatMetaType.SUFFIX;
String typeName = type.name().toLowerCase();
sb.append(node.isTemporary() ? (set ? "meta addtemp" + typeName + " " : "meta removetemp" + typeName + " ") : (set ? "meta add" + typeName + " " : "meta remove" + typeName + " "));
sb.append(type.getEntry(node).getKey()).append(" ");