Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package au.id.rleach.testdata;
- import org.spongepowered.api.data.DataContainer;
- import org.spongepowered.api.data.DataQuery;
- import org.spongepowered.api.data.DataSerializable;
- import org.spongepowered.api.data.MemoryDataContainer;
- import org.spongepowered.api.data.Queries;
- import org.spongepowered.api.world.Location;
- import org.spongepowered.api.world.World;
- public class Home implements DataSerializable {
- static final DataQuery LOCATION = DataQuery.of("location");
- Location<World> location;
- public Home(Location<World> out) {
- this.location = out;
- }
- @Override public int getContentVersion() {
- return 1;
- }
- @Override public DataContainer toContainer() {
- final DataContainer container = new MemoryDataContainer();
- container.set(Queries.CONTENT_VERSION, getContentVersion());
- container.set(LOCATION, location.toContainer());
- return container;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement