From 278400d6a088fa41de696014a7c546256e3fcfaf Mon Sep 17 00:00:00 2001 From: goosius1 Date: Tue, 31 Aug 2021 22:17:23 +0100 Subject: [PATCH 1/8] TR-11 added code to localize govt screen resources for display --- pom.xml | 9 ++++++ .../settings/TownyResourcesSettings.java | 4 +++ .../util/TownyResourcesMessagingUtil.java | 32 +++++++++++++------ 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index d65d4c1..19c7d74 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,10 @@ jitpack.io https://jitpack.io + + lang-utils-repo + https://ci.nyaacat.com/maven/ + @@ -41,6 +45,11 @@ 0.4.7 provided + + com.meowj + LangUtils + 2.3-SNAPSHOT + diff --git a/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesSettings.java b/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesSettings.java index 9fa0427..0443a7c 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesSettings.java +++ b/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesSettings.java @@ -371,4 +371,8 @@ public static boolean areResourceExtractionLimitsEnabled() { public static int getCooldownAfterDailyLimitWarningMessageMillis() { return getInt(TownyResourcesConfigNodes.RESOURCE_EXTRACTION_LIMITS_COOLDOWN_AFTER_DAILY_LIMIT_WARNING_MESSAGE_MILLIS); } + + public static String getServerLocale() { + return "en"; + } } diff --git a/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java b/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java index 6d261bc..3ffb1f7 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java +++ b/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java @@ -1,5 +1,7 @@ package io.github.townyadvanced.townyresources.util; +import com.meowj.langutils.lang.LanguageHelper; +import io.github.townyadvanced.townyresources.settings.TownyResourcesSettings; import org.apache.commons.lang.WordUtils; import org.bukkit.Bukkit; import org.bukkit.Material; @@ -11,8 +13,11 @@ import io.github.townyadvanced.townyresources.TownyResources; import io.github.townyadvanced.townyresources.settings.TownyResourcesTranslation; +import org.bukkit.inventory.ItemStack; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class TownyResourcesMessagingUtil { @@ -42,15 +47,24 @@ public static String[] formatResourcesStringForGovernmentScreenDisplay(String re if(resourcesAsString.length() == 0) { return new String[0]; } else { - //Convert given string to array - String[] resourcesAsFormattedArray = - WordUtils.capitalizeFully( - resourcesAsString - .replaceAll("-", " ") - .replaceAll("_", " ")) - .split(","); - - //Shorter result if it is too long + //Convert given string to formatted list + List resourcesAsFormattedList = new ArrayList<>(); + String[] resourcesAsArray = resourcesAsString.split(","); + String[] amountAndMaterialName; + String amount; + String materialName; + String languageAwareMaterialName; + for(String resourceAsString: resourcesAsArray) { + amountAndMaterialName = resourceAsString.split("-"); + amount = amountAndMaterialName[0]; + materialName = amountAndMaterialName[1]; + ItemStack fakeItemStack = new ItemStack(Material.getMaterial(materialName)); + languageAwareMaterialName = LanguageHelper.getItemDisplayName(fakeItemStack, TownyResourcesSettings.getServerLocale()); + resourcesAsFormattedList.add(amount + " " + languageAwareMaterialName); + //WordUtils.capitalizeFully( + } + //Convert formatter list to array, and shorten if too long + String[] resourcesAsFormattedArray = resourcesAsFormattedList.toArray(new String[0]); if(resourcesAsFormattedArray.length > 20) { resourcesAsFormattedArray = Arrays.copyOf(resourcesAsFormattedArray, 21); resourcesAsFormattedArray[20] = "..."; From 90d18ff379548d199242e6580cd99e4a398de2cd Mon Sep 17 00:00:00 2001 From: goosius1 Date: Wed, 1 Sep 2021 12:26:37 +0100 Subject: [PATCH 2/8] Cleanup --- .../util/TownyResourcesMessagingUtil.java | 61 +++++++++++-------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java b/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java index 3ffb1f7..3aead41 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java +++ b/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java @@ -43,13 +43,45 @@ public static void sendGlobalMessage(String message) { } } + /** + * Convert resource string to something we can send to chat utils + * + * @param resourcesAsString resource string + * @return an array we can use on the town/nation screen + */ public static String[] formatResourcesStringForGovernmentScreenDisplay(String resourcesAsString) { - if(resourcesAsString.length() == 0) { + String[] resourcesAsFormattedArray = convertResourceAmountsStringToFormattedArray(resourcesAsString); + if(resourcesAsFormattedArray.length > 20) { + resourcesAsFormattedArray = Arrays.copyOf(resourcesAsFormattedArray, 21); + resourcesAsFormattedArray[20] = "..."; + } + return resourcesAsFormattedArray; + } + + public static String formatProductionStringForDynmapTownyDisplay(String productionAsString) { + if(productionAsString.length() == 0) { + return ""; + } else { + return WordUtils.capitalizeFully(productionAsString.replaceAll("_", " ").replaceAll("\\d+-", "")); + } + } + + public static String formatMaterialForDisplay(Material material) { + return WordUtils.capitalizeFully(material.toString().replaceAll("_", " ")); + } + + /** + * Convert a resource amount string formatted array + * @param resourcesAmountsString e.g. "64-WHEAT,64-COAL" + * @return e.g. ["64 Wheat","64 Coal"] + */ + private static String[] convertResourceAmountsStringToFormattedArray(String resourcesAmountsString) { + if(resourcesAmountsString.length() == 0) { return new String[0]; } else { //Convert given string to formatted list List resourcesAsFormattedList = new ArrayList<>(); - String[] resourcesAsArray = resourcesAsString.split(","); + String[] resourcesAsArray = resourcesAmountsString.split(","); String[] amountAndMaterialName; String amount; String materialName; @@ -62,27 +94,8 @@ public static String[] formatResourcesStringForGovernmentScreenDisplay(String re languageAwareMaterialName = LanguageHelper.getItemDisplayName(fakeItemStack, TownyResourcesSettings.getServerLocale()); resourcesAsFormattedList.add(amount + " " + languageAwareMaterialName); //WordUtils.capitalizeFully( - } - //Convert formatter list to array, and shorten if too long - String[] resourcesAsFormattedArray = resourcesAsFormattedList.toArray(new String[0]); - if(resourcesAsFormattedArray.length > 20) { - resourcesAsFormattedArray = Arrays.copyOf(resourcesAsFormattedArray, 21); - resourcesAsFormattedArray[20] = "..."; - } - //Return result - return resourcesAsFormattedArray; - } - } - - public static String formatProductionStringForDynmapTownyDisplay(String productionAsString) { - if(productionAsString.length() == 0) { - return ""; - } else { - return WordUtils.capitalizeFully(productionAsString.replaceAll("_", " ").replaceAll("\\d+-", "")); - } - } - - public static String formatMaterialForDisplay(Material material) { - return WordUtils.capitalizeFully(material.toString().replaceAll("_", " ")); + } + return resourcesAsFormattedList.toArray(new String[0]); + } } } From b64ccbf2c42122a61f99318f655497a6299ab86a Mon Sep 17 00:00:00 2001 From: goosius1 Date: Wed, 1 Sep 2021 12:39:16 +0100 Subject: [PATCH 3/8] Adding langutils as plugin depend --- pom.xml | 5 +++-- src/main/resources/plugin.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 9caf097..4694bd5 100644 --- a/pom.xml +++ b/pom.xml @@ -36,19 +36,20 @@ com.github.TownyAdvanced Towny - 0.97.0.0 + 0.97.1.0 provided com.github.TownyAdvanced SiegeWar - 0.4.7 + 0.5.0 provided com.meowj LangUtils 2.3-SNAPSHOT + provided diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index feb94cf..88b5127 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -5,7 +5,7 @@ api-version: ${project.bukkitAPIVersion} author: Goosius website: 'https://github.com/TownyAdvanced/TownyResources' prefix: ${project.artifactId} -depend: [Towny] +depend: [Towny,LangUtils] softdepend: [SiegeWar,Dynmap-Towny] loadbefore: [SiegeWar] From 1a0168577876e61dd3a6a82fa22cc81402c0aafd Mon Sep 17 00:00:00 2001 From: goosius1 Date: Wed, 1 Sep 2021 12:58:07 +0100 Subject: [PATCH 4/8] TR-11 Usability improvement for town production - So that it shows correctly within a minute of loading, rather than waiting 10 mins. --- .../github/townyadvanced/townyresources/TownyResources.java | 2 +- .../listeners/TownyResourcesTownyEventListener.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java b/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java index dc7fb5a..431bc6f 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java +++ b/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java @@ -62,7 +62,7 @@ public boolean loadAll() { TownyResourcesTranslation.loadLanguage(this.getDataFolder().getPath() + File.separator , "english.yml"); //Load controllers TownResourceOffersController.loadAllResourceOfferCategories(); - TownResourceProductionController.recalculateAllProduction(); + //NOTE: We do not recalculate production here, because we need for SW to load before that will give accurate results PlayerExtractionLimitsController.loadAllResourceExtractionCategories(); //Load commands and listeners registerCommands(); diff --git a/src/main/java/io/github/townyadvanced/townyresources/listeners/TownyResourcesTownyEventListener.java b/src/main/java/io/github/townyadvanced/townyresources/listeners/TownyResourcesTownyEventListener.java index 25b02cc..35f3dcb 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/listeners/TownyResourcesTownyEventListener.java +++ b/src/main/java/io/github/townyadvanced/townyresources/listeners/TownyResourcesTownyEventListener.java @@ -19,8 +19,8 @@ public class TownyResourcesTownyEventListener implements Listener { @SuppressWarnings("unused") private final TownyResources plugin; - private static int PRODUCTION_RECALCULATION_INTERVAL_MILLIS = 600000; //10 mins - private static long nextProductionRecalculationTime = System.currentTimeMillis() + PRODUCTION_RECALCULATION_INTERVAL_MILLIS; + private static int PRODUCTION_RECALCULATION_INTERVAL_MILLIS = 600000; //10 mins. + private static long nextProductionRecalculationTime = 0; //0, so that it executes on the first short tick. public TownyResourcesTownyEventListener(TownyResources instance) { plugin = instance; From 46884bfef9e71dfd2fc471607b3a1c1e81e77780 Mon Sep 17 00:00:00 2001 From: goosius1 Date: Wed, 1 Sep 2021 16:31:18 +0100 Subject: [PATCH 5/8] TR-11 added remaining lang stuff --- .../townyresources/TownyResources.java | 7 ++ .../settings/TownyResourcesConfigNodes.java | 13 ++- .../settings/TownyResourcesSettings.java | 4 +- .../util/TownyResourcesMessagingUtil.java | 89 ++++++++++++++----- src/main/resources/plugin.yml | 4 +- 5 files changed, 90 insertions(+), 27 deletions(-) diff --git a/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java b/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java index ca28721..8bcf708 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java +++ b/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java @@ -24,6 +24,7 @@ public class TownyResources extends JavaPlugin { private static Version requiredTownyVersion = Version.fromString("0.97.1.0"); private static boolean siegeWarInstalled; private static boolean dynmapTownyInstalled; + private static boolean languageUtilsInstalled; @Override public void onEnable() { @@ -165,6 +166,10 @@ public boolean isSiegeWarInstalled() { return siegeWarInstalled; } + public boolean isLanguageUtilsInstalled() { + return dynmapTownyInstalled; + } + private String getTownyVersion() { return Bukkit.getPluginManager().getPlugin("Towny").getDescription().getVersion(); } @@ -185,5 +190,7 @@ private void setupIntegrationsWithOtherPlugins() { siegeWarInstalled = siegeWar != null; Plugin dynmapTowny = Bukkit.getPluginManager().getPlugin("Dynmap-Towny"); dynmapTownyInstalled = dynmapTowny!= null; + Plugin languageUtils = Bukkit.getPluginManager().getPlugin("LanguageUtils"); + languageUtilsInstalled = languageUtils!= null; } } diff --git a/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesConfigNodes.java b/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesConfigNodes.java index 99ee7a4..743dd91 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesConfigNodes.java +++ b/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesConfigNodes.java @@ -259,8 +259,17 @@ public enum TownyResourcesConfigNodes { "# 1 - The name of the category (used for messaging)", "# 2 - The discovery weight of the category (used during discovery)", "# 3- The base amount of the offer (in stacks)", - "# 4- The list of materials in the category"); - + "# 4- The list of materials in the category"), + TOWN_RESOURCES_LANGUAGE( + "town_resources.language", + "", + "", + ""), + TOWN_RESOURCES_LANGUAGE_MATERIALS_DISPLAY_LANGUAGE( + "town_resources.language.materials_display_language", + "zh_cn", + "", + "# If you have the LanguageUtils plugin installed, materials will be automatically translated into this locale/language."); private final String Root; private final String Default; private String[] comments; diff --git a/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesSettings.java b/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesSettings.java index 0443a7c..1ab1172 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesSettings.java +++ b/src/main/java/io/github/townyadvanced/townyresources/settings/TownyResourcesSettings.java @@ -372,7 +372,7 @@ public static int getCooldownAfterDailyLimitWarningMessageMillis() { return getInt(TownyResourcesConfigNodes.RESOURCE_EXTRACTION_LIMITS_COOLDOWN_AFTER_DAILY_LIMIT_WARNING_MESSAGE_MILLIS); } - public static String getServerLocale() { - return "en"; + public static String getMaterialsDisplayLanguage() { + return getString(TownyResourcesConfigNodes.TOWN_RESOURCES_LANGUAGE_MATERIALS_DISPLAY_LANGUAGE); } } diff --git a/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java b/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java index 3aead41..a7d2f91 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java +++ b/src/main/java/io/github/townyadvanced/townyresources/util/TownyResourcesMessagingUtil.java @@ -44,58 +44,105 @@ public static void sendGlobalMessage(String message) { } /** - * Convert resource string to something we can send to chat utils + * Format resource string to something we can send to chat utils * * @param resourcesAsString resource string * @return an array we can use on the town/nation screen */ public static String[] formatResourcesStringForGovernmentScreenDisplay(String resourcesAsString) { - String[] resourcesAsFormattedArray = convertResourceAmountsStringToFormattedArray(resourcesAsString); - if(resourcesAsFormattedArray.length > 20) { - resourcesAsFormattedArray = Arrays.copyOf(resourcesAsFormattedArray, 21); - resourcesAsFormattedArray[20] = "..."; + if(resourcesAsString.isEmpty()) { + return new String[0]; + } else { + String[] resourcesAsFormattedArray = convertResourceAmountsStringToFormattedArray(resourcesAsString); + if(resourcesAsFormattedArray.length > 20) { + resourcesAsFormattedArray = Arrays.copyOf(resourcesAsFormattedArray, 21); + resourcesAsFormattedArray[20] = "..."; + } + return resourcesAsFormattedArray; } - return resourcesAsFormattedArray; } - public static String formatProductionStringForDynmapTownyDisplay(String productionAsString) { - if(productionAsString.length() == 0) { + /** + * Format resource string to something we can send to the dynmap + * + * @param resourcesAsString resource string + * @return a string we can show on the dynmap e.g. "Wheat, Coal, Iron" + */ + public static String formatProductionStringForDynmapTownyDisplay(String resourcesAsString) { + if(resourcesAsString.isEmpty()) { return ""; } else { - return WordUtils.capitalizeFully(productionAsString.replaceAll("_", " ").replaceAll("\\d+-", "")); + if(TownyResources.getPlugin().isLanguageUtilsInstalled()) { + List resourcesAsFormattedList = new ArrayList<>(); + String[] resourcesAsArray = resourcesAsString.replaceAll("\\d+-", "").split(","); + Material material; + String translatedMaterialName; + for(String resourceAsString: resourcesAsArray) { + material = Material.getMaterial(resourceAsString); + translatedMaterialName = getTranslatedMaterialName(material); + resourcesAsFormattedList.add(translatedMaterialName); + } + return Arrays.toString(resourcesAsFormattedList.toArray()).replace("[","").replace("]",""); + } else { + return WordUtils.capitalizeFully(resourcesAsString.replaceAll("_", " ").replaceAll("\\d+-", "")); + } } } + /** + * Format one material for display. + * + * @param material the material + * @return the formatted material name + */ public static String formatMaterialForDisplay(Material material) { - return WordUtils.capitalizeFully(material.toString().replaceAll("_", " ")); + if(TownyResources.getPlugin().isLanguageUtilsInstalled()) { + return getTranslatedMaterialName(material); + } else { + return WordUtils.capitalizeFully(material.toString().replaceAll("_", " ")); + } } /** * Convert a resource amount string formatted array + * + * NOTE: Do not pass in an empty string + * * @param resourcesAmountsString e.g. "64-WHEAT,64-COAL" * @return e.g. ["64 Wheat","64 Coal"] */ private static String[] convertResourceAmountsStringToFormattedArray(String resourcesAmountsString) { - if(resourcesAmountsString.length() == 0) { - return new String[0]; - } else { - //Convert given string to formatted list + if(TownyResources.getPlugin().isLanguageUtilsInstalled()) { + //Return translated materials array List resourcesAsFormattedList = new ArrayList<>(); String[] resourcesAsArray = resourcesAmountsString.split(","); String[] amountAndMaterialName; String amount; String materialName; - String languageAwareMaterialName; + String translatedMaterialName; + Material material; for(String resourceAsString: resourcesAsArray) { amountAndMaterialName = resourceAsString.split("-"); amount = amountAndMaterialName[0]; materialName = amountAndMaterialName[1]; - ItemStack fakeItemStack = new ItemStack(Material.getMaterial(materialName)); - languageAwareMaterialName = LanguageHelper.getItemDisplayName(fakeItemStack, TownyResourcesSettings.getServerLocale()); - resourcesAsFormattedList.add(amount + " " + languageAwareMaterialName); - //WordUtils.capitalizeFully( + material = Material.getMaterial(materialName); + translatedMaterialName = getTranslatedMaterialName(material); + resourcesAsFormattedList.add(amount + " " + translatedMaterialName); } - return resourcesAsFormattedList.toArray(new String[0]); - } + return resourcesAsFormattedList.toArray(new String[0]); + } else { + //Return english materials array + return WordUtils.capitalizeFully( + resourcesAmountsString + .replaceAll("_", " ") + .replaceAll("-", " ")) + .split(","); + } + } + + private static String getTranslatedMaterialName(Material material) { + ItemStack fakeItemStack = new ItemStack(material); + String translatedMaterialName = LanguageHelper.getItemDisplayName(fakeItemStack, TownyResourcesSettings.getMaterialsDisplayLanguage()); + return translatedMaterialName; } } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 88b5127..7be4cac 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -5,8 +5,8 @@ api-version: ${project.bukkitAPIVersion} author: Goosius website: 'https://github.com/TownyAdvanced/TownyResources' prefix: ${project.artifactId} -depend: [Towny,LangUtils] -softdepend: [SiegeWar,Dynmap-Towny] +depend: [Towny] +softdepend: [SiegeWar,Dynmap-Towny,LanguageUtils] loadbefore: [SiegeWar] description: This is an add-on plugin for Towny, which gives each town a unique set of automatically-extracted resources, and then protects the economic value of those resources with moderate limits to player resource extraction. From 52628662192902d36bf7436a9de36b83e5099589 Mon Sep 17 00:00:00 2001 From: goosius1 Date: Wed, 1 Sep 2021 16:33:49 +0100 Subject: [PATCH 6/8] POM update 007 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4694bd5..9be6102 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 io.github.townyadvanced TownyResources - 0.0.6 + 0.0.7 townyresources From 6d7a5cb1d60743e314256e244334afc6daba8353 Mon Sep 17 00:00:00 2001 From: goosius1 Date: Wed, 1 Sep 2021 16:48:30 +0100 Subject: [PATCH 7/8] TR-11 fix to lang verifier --- .../io/github/townyadvanced/townyresources/TownyResources.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java b/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java index 8bcf708..15d00f7 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java +++ b/src/main/java/io/github/townyadvanced/townyresources/TownyResources.java @@ -167,7 +167,7 @@ public boolean isSiegeWarInstalled() { } public boolean isLanguageUtilsInstalled() { - return dynmapTownyInstalled; + return languageUtilsInstalled; } private String getTownyVersion() { From c8aaba88467b3b38ac6ed8b7fce9e7e5f7c24497 Mon Sep 17 00:00:00 2001 From: goosius1 Date: Wed, 1 Sep 2021 17:05:20 +0100 Subject: [PATCH 8/8] TR-11 minor formatting fix --- .../controllers/TownResourceDiscoveryController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/townyadvanced/townyresources/controllers/TownResourceDiscoveryController.java b/src/main/java/io/github/townyadvanced/townyresources/controllers/TownResourceDiscoveryController.java index 14ecc73..b0b6d5c 100644 --- a/src/main/java/io/github/townyadvanced/townyresources/controllers/TownResourceDiscoveryController.java +++ b/src/main/java/io/github/townyadvanced/townyresources/controllers/TownResourceDiscoveryController.java @@ -95,7 +95,7 @@ public static void discoverNewResource(Resident resident, Town town, List