CraftTweakerSavedData
Link to crafttweakersaveddata
Data that is saved and loaded with the world when it is saved and loaded from disk.
Saved Data is only on the server side, so you can only get it from a invalid.
Importing the class
Link to importing-the-class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.world.CraftTweakerSavedData;
Extending SavedData
Link to extending-saveddata
CraftTweakerSavedData extends SavedData. That means all methods available in SavedData are also available in CraftTweakerSavedData
Methods
Link to methods
Name: getData
Return Type: MapData
ZenScript Copy// CraftTweakerSavedData.getData() as MapData
level.customData.getData();
Name: setData
ZenScript CopyCraftTweakerSavedData.setData(data as MapData)
Parameter | Type |
---|---|
Parameter data | Type MapData |
Name: updateData
ZenScript CopyCraftTweakerSavedData.updateData(data as MapData)
Parameter | Type |
---|---|
Parameter data | Type MapData |
Properties
Link to properties
이름 | Type | Has Getter | Has Setter |
---|---|---|---|
이름 data | Type MapData | Has Getter true | Has Setter true |