diff --git a/v2-api/allclasses-frame.html b/v2-api/allclasses-frame.html index 4cfabb10a..bbda68e31 100644 --- a/v2-api/allclasses-frame.html +++ b/v2-api/allclasses-frame.html @@ -2,10 +2,10 @@
- +VERSION1_21
3953
public static final int
VERSION1_21_2
4080
static void
getComponents(org.bukkit.inventory.ItemStack item,
+ Consumer<ReadableNBT> consumer)
+static <T> T
getComponents(org.bukkit.inventory.ItemStack item,
+ Function<ReadableNBT,T> function)
+static NBTFileHandle
getFileHandle(File file)
+static <T> T
getPersistentData(org.bukkit.block.BlockState blockState,
Function<ReadableNBT,T> getter)
-static <T> T
getPersistentData(org.bukkit.entity.Entity entity,
Function<ReadableNBT,T> getter)
@@ -216,31 +238,31 @@ static org.bukkit.inventory.ItemStack[]
itemStackArrayFromNBT(ReadableNBT compound)
static ReadWriteNBT
itemStackArrayToNBT(org.bukkit.inventory.ItemStack[] itemStacks)
static org.bukkit.inventory.ItemStack
itemStackFromNBT(ReadableNBT compound)
static ReadWriteNBT
itemStackToNBT(org.bukkit.inventory.ItemStack itemStack)
static <X extends NBTProxy>
void
modify(org.bukkit.block.BlockState blockState,
Class<X> wrapper,
@@ -248,7 +270,7 @@ Method Summary
It takes an block entity and a function to modify the entity via the proxy
static <T,X extends NBTProxy>
T
modify(org.bukkit.block.BlockState blockState,
Class<X> wrapper,
@@ -256,7 +278,7 @@ Method Summary
It takes an block entity and a function to modify the entity via the proxy
static void
modify(org.bukkit.block.BlockState blockState,
Consumer<ReadWriteNBT> consumer)
@@ -265,7 +287,7 @@ static <T> T
modify(org.bukkit.block.BlockState blockState,
Function<ReadWriteNBT,T> function)
@@ -273,7 +295,7 @@ static <X extends NBTProxy>
void
modify(org.bukkit.entity.Entity entity,
Class<X> wrapper,
@@ -281,7 +303,7 @@ Method Summary
It takes an entity and a function to modify the entity via the proxy
static <T,X extends NBTProxy>
T
modify(org.bukkit.entity.Entity entity,
Class<X> wrapper,
@@ -289,7 +311,7 @@ Method Summary
It takes an entity and a function to modify the entity via the proxy
static void
modify(org.bukkit.entity.Entity entity,
Consumer<ReadWriteNBT> consumer)
@@ -297,7 +319,7 @@ static <T> T
modify(org.bukkit.entity.Entity entity,
Function<ReadWriteNBT,T> function)
@@ -305,7 +327,7 @@ static <X extends NBTProxy>
void
modify(org.bukkit.inventory.ItemStack item,
Class<X> wrapper,
@@ -313,7 +335,7 @@ Method Summary
It takes an ItemStack, applies a function to its NBT wrapped in a proxy.
static <T,X extends NBTProxy>
T
modify(org.bukkit.inventory.ItemStack item,
Class<X> wrapper,
@@ -322,7 +344,7 @@ Method Summary
returns the result of the function
static void
modify(org.bukkit.inventory.ItemStack item,
Consumer<ReadWriteItemNBT> consumer)
@@ -330,7 +352,7 @@ static <T> T
modify(org.bukkit.inventory.ItemStack item,
Function<ReadWriteItemNBT,T> function)
@@ -338,7 +360,7 @@ static void
modifyComponents(org.bukkit.inventory.ItemStack item,
Consumer<ReadWriteNBT> consumer)
@@ -346,7 +368,7 @@ static <T> T
modifyComponents(org.bukkit.inventory.ItemStack item,
Function<ReadWriteNBT,T> function)
@@ -354,7 +376,7 @@ static void
modifyPersistentData(org.bukkit.block.BlockState blockState,
Consumer<ReadWriteNBT> consumer)
@@ -362,7 +384,7 @@ static <T> T
modifyPersistentData(org.bukkit.block.BlockState blockState,
Function<ReadWriteNBT,T> function)
@@ -370,7 +392,7 @@ static void
modifyPersistentData(org.bukkit.entity.Entity entity,
Consumer<ReadWriteNBT> consumer)
@@ -378,7 +400,7 @@ static <T> T
modifyPersistentData(org.bukkit.entity.Entity entity,
Function<ReadWriteNBT,T> function)
@@ -386,46 +408,71 @@ static ReadWriteNBT
parseNBT(String nbtString)
static boolean
preloadApi()
static ReadWriteNBT
readFile(File file)
+static <T extends NBTProxy>
T
readNbt(org.bukkit.block.BlockState blockState,
Class<T> wrapper)
static <T extends NBTProxy>
T
readNbt(org.bukkit.entity.Entity entity,
Class<T> wrapper)
static ReadWriteNBT
readNBT(InputStream stream)
+static ReadableNBT
readNbt(org.bukkit.inventory.ItemStack item)
static <T extends NBTProxy>
T
readNbt(org.bukkit.inventory.ItemStack item,
Class<T> wrapper)
static ReadWriteNBT
wrapNMSTag(Object nmsNbtTag)
+static void
writeFile(File file,
+ ReadWriteNBT nbt)
+public static <T> T getPersistentData(org.bukkit.block.BlockState blockState, Function<ReadableNBT,T> getter)-
blockState
- The block state of the block you want to get the data from.item
- The item you want to modify the components ofitem
- The item you want to modify the components ofpublic static void getComponents(org.bukkit.inventory.ItemStack item, + Consumer<ReadableNBT> consumer)+
item
- The item you want to read the components ofconsumer
- The consumer that will be used to read the components.public static <T> T getComponents(org.bukkit.inventory.ItemStack item, + Function<ReadableNBT,T> function)+
item
- The item you want to read the components offunction
- The consumer that will be used to read the components.nbtString
- The NBT string to parse.public static ReadWriteNBT readNBT(InputStream stream)+
stream
- The NBT stream to read.public static ReadWriteNBT wrapNMSTag(Object nmsNbtTag)+
nmsNbtTag
- Needs to be a valid net.minecraft.nbt.CompoundTagpublic static NBTFileHandle getFileHandle(File file) + throws IOException+
file
- IOException
public static ReadWriteNBT readFile(File file) + throws IOException+
+ Returns an empty tag if the file does not exist.
file
- file to readIOException
- exceptionpublic static void writeFile(File file, + ReadWriteNBT nbt) + throws IOException+
+ Will fully override the file if it already exists.
file
- filenbt
- NBT dataIOException
- exceptionNBTCompound
addCompound(ReadWriteNBT comp)
ReadWriteNBT
addCompound(ReadableNBT comp)
+protected Object
public NBTCompound addCompound(ReadWriteNBT comp)+
public ReadWriteNBT addCompound(ReadableNBT comp)+
ReadWriteNBTCompoundList
addCompound
in interface ReadWriteNBTCompoundList
NBTContainer()
-NBTContainer(InputStream inputsteam)
-NBTContainer(Object nbt)
-NBTContainer(String nbtString)
-NBTCompound
.public NBTContainer()+
@Deprecated +public NBTContainer()+
public NBTContainer(Object nbt)+
@Deprecated +public NBTContainer(Object nbt)+
public NBTContainer(InputStream inputsteam)+
@Deprecated +public NBTContainer(InputStream inputsteam)+
public NBTContainer(String nbtString)+
@Deprecated +public NBTContainer(String nbtString)+
NBTCompound
. Can throw a
NbtApiException
in case something goes wrong.public class NBTFile -extends NBTCompound+extends NBTCompound +implements NBTFileHandle
NBTCompound
implementation backed by a File
NBTFile(File file)
-NBTCompound |
-NBTCompoundList.addCompound(ReadWriteNBT comp) |
-
-
protected Object |
NBTCompoundList.asTag(ReadWriteNBT object) |
NBTListCompound |
NBTCompoundList.set(int index,
ReadWriteNBT element) |
static void |
+NBT.writeFile(File file,
+ ReadWriteNBT nbt)
+Saves NBT data to the provided file.
+ |
+
interface |
+NBTFileHandle |
+
+|||||||||||||||||||||||||||||||||||
interface |
ReadWriteItemNBT |
ReadWriteNBT |
-ReadWriteNBT.getCompound(String name) |
+ReadWriteNBTCompoundList.addCompound(ReadableNBT comp)
+Adds a copy of the Compound to the end of the List and returns it.
+ |
||||||||||||||||||||||||||||||||
ReadWriteNBT |
+ReadWriteNBT.getCompound(String name) |
+|||||||||||||||||||||||||||||||||||
ReadWriteNBT |
ReadWriteNBT.getOrCreateCompound(String name)
The same as addCompound, just with a name that better reflects what it does
|
|||||||||||||||||||||||||||||||||||
ReadWriteNBT |
ReadWriteNBTCompoundList.remove(int i)
Removes the element at the specified position in this list
|
|||||||||||||||||||||||||||||||||||
ReadWriteNBT |
ReadWriteNBT.resolveCompound(String key) |
|||||||||||||||||||||||||||||||||||
ReadWriteNBT |
ReadWriteNBT.resolveOrCreateCompound(String key)
Returns the resolved and creates compounds as required.
diff --git a/v2-api/de/tr7zw/changeme/nbtapi/iface/class-use/ReadWriteNBTCompoundList.html b/v2-api/de/tr7zw/changeme/nbtapi/iface/class-use/ReadWriteNBTCompoundList.html
index 61fd98ac2..e1d2895f1 100644
--- a/v2-api/de/tr7zw/changeme/nbtapi/iface/class-use/ReadWriteNBTCompoundList.html
+++ b/v2-api/de/tr7zw/changeme/nbtapi/iface/class-use/ReadWriteNBTCompoundList.html
@@ -2,10 +2,10 @@
-
+
Uses of
+ReadWriteNBT addCompound(ReadableNBT comp) | |||||||||||||||||||||||||||||||||||
static com.mojang.authlib.GameProfile |
NBT.gameProfileFromNBT(ReadableNBT compound)
It takes a NBT compound and returns a GameProfile
|
|||||||||||||||||||||||||||||||||||
static org.bukkit.inventory.ItemStack[] |
NBT.itemStackArrayFromNBT(ReadableNBT compound)
It converts a ReadableNBT object into an array of ItemStacks
|
|||||||||||||||||||||||||||||||||||
static org.bukkit.inventory.ItemStack |
NBT.itemStackFromNBT(ReadableNBT compound)
It converts a ReadableNBT object into an ItemStack
|
|||||||||||||||||||||||||||||||||||
void |
NBTCompound.mergeCompound(ReadableNBT comp) |
static void |
+NBT.getComponents(org.bukkit.inventory.ItemStack item,
+ Consumer<ReadableNBT> consumer)
+It takes an ItemStack and a Consumer<ReadWriteNBT>, and then applies
+ the Consumer to the ItemStacks Components as NBT.
+ |
+
+|||||||||||||||||||||||||||||||||
static <T> T |
+NBT.getComponents(org.bukkit.inventory.ItemStack item,
+ Function<ReadableNBT,T> function)
+It takes an ItemStack and a Consumer<ReadWriteNBT>, and then applies
+ the Consumer to the ItemStacks Components as NBT.
+ |
+|||||||||||||||||||||||||||||||||||
static <T> T |
NBT.getPersistentData(org.bukkit.block.BlockState blockState,
Function<ReadableNBT,T> getter)
-It takes a block entity and a function that takes a ReadableNBT and returns
- a generic type T, and returns the result of the function, applied to the
- block entities persistent data container
+It takes a block entity and a function that takes a ReadableNBT and returns a
+ generic type T, and returns the result of the function, applied to the block
+ entities persistent data container
|
|||||||||||||||||||||||||||||||||||
interface |
-ReadableItemNBT |
+NBTFileHandle |
||||||||||||||||||||||||||||||||||
interface |
-ReadWriteItemNBT |
+ReadableItemNBT |
||||||||||||||||||||||||||||||||||
interface |
+ReadWriteItemNBT |
+|||||||||||||||||||||||||||||||||||
interface |
ReadWriteNBT |
ReadWriteNBT |
+ReadWriteNBTCompoundList.addCompound(ReadableNBT comp)
+Adds a copy of the Compound to the end of the List and returns it.
+ |
+
+|||||||||||||||||||||||||||||||||
T |
NBTHandler.get(ReadableNBT nbt,
String key) |
|||||||||||||||||||||||||||||||||||
void |
ReadWriteNBT.mergeCompound(ReadableNBT comp)
Merges all data from comp into this compound.
diff --git a/v2-api/de/tr7zw/changeme/nbtapi/iface/class-use/ReadableNBTList.html b/v2-api/de/tr7zw/changeme/nbtapi/iface/class-use/ReadableNBTList.html
index ab79386ad..3d9467996 100644
--- a/v2-api/de/tr7zw/changeme/nbtapi/iface/class-use/ReadableNBTList.html
+++ b/v2-api/de/tr7zw/changeme/nbtapi/iface/class-use/ReadableNBTList.html
@@ -2,10 +2,10 @@
-
+
Package de.tr7zw.changeme.nbtapi.iface
NBTHandler<T> |
+NBTFileHandle |
|
ReadableItemNBT |
+NBTHandler<T> |
|
ReadableItemNBT |
+ |
+
NBTHandler |
+NBTFileHandle |
ReadableItemNBT |
+NBTHandler |
ReadableItemNBT |
+ReadableNBT
|
This interface only exposes methods that get data without any changes to the
underlying object.
ReadableNBTList |
ReadWriteItemNBT |
ReadWriteNBT |
ReadWriteNBTCompoundList |
ReadWriteNBTList |
Class Hierarchy
Field Summarystatic int |
+VERSION1_21 |
+static int |
+VERSION1_21_2 |
public static final int VERSION1_21@@ -390,6 +394,19 @@
public static final int VERSION1_21_2+
MC1_21_R1
MC1_7_R4
MC1_21_R2
MC1_8_R3
MC1_7_R4
MC1_9_R1
MC1_8_R3
MC1_9_R2
MC1_9_R1
MC1_9_R2
UNKNOWN
public static final MinecraftVersion MC1_21_R1
public static final MinecraftVersion MC1_21_R2+
NBTCompound
.VERSION1_21
3953
public static final int
VERSION1_21_2
4080
static void
getComponents(org.bukkit.inventory.ItemStack item,
+ Consumer<ReadableNBT> consumer)
+static <T> T
getComponents(org.bukkit.inventory.ItemStack item,
+ Function<ReadableNBT,T> function)
+static NBTFileHandle
getFileHandle(File file)
+static <T> T
getPersistentData(org.bukkit.block.BlockState blockState,
Function<ReadableNBT,T> getter)
-static <T> T
getPersistentData(org.bukkit.entity.Entity entity,
Function<ReadableNBT,T> getter)
@@ -216,31 +238,31 @@ static org.bukkit.inventory.ItemStack[]
itemStackArrayFromNBT(ReadableNBT compound)
static ReadWriteNBT
itemStackArrayToNBT(org.bukkit.inventory.ItemStack[] itemStacks)
static org.bukkit.inventory.ItemStack
itemStackFromNBT(ReadableNBT compound)
static ReadWriteNBT
itemStackToNBT(org.bukkit.inventory.ItemStack itemStack)
static <X extends NBTProxy>
void
modify(org.bukkit.block.BlockState blockState,
Class<X> wrapper,
@@ -248,7 +270,7 @@ Method Summary
It takes an block entity and a function to modify the entity via the proxy
static <T,X extends NBTProxy>
T
modify(org.bukkit.block.BlockState blockState,
Class<X> wrapper,
@@ -256,7 +278,7 @@ Method Summary
It takes an block entity and a function to modify the entity via the proxy
static void
modify(org.bukkit.block.BlockState blockState,
Consumer<ReadWriteNBT> consumer)
@@ -265,7 +287,7 @@ static <T> T
modify(org.bukkit.block.BlockState blockState,
Function<ReadWriteNBT,T> function)
@@ -273,7 +295,7 @@ static <X extends NBTProxy>
void
modify(org.bukkit.entity.Entity entity,
Class<X> wrapper,
@@ -281,7 +303,7 @@ Method Summary
It takes an entity and a function to modify the entity via the proxy
static <T,X extends NBTProxy>
T
modify(org.bukkit.entity.Entity entity,
Class<X> wrapper,
@@ -289,7 +311,7 @@ Method Summary
It takes an entity and a function to modify the entity via the proxy
static void
modify(org.bukkit.entity.Entity entity,
Consumer<ReadWriteNBT> consumer)
@@ -297,7 +319,7 @@ static <T> T
modify(org.bukkit.entity.Entity entity,
Function<ReadWriteNBT,T> function)
@@ -305,7 +327,7 @@ static <X extends NBTProxy>
void
modify(org.bukkit.inventory.ItemStack item,
Class<X> wrapper,
@@ -313,7 +335,7 @@ Method Summary
It takes an ItemStack, applies a function to its NBT wrapped in a proxy.
static <T,X extends NBTProxy>
T
modify(org.bukkit.inventory.ItemStack item,
Class<X> wrapper,
@@ -322,7 +344,7 @@ Method Summary
returns the result of the function
static void
modify(org.bukkit.inventory.ItemStack item,
Consumer<ReadWriteItemNBT> consumer)
@@ -330,7 +352,7 @@ static <T> T
modify(org.bukkit.inventory.ItemStack item,
Function<ReadWriteItemNBT,T> function)
@@ -338,7 +360,7 @@ static void
modifyComponents(org.bukkit.inventory.ItemStack item,
Consumer<ReadWriteNBT> consumer)
@@ -346,7 +368,7 @@ static <T> T
modifyComponents(org.bukkit.inventory.ItemStack item,
Function<ReadWriteNBT,T> function)
@@ -354,7 +376,7 @@ static void
modifyPersistentData(org.bukkit.block.BlockState blockState,
Consumer<ReadWriteNBT> consumer)
@@ -362,7 +384,7 @@ static <T> T
modifyPersistentData(org.bukkit.block.BlockState blockState,
Function<ReadWriteNBT,T> function)
@@ -370,7 +392,7 @@ static void
modifyPersistentData(org.bukkit.entity.Entity entity,
Consumer<ReadWriteNBT> consumer)
@@ -378,7 +400,7 @@ static <T> T
modifyPersistentData(org.bukkit.entity.Entity entity,
Function<ReadWriteNBT,T> function)
@@ -386,46 +408,71 @@ static ReadWriteNBT
parseNBT(String nbtString)
static boolean
preloadApi()
static ReadWriteNBT
readFile(File file)
+static <T extends NBTProxy>
T
readNbt(org.bukkit.block.BlockState blockState,
Class<T> wrapper)
static <T extends NBTProxy>
T
readNbt(org.bukkit.entity.Entity entity,
Class<T> wrapper)
static ReadWriteNBT
readNBT(InputStream stream)
+static ReadableNBT
readNbt(org.bukkit.inventory.ItemStack item)
static <T extends NBTProxy>
T
readNbt(org.bukkit.inventory.ItemStack item,
Class<T> wrapper)
static ReadWriteNBT
wrapNMSTag(Object nmsNbtTag)
+static void
writeFile(File file,
+ ReadWriteNBT nbt)
+public static <T> T getPersistentData(org.bukkit.block.BlockState blockState, Function<ReadableNBT,T> getter)-
blockState
- The block state of the block you want to get the data from.item
- The item you want to modify the components ofitem
- The item you want to modify the components ofpublic static void getComponents(org.bukkit.inventory.ItemStack item, + Consumer<ReadableNBT> consumer)+
item
- The item you want to read the components ofconsumer
- The consumer that will be used to read the components.public static <T> T getComponents(org.bukkit.inventory.ItemStack item, + Function<ReadableNBT,T> function)+
item
- The item you want to read the components offunction
- The consumer that will be used to read the components.nbtString
- The NBT string to parse.public static ReadWriteNBT readNBT(InputStream stream)+
stream
- The NBT stream to read.public static ReadWriteNBT wrapNMSTag(Object nmsNbtTag)+
nmsNbtTag
- Needs to be a valid net.minecraft.nbt.CompoundTagpublic static NBTFileHandle getFileHandle(File file) + throws IOException+
file
- IOException
public static ReadWriteNBT readFile(File file) + throws IOException+
+ Returns an empty tag if the file does not exist.
file
- file to readIOException
- exceptionpublic static void writeFile(File file, + ReadWriteNBT nbt) + throws IOException+
+ Will fully override the file if it already exists.
file
- filenbt
- NBT dataIOException
- exceptionNBTCompound
addCompound(ReadWriteNBT comp)
ReadWriteNBT
addCompound(ReadableNBT comp)
+protected Object
public NBTCompound addCompound(ReadWriteNBT comp)+
public ReadWriteNBT addCompound(ReadableNBT comp)+
ReadWriteNBTCompoundList
addCompound
in interface ReadWriteNBTCompoundList
NBTContainer()
-NBTContainer(InputStream inputsteam)
-NBTContainer(Object nbt)
-NBTContainer(String nbtString)
-NBTCompound
.public NBTContainer()+
@Deprecated +public NBTContainer()+
public NBTContainer(Object nbt)+
@Deprecated +public NBTContainer(Object nbt)+
public NBTContainer(InputStream inputsteam)+
@Deprecated +public NBTContainer(InputStream inputsteam)+
public NBTContainer(String nbtString)+
@Deprecated +public NBTContainer(String nbtString)+
NBTCompound
. Can throw a
NbtApiException
in case something goes wrong.public class NBTFile -extends NBTCompound+extends NBTCompound +implements NBTFileHandle
NBTCompound
implementation backed by a File
NBTFile(File file)
-Modifier and Type | Method and Description | @@ -174,7 +177,9 @@||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
static NBTCompound |
readFrom(File file)
-Reads NBT data from the provided file.
+Deprecated.
+
Use NBT.readFile(file)
+ |
||||||||||||||||||||||||||||||||||
static void |
saveTo(File file,
NBTCompound nbt)
-Saves NBT data to the provided file.
+Deprecated.
+
Use NBT.writeFile(file, nbt)
+ |
||||||||||||||||||||||||||||||||||
NBTCompound |
-NBTCompoundList.addCompound(ReadWriteNBT comp) |
-||||||||||||||||||||||||||||||||||
NBTCompound |
NBTCompound.addCompound(String name)
Creates a subCompound, or returns it if already provided
|
||||||||||||||||||||||||||||||||||
NBTCompound |
NBTCompound.getCompound(String name) |
||||||||||||||||||||||||||||||||||
NBTCompound |
NBTBlock.getData() |
||||||||||||||||||||||||||||||||||
NBTCompound |
NBTCompound.getOrCreateCompound(String name)
The same as addCompound, just with a name that better reflects what it does
|
||||||||||||||||||||||||||||||||||
NBTCompound |
NBTList.getParent() |
||||||||||||||||||||||||||||||||||
NBTCompound |
NBTCompound.getParent() |
||||||||||||||||||||||||||||||||||
NBTCompound |
NBTChunk.getPersistentDataContainer()
Gets the NBTCompound used by spigots PersistentDataAPI.
|
||||||||||||||||||||||||||||||||||
NBTCompound |
-NBTTileEntity.getPersistentDataContainer()
+ | NBTEntity.getPersistentDataContainer()
Gets the NBTCompound used by spigots PersistentDataAPI.
|
|||||||||||||||||||||||||||||||||
NBTCompound |
-NBTEntity.getPersistentDataContainer()
+ | NBTTileEntity.getPersistentDataContainer()
Gets the NBTCompound used by spigots PersistentDataAPI.
|
|||||||||||||||||||||||||||||||||
static NBTCompound |
NBTFile.readFrom(File file)
-Reads NBT data from the provided file.
+Deprecated.
+
Use NBT.readFile(file)
+ |
||||||||||||||||||||||||||||||||||
static NBTCompound |
NBTGameProfile.toNBT(com.mojang.authlib.GameProfile profile)
Deprecated.
@@ -338,7 +336,9 @@ Uses of |
NBTFile.saveTo(File file,
NBTCompound nbt)
-Saves NBT data to the provided file.
+Deprecated.
+
Use NBT.writeFile(file, nbt)
+ |
|||||||||||||||||||||||||||||||||
Modifier and Type | +Method and Description | +
---|---|
File |
+getFile() |
+
void |
+save()
+Saves the data to the file
+ |
+
clearNBT, getCompound, getCompoundList, getDoubleList, getFloatList, getIntArrayList, getIntegerList, getLongList, getOrCreateCompound, getStringList, getUUIDList, mergeCompound, removeKey, resolveCompound, resolveOrCreateCompound, set, setBoolean, setByte, setByteArray, setDouble, setEnum, setFloat, setIntArray, setInteger, setItemStack, setItemStackArray, setLong, setLongArray, setShort, setString, setUUID
get, getBoolean, getByte, getByteArray, getDouble, getEnum, getFloat, getIntArray, getInteger, getItemStack, getItemStackArray, getKeys, getListType, getLong, getLongArray, getOrDefault, getOrNull, getShort, getString, getType, getUUID, hasTag, hasTag, resolveOrDefault, resolveOrNull, toString, writeCompound
void save() + throws IOException+
IOException
File getFile()+
Copyright © 2015–2024 tr7zw. All rights reserved.
+ + diff --git a/v2-plugin/de/tr7zw/nbtapi/iface/NBTHandler.html b/v2-plugin/de/tr7zw/nbtapi/iface/NBTHandler.html index a48a8dbef..21a8099a3 100644 --- a/v2-plugin/de/tr7zw/nbtapi/iface/NBTHandler.html +++ b/v2-plugin/de/tr7zw/nbtapi/iface/NBTHandler.html @@ -2,10 +2,10 @@ - +ReadWriteNBT
addCompound(ReadableNBT comp)
+void
clear()
ReadWriteNBT
remove(int i)
boolean
removeIf(Predicate<? super ReadWriteNBT> pred)
ReadWriteNBT addCompound(ReadableNBT comp)+
comp
- Package | +Description | +
---|---|
de.tr7zw.nbtapi | ++ |
Modifier and Type | +Class and Description | +
---|---|
class |
+NBTFile
+NBTCompound implementation backed by a File |
+
Modifier and Type | +Method and Description | +
---|---|
static NBTFileHandle |
+NBT.getFileHandle(File file)
+Creates a NBTFileHandle that uses @param file to store its data.
+ |
+
Copyright © 2015–2024 tr7zw. All rights reserved.
+ + diff --git a/v2-plugin/de/tr7zw/nbtapi/iface/class-use/NBTHandler.html b/v2-plugin/de/tr7zw/nbtapi/iface/class-use/NBTHandler.html index cd152ccc4..e16acf9f4 100644 --- a/v2-plugin/de/tr7zw/nbtapi/iface/class-use/NBTHandler.html +++ b/v2-plugin/de/tr7zw/nbtapi/iface/class-use/NBTHandler.html @@ -2,10 +2,10 @@ - +ReadWriteNBT
addCompound(ReadableNBT comp)
static ReadWriteNBT
createNBTObject()
static ReadWriteNBT
gameProfileToNBT(com.mojang.authlib.GameProfile profile)
static ReadWriteNBT
itemStackArrayToNBT(org.bukkit.inventory.ItemStack[] itemStacks)
static ReadWriteNBT
itemStackToNBT(org.bukkit.inventory.ItemStack itemStack)
static ReadWriteNBT
parseNBT(String nbtString)
static ReadWriteNBT
readFile(File file)
+static ReadWriteNBT
readNBT(InputStream stream)
+ReadWriteNBT
resolveCompound(String key)
ReadWriteNBT
resolveOrCreateCompound(String key)
static ReadWriteNBT
wrapNMSTag(Object nmsNbtTag)
+NBTCompound |
-NBTCompoundList.addCompound(ReadWriteNBT comp) |
-
protected Object |
NBTCompoundList.asTag(ReadWriteNBT object) |
NBTListCompound |
NBTCompoundList.set(int index,
ReadWriteNBT element) |
static void |
+NBT.writeFile(File file,
+ ReadWriteNBT nbt)
+Saves NBT data to the provided file.
+ |
+
interface |
+NBTFileHandle |
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
interface |
ReadWriteItemNBT |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReadWriteNBT |
-ReadWriteNBT.getCompound(String name) |
+ReadWriteNBTCompoundList.addCompound(ReadableNBT comp)
+Adds a copy of the Compound to the end of the List and returns it.
+ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReadWriteNBT |
+ReadWriteNBT.getCompound(String name) |
+|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReadWriteNBT |
ReadWriteNBT.getOrCreateCompound(String name)
The same as addCompound, just with a name that better reflects what it does
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReadWriteNBT |
ReadWriteNBTCompoundList.remove(int i)
Removes the element at the specified position in this list
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReadWriteNBT |
ReadWriteNBT.resolveCompound(String key) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ReadWriteNBT |
ReadWriteNBT.resolveOrCreateCompound(String key)
Returns the resolved and creates compounds as required.
diff --git a/v2-plugin/de/tr7zw/nbtapi/iface/class-use/ReadWriteNBTCompoundList.html b/v2-plugin/de/tr7zw/nbtapi/iface/class-use/ReadWriteNBTCompoundList.html
index dd0daa14c..4533c4914 100644
--- a/v2-plugin/de/tr7zw/nbtapi/iface/class-use/ReadWriteNBTCompoundList.html
+++ b/v2-plugin/de/tr7zw/nbtapi/iface/class-use/ReadWriteNBTCompoundList.html
@@ -2,10 +2,10 @@
-
+
Uses of
|
+ReadWriteNBT NBTCompoundList. |
+addCompound(ReadableNBT comp) |
+static void NBT. |
+getComponents(org.bukkit.inventory.ItemStack item,
+ Consumer<ReadableNBT> consumer)
+It takes an ItemStack and a Consumer<ReadWriteNBT>, and then applies
+ the Consumer to the ItemStacks Components as NBT.
+ |
+static <T> T NBT. |
+getComponents(org.bukkit.inventory.ItemStack item,
+ Function<ReadableNBT,T> function)
+It takes an ItemStack and a Consumer<ReadWriteNBT>, and then applies
+ the Consumer to the ItemStacks Components as NBT.
+static <T> T NBT. |
getPersistentData(org.bukkit.block.BlockState blockState,
Function<ReadableNBT,T> getter)
-It takes a block entity and a function that takes a ReadableNBT and returns
- a generic type T, and returns the result of the function, applied to the
- block entities persistent data container
+It takes a block entity and a function that takes a ReadableNBT and returns a
+ generic type T, and returns the result of the function, applied to the block
+ entities persistent data container
Uses of
|
-interface |
+ReadableItemNBT NBTFileHandle |
-interface |
+ReadWriteItemNBT ReadableItemNBT |
+interface |
+ReadWriteItemNBT |
+ReadWriteNBT ReadWriteNBTCompoundList. |
+addCompound(ReadableNBT comp)
+Adds a copy of the Compound to the end of the List and returns it.
+T NBTHandler. |
get(ReadableNBT nbt,
String key) void ReadWriteNBT. | mergeCompound(ReadableNBT comp)
Merges all data from comp into this compound.
diff --git a/v2-plugin/de/tr7zw/nbtapi/iface/class-use/ReadableNBTList.html b/v2-plugin/de/tr7zw/nbtapi/iface/class-use/ReadableNBTList.html
index 7a8e18d15..75853bfec 100644
--- a/v2-plugin/de/tr7zw/nbtapi/iface/class-use/ReadableNBTList.html
+++ b/v2-plugin/de/tr7zw/nbtapi/iface/class-use/ReadableNBTList.html
@@ -2,10 +2,10 @@
-
+
Package de.tr7zw.nbtapi.iface | static com.mojang.authlib.GameProfile |
NBT.gameProfileFromNBT(ReadableNBT compound)
It takes a NBT compound and returns a GameProfile
|
static org.bukkit.inventory.ItemStack[] |
NBT.itemStackArrayFromNBT(ReadableNBT compound)
It converts a ReadableNBT object into an array of ItemStacks
|
static org.bukkit.inventory.ItemStack |
NBT.itemStackFromNBT(ReadableNBT compound)
It converts a ReadableNBT object into an ItemStack
|
void |
NBTCompound.mergeCompound(ReadableNBT comp) |
interface
ReadWriteNBT
static int
VERSION1_21
static int
VERSION1_21_2
public static final int VERSION1_21@@ -390,6 +394,19 @@
public static final int VERSION1_21_2+
MC1_21_R1
MC1_7_R4
MC1_21_R2
MC1_8_R3
MC1_7_R4
MC1_9_R1
MC1_8_R3
MC1_9_R2
MC1_9_R1
MC1_9_R2
UNKNOWN
public static final MinecraftVersion MC1_21_R1
public static final MinecraftVersion MC1_21_R2+
hasTag(String)
insteadNBTCompound.hasTag(String)
insteadNBTCompound
.