Package com.viaversion.nbt.tag
Class StringTag
java.lang.Object
com.viaversion.nbt.tag.StringTag
- All Implemented Interfaces:
Tag
A tag containing a string.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the raw string representation of the value of this tag.copy()Returns a copy of this tag.booleanintgetTagId()Returns the NBT tag id of this tag type, used in I/O.getValue()Returns the value of this tag.inthashCode()static StringTagread(DataInput in, TagLimiter tagLimiter) voidSets the value of this tag.toString()voidwrite(DataOutput out) Writes this tag to an output stream.
-
Field Details
-
ID
public static final int ID- See Also:
-
-
Constructor Details
-
StringTag
public StringTag()Creates a tag. -
StringTag
Creates a tag.- Parameters:
value- The value of the tag.
-
-
Method Details
-
read
- Throws:
IOException
-
getValue
Description copied from interface:TagReturns the value of this tag. -
asRawString
Description copied from interface:TagReturns the raw string representation of the value of this tag. For SNBT, useSNBT.serialize(Tag).- Specified by:
asRawStringin interfaceTag- Returns:
- raw string representation of the value of this tag
-
setValue
Sets the value of this tag.- Parameters:
value- New value of this tag.
-
write
Description copied from interface:TagWrites this tag to an output stream.- Specified by:
writein interfaceTag- Parameters:
out- data output to write to- Throws:
IOException- if an I/O error occurs
-
equals
-
hashCode
public int hashCode() -
copy
Description copied from interface:TagReturns a copy of this tag. -
getTagId
public int getTagId()Description copied from interface:TagReturns the NBT tag id of this tag type, used in I/O. -
toString
-