Uses ConfigObject instead of DatabaseObject for config file.

This commit is contained in:
tastybento 2019-05-07 17:37:50 -07:00 committed by tastybento
parent 684b17cc34
commit a5ff39cbec
2 changed files with 10 additions and 34 deletions

View File

@ -6,7 +6,7 @@
<groupId>world.bentobox</groupId> <groupId>world.bentobox</groupId>
<artifactId>warps</artifactId> <artifactId>warps</artifactId>
<version>1.4.0</version> <version>1.4.1</version>
<name>WelcomeWarpSigns</name> <name>WelcomeWarpSigns</name>
<description>WelcomeWarpSigns is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like ASkyBlock or AcidIsland.</description> <description>WelcomeWarpSigns is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like ASkyBlock or AcidIsland.</description>
@ -95,7 +95,7 @@
<dependency> <dependency>
<groupId>world.bentobox</groupId> <groupId>world.bentobox</groupId>
<artifactId>bentobox</artifactId> <artifactId>bentobox</artifactId>
<version>1.4.0</version> <version>1.5.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>world.bentobox</groupId> <groupId>world.bentobox</groupId>

View File

@ -5,8 +5,8 @@ import java.util.Set;
import world.bentobox.bentobox.api.configuration.ConfigComment; import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.api.configuration.ConfigEntry; import world.bentobox.bentobox.api.configuration.ConfigEntry;
import world.bentobox.bentobox.api.configuration.ConfigObject;
import world.bentobox.bentobox.api.configuration.StoreAt; import world.bentobox.bentobox.api.configuration.StoreAt;
import world.bentobox.bentobox.database.objects.DataObject;
@StoreAt(filename="config.yml", path="addons/WelcomeWarps") @StoreAt(filename="config.yml", path="addons/WelcomeWarps")
@ -15,7 +15,7 @@ import world.bentobox.bentobox.database.objects.DataObject;
@ConfigComment("You cannot edit it while the server is running because changes will") @ConfigComment("You cannot edit it while the server is running because changes will")
@ConfigComment("be lost! Use in-game settings GUI or edit when server is offline.") @ConfigComment("be lost! Use in-game settings GUI or edit when server is offline.")
@ConfigComment("") @ConfigComment("")
public class Settings implements DataObject public class Settings implements ConfigObject
{ {
@ConfigComment("") @ConfigComment("")
@ConfigComment("Warp Restriction - needed levels to be able to create a warp") @ConfigComment("Warp Restriction - needed levels to be able to create a warp")
@ -44,12 +44,9 @@ public class Settings implements DataObject
@ConfigEntry(path = "disabled-gamemodes") @ConfigEntry(path = "disabled-gamemodes")
private Set<String> disabledGameModes = new HashSet<>(); private Set<String> disabledGameModes = new HashSet<>();
@ConfigComment("") // ---------------------------------------------------------------------
private String uniqueId = "config"; // Section: Constructor
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Constructor
// ---------------------------------------------------------------------
/** /**
@ -61,9 +58,9 @@ public class Settings implements DataObject
} }
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Section: Methods // Section: Methods
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
/** /**
@ -74,27 +71,6 @@ public class Settings implements DataObject
return warpLevelRestriction; return warpLevelRestriction;
} }
/**
* @return the uniqueId
*/
@Override
public String getUniqueId()
{
return uniqueId;
}
/**
* @param uniqueId - unique ID the uniqueId to set
*/
@Override
public void setUniqueId(String uniqueId)
{
this.uniqueId = uniqueId;
}
/** /**
* This method sets the warpLevelRestriction object value. * This method sets the warpLevelRestriction object value.
* @param warpLevelRestriction the warpLevelRestriction object new value. * @param warpLevelRestriction the warpLevelRestriction object new value.