Made skyblock sky again. The sea water level was being set.

This commit is contained in:
Tastybento 2018-01-27 15:48:44 -08:00
parent 475f9b1416
commit 67e05955f8
3 changed files with 86 additions and 77 deletions

View File

@ -94,8 +94,8 @@ public class Settings implements ISettings<Settings> {
private int islandXOffset; private int islandXOffset;
private int islandZOffset; private int islandZOffset;
@ConfigEntry(path = "world.sea-height", specificTo = GameType.ACIDISLAND) @ConfigEntry(path = "world.sea-height")
private int seaHeight = 100; private int seaHeight = 0;
@ConfigEntry(path = "world.island-height") @ConfigEntry(path = "world.island-height")
private int islandHeight = 100; private int islandHeight = 100;

View File

@ -326,6 +326,7 @@ public class FlatFileDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
} }
// Run through all the fields in the class that is being stored. EVERY field must have a get and set method // Run through all the fields in the class that is being stored. EVERY field must have a get and set method
fields:
for (Field field : dataObject.getDeclaredFields()) { for (Field field : dataObject.getDeclaredFields()) {
// Get the property descriptor for this field // Get the property descriptor for this field
@ -340,6 +341,13 @@ public class FlatFileDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
ConfigEntry configEntry = field.getAnnotation(ConfigEntry.class); ConfigEntry configEntry = field.getAnnotation(ConfigEntry.class);
// If there is a config path annotation then do something // If there is a config path annotation then do something
if (configEntry != null) { if (configEntry != null) {
if (DEBUG) {
plugin.getLogger().info("DEBUG: configEntry fould " + configEntry.toString() + " " + configEntry.specificTo());
plugin.getLogger().info("DEBUG: " + field.getName());
}
if (!configEntry.specificTo().equals(GameType.BOTH) && !configEntry.specificTo().equals(Constants.GAMETYPE)) {
continue fields;
}
if (!configEntry.path().isEmpty()) { if (!configEntry.path().isEmpty()) {
storageLocation = configEntry.path(); storageLocation = configEntry.path();
} }
@ -352,8 +360,9 @@ public class FlatFileDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
e.printStackTrace(); e.printStackTrace();
} }
// We are done here // We are done here
continue; continue fields;
} }
} }
//plugin.getLogger().info("DEBUG: property desc = " + propertyDescriptor.getPropertyType().getTypeName()); //plugin.getLogger().info("DEBUG: property desc = " + propertyDescriptor.getPropertyType().getTypeName());
// Depending on the vale type, it'll need serializing differenty // Depending on the vale type, it'll need serializing differenty

View File

@ -20,7 +20,7 @@ import us.tastybento.bskyblock.island.builders.IslandBuilder.IslandType;
* *
*/ */
public class NewIsland { public class NewIsland {
private static final boolean DEBUG = true; private static final boolean DEBUG = false;
private BSkyBlock plugin; private BSkyBlock plugin;
private Island island; private Island island;
private final Player player; private final Player player;