Skip to content

Commit

Permalink
fix flag subkey removal bork
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 9, 2020
1 parent c77ad7d commit d297113
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
Expand Up @@ -171,6 +171,7 @@ public void setFlag(String key, ObjectTag value, TimeTag expiration) {
}
if (value == null) {
map.map.remove(new StringHolder(endKey));
setRootMap(splitKey.get(0), rootMap);
}
else {
MapTag resultMap = new MapTag();
Expand Down
Expand Up @@ -50,7 +50,7 @@ public FlagCommand() {
// - LocationTag, for block flags, which will store data in the chunk file.
// - ItemTag, which will store data in the item's NBT.
//
// Most flag sets are handled by <@link command flag>, however items are primarily flagged via <@link mechanism ItemTag.flag>.
// Most flag sets are handled by <@link command flag>, however items are primarily flagged via <@link command inventory> with the 'flag' argument.
// Any supported object type, including the 'server' base tag, can use the tags
// <@link tag FlaggableObject.flag>, <@link tag FlaggableObject.has_flag>, <@link tag FlaggableObject.flag_expiration>, <@link tag FlaggableObject.list_flags>.
//
Expand Down
Expand Up @@ -173,15 +173,6 @@ else if (!scriptEntry.hasObject("action") &&
arg.matches("unload")) {
scriptEntry.addObject("action", new ElementTag("UNLOAD"));
}
else if (!scriptEntry.hasObject("value") &&
arg.matchesPrefix("value")) {
if (arg.matchesArgumentType(ListTag.class)) {
scriptEntry.addObject("value", arg.asType(ListTag.class));
}
else {
scriptEntry.addObject("value", arg.asElement());
}
}
else if (!scriptEntry.hasObject("id") &&
arg.matchesPrefix("id")) {
scriptEntry.addObject("id", arg.asElement());
Expand Down Expand Up @@ -314,11 +305,9 @@ public void execute(final ScriptEntry scriptEntry) {
+ (rawText != null ? rawText.debug() : "")
+ (toId != null ? toId.debug() : ""));
}

// Do action
Action action = Action.valueOf(actionElement.asString().toUpperCase());
final String id = CoreUtilities.toLowerCase(idElement.asString());

if (action != Action.LOAD && action != Action.SAVE && scriptEntry.shouldWaitFor()) {
scriptEntry.setFinished(true);
}
Expand Down

0 comments on commit d297113

Please sign in to comment.