public class NBTFile extends NBTCompound implements NBTFileHandle
NBTCompound
implementation backed by a File
Constructor and Description |
---|
NBTFile(File file)
Deprecated.
Use NBT.getFileHandle(file)
|
Modifier and Type | Method and Description |
---|---|
Object |
getCompound() |
File |
getFile() |
static NBTCompound |
readFrom(File file)
Deprecated.
Use NBT.readFile(file)
|
void |
save()
Saves the data to the file
|
static void |
saveTo(File file,
NBTCompound nbt)
Deprecated.
Use NBT.writeFile(file, nbt)
|
protected void |
setCompound(Object compound) |
addCompound, asNBTString, clearNBT, equals, get, getBoolean, getByte, getByteArray, getCompound, getCompoundList, getDouble, getDoubleList, getEnum, getFloat, getFloatList, getIntArray, getIntArrayList, getInteger, getIntegerList, getItemStack, getItemStackArray, getKeys, getListType, getLong, getLongArray, getLongList, getName, getObject, getOrCreateCompound, getOrDefault, getOrNull, getParent, getReadLock, getResolvedObject, getShort, getString, getStringList, getType, getUUID, getUUIDList, getWriteLock, hashCode, hasKey, hasTag, isClosed, isReadOnly, mergeCompound, mergeCompound, removeKey, resolveCompound, resolveOrCreateCompound, resolveOrDefault, resolveOrNull, saveCompound, set, set, setBoolean, setByte, setByteArray, setClosed, setDouble, setEnum, setFloat, setIntArray, setInteger, setItemStack, setItemStackArray, setLong, setLongArray, setObject, setResolvedObject, setShort, setString, setUUID, toString, toString, writeCompound
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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
@Deprecated public NBTFile(File file) throws IOException
file
- IOException
public void save() throws IOException
save
in interface NBTFileHandle
IOException
public File getFile()
getFile
in interface NBTFileHandle
public Object getCompound()
getCompound
in class NBTCompound
protected void setCompound(Object compound)
setCompound
in class NBTCompound
@Deprecated public static NBTCompound readFrom(File file) throws IOException
Returns empty NBTContainer if file does not exist.
file
- file to readIOException
- exception@Deprecated public static void saveTo(File file, NBTCompound nbt) throws IOException
Will fully override the file if it already exists.
file
- filenbt
- NBT dataIOException
- exceptionCopyright © 2015–2024 tr7zw. All rights reserved.