Interface DataNode
public interface DataNode
Platform-independent tree of saved values (the content of one player data record).
Paths use . as separator ("armor_contents.helmet"). Values are plain
YAML/JSON types: String, Number, Boolean, List and nested nodes.
On Bukkit, item stacks saved by the plugin keep the Bukkit serialization format; on Fabric
items are stored as SNBT strings (see PlayerSnapshot.format()).
-
Method Summary
Modifier and TypeMethodDescriptionbooleandefault @NotNull DataNodecopy()static @NotNull DataNodecreate()@Nullable Objectdefault booleangetBoolean(@NotNull String path, boolean def) default doubledefault floatdefault intdefault @Nullable List<?> default long@Nullable DataNode@NotNull DataNodegetOrCreateNode(@NotNull String path) default @Nullable Stringdefault @NotNull Stringkeys()static @Nullable Numberstatic @NotNull DataNodedefault voidvoidtoMap()
-
Method Details
-
create
- Returns:
- a new, empty, mutable node
-
of
-
contains
-
get
-
set
-
remove
-
keys
-
getNode
-
getOrCreateNode
-
getString
-
getString
-
getInt
-
getLong
-
getDouble
-
getFloat
-
getBoolean
-
getList
-
toMap
-
copy
- Returns:
- a deep, independent copy of this node
-
number
-