From a5ff39cbec7c7df405c7043744da0f08a91311e6 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 7 May 2019 17:37:50 -0700 Subject: [PATCH 1/3] Uses ConfigObject instead of DatabaseObject for config file. --- pom.xml | 4 +- .../world/bentobox/warps/config/Settings.java | 40 ++++--------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/pom.xml b/pom.xml index 456ec17..8766c69 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ world.bentobox warps - 1.4.0 + 1.4.1 WelcomeWarpSigns WelcomeWarpSigns is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like ASkyBlock or AcidIsland. @@ -95,7 +95,7 @@ world.bentobox bentobox - 1.4.0 + 1.5.0-SNAPSHOT world.bentobox diff --git a/src/main/java/world/bentobox/warps/config/Settings.java b/src/main/java/world/bentobox/warps/config/Settings.java index b728e3f..a955b49 100644 --- a/src/main/java/world/bentobox/warps/config/Settings.java +++ b/src/main/java/world/bentobox/warps/config/Settings.java @@ -5,8 +5,8 @@ import java.util.Set; import world.bentobox.bentobox.api.configuration.ConfigComment; 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.database.objects.DataObject; @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("be lost! Use in-game settings GUI or edit when server is offline.") @ConfigComment("") -public class Settings implements DataObject +public class Settings implements ConfigObject { @ConfigComment("") @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") private Set 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 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. * @param warpLevelRestriction the warpLevelRestriction object new value. From 5a7648f998bff0d514a08566635281259f99f892 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 7 May 2019 21:35:03 -0700 Subject: [PATCH 2/3] Spanish locale translation. Credit @SrAcosta. --- src/main/resources/locales/es-ES.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/main/resources/locales/es-ES.yml diff --git a/src/main/resources/locales/es-ES.yml b/src/main/resources/locales/es-ES.yml new file mode 100644 index 0000000..380cd79 --- /dev/null +++ b/src/main/resources/locales/es-ES.yml @@ -0,0 +1,31 @@ +########################################################################################################### +# Este es un archivo YML. Tenga cuidado al editar. Revisa tus ediciones en un verificador de YAML como # +# el de http://yaml-online-parser.appspot.com # +########################################################################################################### + +warp: + help: + description: "Teletransportarte hacia el warp del jugador" + parameters: +warps: + deactivate: "&cViejo cartel a sido desactivado!" + error: + does-not-exist: "&cOh snap! Ese warp ya no existe!" + duplicate: "&CCartel duplicado puesto" + no-permission: "&CNo tienes permiso para hacer eso!" + no-remove: "&CNo puedes quitar ese cartel!" + no-warps-yet: "&CNo hay warps disponibles aun" + not-enough-level: "&CTu nivel de isla no es lo suficientemente alto!" + not-on-island: "&CDebes estar en tu isla para hacer eso!" + not-safe: "&cEse warp no es seguro!" + your-level-is: "&cTu nivel de isla es solo [level] y debe ser mayor que [required]" + help: + description: "Abre el panel de warps" + next: "&6Siguiente página" + player-warped: "&2[name] teletransportarte a tu warp!" + previous: "&6Pagina anterior" + sign-removed: "&CCartel removido!" + success: "&AExito!" + title: "Carteles de Warps" + warpTip: "&6Coloca un cartel con este texto [text] arriba" +warpToPlayersSign: "&6Teletransportandote al warp de [player]" \ No newline at end of file From 6029ae6b2d9ee55a21ec5900f42bf9200d12319b Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 7 May 2019 21:44:42 -0700 Subject: [PATCH 3/3] YAML fix --- src/main/resources/locales/es-ES.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/locales/es-ES.yml b/src/main/resources/locales/es-ES.yml index 380cd79..b0d733f 100644 --- a/src/main/resources/locales/es-ES.yml +++ b/src/main/resources/locales/es-ES.yml @@ -28,4 +28,4 @@ warps: success: "&AExito!" title: "Carteles de Warps" warpTip: "&6Coloca un cartel con este texto [text] arriba" -warpToPlayersSign: "&6Teletransportandote al warp de [player]" \ No newline at end of file + warpToPlayersSign: "&6Teletransportandote al warp de [player]" \ No newline at end of file