Removed GameType in Constants (useless)

This commit is contained in:
Florian CUNY 2018-07-31 18:19:36 +02:00
parent 2210cdc2e8
commit 84515642bf
3 changed files with 0 additions and 21 deletions

View File

@ -5,13 +5,6 @@ package world.bentobox.bentobox;
* @author tastybento
*/
public class Constants {
// ----------------- Constants -----------------
// Game Type BSKYBLOCK or ACIDISLAND
public enum GameType {
BSKYBLOCK, ACIDISLAND, BOTH
}
public static final GameType GAMETYPE = GameType.BSKYBLOCK;
// The spawn command (Essentials spawn for example)
public static final String SPAWNCOMMAND = "spawn";
}

View File

@ -5,11 +5,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import world.bentobox.bentobox.Constants.GameType;
/**
*
*
* @author Poslovitch, tastybento
*/
@Retention(RetentionPolicy.RUNTIME)
@ -21,6 +17,4 @@ public @interface ConfigEntry {
boolean overrideOnChange() default false;
boolean experimental() default false;
boolean needsReset() default false;
GameType specificTo() default GameType.BOTH;
}

View File

@ -28,8 +28,6 @@ import org.bukkit.configuration.MemorySection;
import org.bukkit.configuration.file.YamlConfiguration;
import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.Constants;
import world.bentobox.bentobox.Constants.GameType;
import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.api.configuration.ConfigEntry;
import world.bentobox.bentobox.api.configuration.StoreAt;
@ -127,9 +125,6 @@ public class FlatFileDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
if (!configEntry.path().isEmpty()) {
storageLocation = configEntry.path();
}
if (!configEntry.specificTo().equals(GameType.BOTH) && !configEntry.specificTo().equals(Constants.GAMETYPE)) {
continue;
}
// TODO: Add handling of other ConfigEntry elements
}
Adapter adapterNotation = field.getAnnotation(Adapter.class);
@ -286,9 +281,6 @@ public class FlatFileDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
ConfigEntry configEntry = field.getAnnotation(ConfigEntry.class);
// If there is a config path annotation then do something
if (configEntry != null) {
if (!configEntry.specificTo().equals(GameType.BOTH) && !configEntry.specificTo().equals(Constants.GAMETYPE)) {
continue;
}
if (!configEntry.path().isEmpty()) {
storageLocation = configEntry.path();
}