World Metadata

Hello
Is there a way to store a data directly in world?
I can only see offer() method for one block, but not for the whole world (Api v7)

WorldProperties has methods get/setPropertySection for storing data on the world.

1 Like

What do i need to pass to this methods? I have a key and DataManipulator which i can use on players (.offer() accepts them), but what do i need to do for DataView?

setPropertySection(MyKeys.KEY.getQuery(), ???)

or i can just pass all the data object with

setPropertySection(DataQuery.of("any string?"), data.toContainer())

?

You pass the DataView that you want to store. If that happens to be the toContainer output of a manipulator, then store that. And this is global data so your key should probably be your plugin id.

1 Like