diff --git a/src/main/java/net/minestom/server/tag/TagHandler.java b/src/main/java/net/minestom/server/tag/TagHandler.java index 7218e267e..436026da8 100644 --- a/src/main/java/net/minestom/server/tag/TagHandler.java +++ b/src/main/java/net/minestom/server/tag/TagHandler.java @@ -10,12 +10,40 @@ import org.jglrxavpok.hephaistos.nbt.NBTCompoundLike; */ public interface TagHandler extends TagReadable, TagWritable { + /** + * Creates a readable copy of this handler. + *
+ * Similar to {@link #asCompound()} with the advantage that cached objects + * and adaptive optimizations may be reused. + * + * @return a copy of this handler + */ @NotNull TagReadable readableCopy(); + /** + * Creates a copy of this handler. + *
+ * Similar to {@link #fromCompound(NBTCompoundLike)} using {@link #asCompound()} + * with the advantage that cached objects and adaptive optimizations may be reused. + * + * @return a copy of this handler + */ @NotNull TagHandler copy(); + /** + * Updates the content of this handler. + *
+ * Can be used as a clearing method with {@link NBTCompound#EMPTY}. + * + * @param compound the new content of this handler + */ void updateContent(@NotNull NBTCompoundLike compound); + /** + * Converts the content of this handler into a {@link NBTCompound}. + * + * @return a nbt compound representation of this handler + */ @NotNull NBTCompound asCompound(); @ApiStatus.Experimental