Skip to content

Commit

Permalink
add flag reserved key warning
Browse files Browse the repository at this point in the history
and document worldtag flags
  • Loading branch information
mcmonkey4eva committed Feb 8, 2021
1 parent 349f2d4 commit df16195
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -49,6 +49,7 @@ public FlagCommand() {
// - EntityTag, which will store data in the entity's NBT in the world file.
// - LocationTag, for block flags, which will store data in the chunk file.
// - ItemTag, which will store data in the item's NBT.
// - WorldTag, which will store in the world folder in a file named 'denizen_flags.dat', like "server/world/denizen_flags.dat"
//
// 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
Expand Down Expand Up @@ -174,6 +175,9 @@ public ObjectTag getValueAt(String keyName) {

@Override
public void setValueAt(String keyName, ObjectTag value) {
if (keyName.startsWith("__")) {
Debug.echoError("Assigning flag value to reserved '__' namespace (key: '" + keyName + "')");
}
tracker.setFlag(keyName, value, expiration);
}
}
Expand Down

0 comments on commit df16195

Please sign in to comment.