Added Expose for GSON saving
This commit is contained in:
parent
f079140c6f
commit
ad80d32a58
|
@ -7,8 +7,12 @@ import org.bukkit.Location;
|
|||
import org.bukkit.World;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import world.bentobox.bentobox.database.objects.DataObject;
|
||||
import world.bentobox.bentobox.database.objects.adapters.Adapter;
|
||||
import world.bentobox.greenhouses.data.adapters.BiomeRecipeAdapter;
|
||||
import world.bentobox.greenhouses.data.adapters.RectangleAdapter;
|
||||
import world.bentobox.greenhouses.greenhouse.BiomeRecipe;
|
||||
import world.bentobox.greenhouses.greenhouse.Walls;
|
||||
|
||||
|
@ -30,15 +34,23 @@ public class Greenhouse implements DataObject {
|
|||
+ ", broken=" + broken + "]";
|
||||
}
|
||||
|
||||
@Expose
|
||||
private String uniqueId = UUID.randomUUID().toString();
|
||||
@Expose
|
||||
private Location location;
|
||||
@Adapter(RectangleSerializer.class)
|
||||
@Expose
|
||||
@Adapter(RectangleAdapter.class)
|
||||
private Rectangle footprint;
|
||||
@Expose
|
||||
private int ceilingHeight;
|
||||
@Expose
|
||||
private Biome originalBiome;
|
||||
@Expose
|
||||
private Location roofHopperLocation;
|
||||
@Adapter(BiomeRecipeSerializer.class)
|
||||
@Expose
|
||||
@Adapter(BiomeRecipeAdapter.class)
|
||||
private BiomeRecipe biomeRecipe;
|
||||
|
||||
private boolean broken;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package world.bentobox.greenhouses.data;
|
||||
package world.bentobox.greenhouses.data.adapters;
|
||||
|
||||
import world.bentobox.bentobox.database.objects.adapters.AdapterInterface;
|
||||
import world.bentobox.greenhouses.greenhouse.BiomeRecipe;
|
||||
|
@ -8,7 +8,7 @@ import world.bentobox.greenhouses.managers.RecipeManager;
|
|||
* @author tastybento
|
||||
*
|
||||
*/
|
||||
public class BiomeRecipeSerializer implements AdapterInterface<BiomeRecipe, String> {
|
||||
public class BiomeRecipeAdapter implements AdapterInterface<BiomeRecipe, String> {
|
||||
|
||||
@Override
|
||||
public BiomeRecipe deserialize(Object object) {
|
|
@ -1,4 +1,4 @@
|
|||
package world.bentobox.greenhouses.data;
|
||||
package world.bentobox.greenhouses.data.adapters;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
|
||||
|
@ -8,7 +8,7 @@ import world.bentobox.bentobox.database.objects.adapters.AdapterInterface;
|
|||
* @author tastybento
|
||||
*
|
||||
*/
|
||||
public class RectangleSerializer implements AdapterInterface<Rectangle, String> {
|
||||
public class RectangleAdapter implements AdapterInterface<Rectangle, String> {
|
||||
|
||||
@Override
|
||||
public Rectangle deserialize(Object object) {
|
Loading…
Reference in New Issue