Skip to content

Commit

Permalink
Add more data to the BiomesIslandDataObject.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Dec 9, 2021
1 parent 94bd3d2 commit 8877680
Showing 1 changed file with 154 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

import com.google.gson.annotations.Expose;

import org.jetbrains.annotations.Nullable;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import world.bentobox.bentobox.database.objects.DataObject;
import world.bentobox.bentobox.database.objects.Table;

Expand Down Expand Up @@ -42,14 +49,158 @@ public void setUniqueId(String uniqueId)
}


// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**
* Gets owner bundle.
*
* @return the owner bundle
*/
@Nullable
public String getOwnerBundle()
{
return ownerBundle;
}


/**
* Sets owner bundle.
*
* @param ownerBundle the owner bundle
*/
public void setOwnerBundle(@Nullable String ownerBundle)
{
this.ownerBundle = ownerBundle;
}


/**
* Gets island bundle.
*
* @return the island bundle
*/
@Nullable
public String getIslandBundle()
{
return islandBundle;
}


/**
* Sets island bundle.
*
* @param islandBundle the island bundle
*/
public void setIslandBundle(@Nullable String islandBundle)
{
this.islandBundle = islandBundle;
}


/**
* Gets unlocked biomes.
*
* @return the unlocked biomes
*/
public Set<String> getUnlockedBiomes()
{
return unlockedBiomes;
}


/**
* Sets unlocked biomes.
*
* @param unlockedBiomes the unlocked biomes
*/
public void setUnlockedBiomes(Set<String> unlockedBiomes)
{
this.unlockedBiomes = unlockedBiomes;
}


/**
* Gets purchased biomes.
*
* @return the purchased biomes
*/
public Set<String> getPurchasedBiomes()
{
return purchasedBiomes;
}


/**
* Sets purchased biomes.
*
* @param purchasedBiomes the purchased biomes
*/
public void setPurchasedBiomes(Set<String> purchasedBiomes)
{
this.purchasedBiomes = purchasedBiomes;
}


/**
* Gets biome change counter.
*
* @return the biome change counter
*/
public Map<String, Integer> getBiomeChangeCounter()
{
return biomeChangeCounter;
}


/**
* Sets biome change counter.
*
* @param biomeChangeCounter the biome change counter
*/
public void setBiomeChangeCounter(Map<String, Integer> biomeChangeCounter)
{
this.biomeChangeCounter = biomeChangeCounter;
}


// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------


/**
* Unique ID of the island.
*/
@Expose
private String uniqueId;

/**
* Stores active bundle.
*/
@Expose
@Nullable
private String ownerBundle = null;

/**
* Stores active bundle.
*/
@Expose
@Nullable
private String islandBundle = null;

/**
* Stores a names of unlocked biomes.
*/
@Expose
private Set<String> unlockedBiomes = new HashSet<>();

/**
* Stores a names of purchased biomes.
*/
@Expose
private Set<String> purchasedBiomes = new HashSet<>();

/**
* Stores map that links biome with how many times it is updated.
*/
@Expose
private Map<String, Integer> biomeChangeCounter = new HashMap<>();
}

0 comments on commit 8877680

Please sign in to comment.