2019-01-19 16:52:04 +01:00
|
|
|
package world.bentobox.greenhouses;
|
|
|
|
|
2019-01-22 00:44:01 +01:00
|
|
|
import java.util.ArrayList;
|
2019-01-19 16:52:04 +01:00
|
|
|
import java.util.List;
|
|
|
|
|
2019-01-22 00:44:01 +01:00
|
|
|
import world.bentobox.bentobox.api.configuration.ConfigComment;
|
|
|
|
import world.bentobox.bentobox.api.configuration.ConfigEntry;
|
|
|
|
import world.bentobox.bentobox.api.configuration.StoreAt;
|
|
|
|
import world.bentobox.bentobox.database.objects.DataObject;
|
|
|
|
|
2019-01-19 16:52:04 +01:00
|
|
|
|
|
|
|
/**
|
2019-01-22 00:44:01 +01:00
|
|
|
* @author tastybento
|
2019-01-19 16:52:04 +01:00
|
|
|
* Where all the settings are
|
|
|
|
*/
|
2019-01-22 00:44:01 +01:00
|
|
|
@StoreAt(filename="config.yml", path="addons/Greenhouses") // Explicitly call out what name this should have.
|
|
|
|
@ConfigComment("Greenhouses Configuration [version]")
|
|
|
|
@ConfigComment("")
|
|
|
|
public class Settings implements DataObject {
|
|
|
|
|
2019-01-19 16:52:04 +01:00
|
|
|
// General
|
2019-01-22 00:44:01 +01:00
|
|
|
@ConfigComment("BentoBox GameModes that will use Greenhouses")
|
|
|
|
@ConfigEntry(path = "greenhouses.game-modes")
|
|
|
|
private List<String> gameModes = new ArrayList<>();
|
|
|
|
|
|
|
|
@ConfigComment("Weather and ecosystem settings")
|
|
|
|
@ConfigComment("How often it should snow in the g/h when the weather is raining, in seconds")
|
|
|
|
@ConfigEntry(path = "greenhouses.snowspeed")
|
|
|
|
private double snowSpeed = 30;
|
|
|
|
|
|
|
|
@ConfigComment("Chance of any snow falling in a greenhouse when the snow tick occurs")
|
|
|
|
@ConfigComment("(1.0 = always, 0.0 = never)")
|
|
|
|
@ConfigEntry(path = "greenhouses.snowchance")
|
|
|
|
private double snowChanceGlobal = 1;
|
|
|
|
@ConfigComment("How many blocks should get snow 1 = all of them, 0 = none, 0.1 = 1 in 10")
|
|
|
|
@ConfigEntry(path = "greenhouses.snowdensity")
|
|
|
|
private double snowDensity = 0.1;
|
|
|
|
|
|
|
|
@ConfigComment("Biome activity")
|
|
|
|
@ConfigComment("How often should greenhouse biomes be checked to make sure they are still valid")
|
|
|
|
@ConfigEntry(path = "greenhouses.ecotick")
|
|
|
|
private int ecoTick = 5;
|
|
|
|
@ConfigComment("How often should plants potentially grow in minutes if bonemeal is in the hopper")
|
|
|
|
@ConfigEntry(path = "greenhouses.planttick")
|
|
|
|
private int plantTick = 1;
|
|
|
|
@ConfigComment("How often should blocks potentially convert, in minutes ")
|
|
|
|
@ConfigComment("Example: dirt-> sand in desert greenhouse")
|
|
|
|
@ConfigEntry(path = "greenhouses.blocktick")
|
|
|
|
private int blockTick = 2;
|
|
|
|
@ConfigComment("How often should mobs be potentially spawned in a greenhouse, in minutes")
|
|
|
|
@ConfigEntry(path = "greenhouses.mobtick")
|
|
|
|
private int mobTick = 5;
|
|
|
|
|
|
|
|
|
|
|
|
@ConfigComment("Default settings for greenhouse actions")
|
|
|
|
@ConfigComment("Allow lava or water to flow out of a greenhouse, e.g. through the door, floor")
|
|
|
|
@ConfigEntry(path = "greenhouses.allowflowout")
|
|
|
|
private boolean allowFlowOut;
|
|
|
|
@ConfigComment("Allow lava or water to flow into a greenhouse, e.g., through the door")
|
|
|
|
@ConfigEntry(path = "greenhouses.allowflowin")
|
|
|
|
private boolean allowFlowIn;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getUniqueId() {
|
|
|
|
return "config";
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void setUniqueId(String uniqueId) {}
|
|
|
|
/**
|
|
|
|
* @return the gameModes
|
|
|
|
*/
|
|
|
|
public List<String> getGameModes() {
|
|
|
|
return gameModes;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return the snowSpeed
|
|
|
|
*/
|
|
|
|
public double getSnowSpeed() {
|
|
|
|
return snowSpeed;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return the snowChanceGlobal
|
|
|
|
*/
|
|
|
|
public double getSnowChanceGlobal() {
|
|
|
|
return snowChanceGlobal;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return the snowDensity
|
|
|
|
*/
|
|
|
|
public double getSnowDensity() {
|
|
|
|
return snowDensity;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return the ecoTick
|
|
|
|
*/
|
|
|
|
public int getEcoTick() {
|
|
|
|
return ecoTick;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return the plantTick
|
|
|
|
*/
|
|
|
|
public int getPlantTick() {
|
|
|
|
return plantTick;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return the blockTick
|
|
|
|
*/
|
|
|
|
public int getBlockTick() {
|
|
|
|
return blockTick;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return the mobTick
|
|
|
|
*/
|
|
|
|
public int getMobTick() {
|
|
|
|
return mobTick;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return the allowFlowOut
|
|
|
|
*/
|
|
|
|
public boolean isAllowFlowOut() {
|
|
|
|
return allowFlowOut;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @return the allowFlowIn
|
|
|
|
*/
|
|
|
|
public boolean isAllowFlowIn() {
|
|
|
|
return allowFlowIn;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @param gameModes the gameModes to set
|
|
|
|
*/
|
|
|
|
public void setGameModes(List<String> gameModes) {
|
|
|
|
this.gameModes = gameModes;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @param snowSpeed the snowSpeed to set
|
|
|
|
*/
|
|
|
|
public void setSnowSpeed(double snowSpeed) {
|
|
|
|
this.snowSpeed = snowSpeed;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @param snowChanceGlobal the snowChanceGlobal to set
|
|
|
|
*/
|
|
|
|
public void setSnowChanceGlobal(double snowChanceGlobal) {
|
|
|
|
this.snowChanceGlobal = snowChanceGlobal;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @param snowDensity the snowDensity to set
|
|
|
|
*/
|
|
|
|
public void setSnowDensity(double snowDensity) {
|
|
|
|
this.snowDensity = snowDensity;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @param ecoTick the ecoTick to set
|
|
|
|
*/
|
|
|
|
public void setEcoTick(int ecoTick) {
|
|
|
|
this.ecoTick = ecoTick;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @param plantTick the plantTick to set
|
|
|
|
*/
|
|
|
|
public void setPlantTick(int plantTick) {
|
|
|
|
this.plantTick = plantTick;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @param blockTick the blockTick to set
|
|
|
|
*/
|
|
|
|
public void setBlockTick(int blockTick) {
|
|
|
|
this.blockTick = blockTick;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @param mobTick the mobTick to set
|
|
|
|
*/
|
|
|
|
public void setMobTick(int mobTick) {
|
|
|
|
this.mobTick = mobTick;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @param allowFlowOut the allowFlowOut to set
|
|
|
|
*/
|
|
|
|
public void setAllowFlowOut(boolean allowFlowOut) {
|
|
|
|
this.allowFlowOut = allowFlowOut;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @param allowFlowIn the allowFlowIn to set
|
|
|
|
*/
|
|
|
|
public void setAllowFlowIn(boolean allowFlowIn) {
|
|
|
|
this.allowFlowIn = allowFlowIn;
|
|
|
|
}
|
|
|
|
|
2019-01-19 16:52:04 +01:00
|
|
|
}
|