From 7309e6122115de8cf2281ff7c4a818041ede8af8 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Sat, 2 Nov 2019 12:48:41 +0100 Subject: [PATCH 1/4] AeSix' template improvements --- .../bug-issue-report-for-plotsquared.md | 94 ++++++++++++++----- 1 file changed, 73 insertions(+), 21 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-issue-report-for-plotsquared.md b/.github/ISSUE_TEMPLATE/bug-issue-report-for-plotsquared.md index 43293d3c9..a3399ecdb 100644 --- a/.github/ISSUE_TEMPLATE/bug-issue-report-for-plotsquared.md +++ b/.github/ISSUE_TEMPLATE/bug-issue-report-for-plotsquared.md @@ -2,37 +2,89 @@ name: Bug/Issue report for PlotSquared about: Bug / Issue report about this plugin title: '' -labels: '' +labels: "[?] Testing Required" assignees: '' --- -__*NOTICE: Bukkit/Spigot versions 1.7.10 to 1.12.2 are considered legacy and will receive limited support. Please consider upgrading to 1.13 for future support. Plugins exist for 1.13+ that bring back old behaviors found in 1.8*__ -# Bug report template - - - + -**Debug paste link:** - -**[REQUIRED] Spigot/Paper Version Number:** - + -**[REQUIRED] Minecraft Version Number:** +# NOTICE: +```diff +! PlotSquared for Minecraft Java Edition versions between 1.7 through to 1.12.2 are considered +! legacy, and will receive limited to no support. Please consider upgrading to 1.13+ for +! future support. Plugins exist for 1.13+ which bring back behaviors found in 1.8.8 +! All versions of PlotSquared for Sponge and Nukkit(X) will recieve limited to no support +! due to lack of developer interest and time. Additionally, NukkitX has not had feature +! updates since the Better Together, which prevents some PlotSquared features from ever +! functioning. Contributions are always welcome however! +``` -**[REQUIRED] Description of the problem:** +**Feature requests & Suggestions are to be submitted at the [PlotSquared Suggestions tracker](https://github.com/IntellectualSites/PlotSquaredSuggestions)** -**Any relevant console output or screenshots:** +**Code contributions are to be done through [PRs](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request), tagging the specific issue ticket(s) if applicable.** -**Plugins being used on the server:** - +**[DISCORD INVITE LINK](https://discord.gg/cSMxtGn)** and please, for the love of the little sanity we have left, use the correct channels! -**[REQUIRED] How to replicate:** +# BUG REPORT TEMPLATE: + +## Required Information section: +> ALL FIELDS IN THIS SECTION ARE REQUIRED, and must contain appropriate information +### Server config info (Debug/file paste links): + + + + + +### Server type: +**select one** + +- [ ] Spigot / Paper *(CraftBukkit should not be used, re-test with Spigot first!)* +- [ ] Sponge *- NOTE: NOT ACTIVELY MAINTAINED* +- [ ] NukkitX *- NOTE: NOT ACTIVELY MAINTAINED* + +### Minecraft Version: +**select one** + +- [ ] Minecraft 1.14.4 ***This is the ONLY actively maintained target for PlotSquared*** +- [ ] Minecraft 1.13.2 +- [ ] Minecraft Java Edition *other versions, please specify*: +- [ ] Minecraft Bedrock Edition *speicify version*: + +### Server build info: + +``` paste here, between the tick marks, replacing this text ``` + +### WorldEdit/FAWE versions: + +- [ ] FAWE *version*: +- [ ] WorldEdit *version*: + +### Description of the problem: + + + +### How to replicate: -**[REQUIRED] Checklist**: +## Additional Information: +> The information here is optional for you to provide, however it may help us to more readily diagnose any compatibility and bug issues. + +### Other plugins being used on the server: + + +### Relevant console output, log lines, and/or screenshots: + + +### Additional relevant comments/remarks: + + +# AFFIRMATION OF COMPLETION: -- [] I included all information required in the sections above -- [] I made sure there are no duplicates of this report [(Use Search)](https://github.com/IntellectualSites/PlotSquared/issues?utf8=%E2%9C%93&q=is%3Aissue) -- [] I made sure I am using an up-to-date version of PlotSquared -- [] I made sure the bug/error is not caused by any other plugin +- [ ] I included all information required in the sections above +- [ ] I made sure there are no duplicates of this report [(Use Search)](https://github.com/IntellectualSites/PlotSquared/issues?utf8=%E2%9C%93&q=is%3Aissue) +- [ ] I made sure I am using an up-to-date version of PlotSquared +- [ ] I made sure the bug/error is not caused by any other plugin +- [x] I didn't read but checked everything above. From e972cb4c1a021a144976c01a964b19aca6813ec9 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 4 Nov 2019 00:33:04 +0100 Subject: [PATCH 2/4] Make flag error messages translatable --- .../plotsquared/plot/config/Captions.java | 14 +++++++++++++- .../plotsquared/plot/flag/BooleanFlag.java | 2 +- .../plotsquared/plot/flag/DoubleFlag.java | 2 +- .../plotsquared/plot/flag/EnumFlag.java | 2 +- .../plotsquared/plot/flag/GameModeFlag.java | 2 +- .../plotsquared/plot/flag/IntegerFlag.java | 2 +- .../plotsquared/plot/flag/IntegerListFlag.java | 2 +- .../plotsquared/plot/flag/IntervalFlag.java | 2 +- .../plotsquared/plot/flag/LongFlag.java | 2 +- .../plotsquared/plot/flag/PlotBlockListFlag.java | 2 +- .../plotsquared/plot/flag/PlotWeatherFlag.java | 2 +- .../plotsquared/plot/flag/StringFlag.java | 2 +- .../plotsquared/plot/flag/StringListFlag.java | 2 +- 13 files changed, 25 insertions(+), 13 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java index c319303b6..a27711e2b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java @@ -548,7 +548,19 @@ public enum Captions { FLAG_CATEGORY_BOOLEAN("Boolean Flags", "Flags"), FLAG_CATEGORY_MIXED("Mixed Value Flags", "Flags"), // - + // + FLAG_ERROR_BOOLEAN("Flag value must be a boolean (true|false)", "Flags"), + FLAG_ERROR_ENUM("Must be one of: %s", "Flags"), + FLAG_ERROR_GAMEMODE("Flag value must be a gamemode: 'survival', 'creative', 'adventure' or 'spectator.", "Flags"), + FLAG_ERROR_INTEGER("Flag value must be a whole number", "Flags"), + FLAG_ERROR_INTEGER_LIST("Flag value must be an integer list", "Flags"), + FLAG_ERROR_INTERVAL("Value(s) must be numeric. /plot set flag [amount]", "Flags"), + FLAG_ERROR_LONG("Flag value must be a whole number (large numbers allowed)", "Flags"), + FLAG_ERROR_PLOTBLOCKLIST("Flag value must be a block list", "Flags"), + FLAG_ERROR_WEATHER("Flag must be a weather: 'rain' or 'sun'", "Flags"), + FLAG_ERROR_STRING("Flag value must be alphanumeric. Some special characters are allowed.", "Flags"), + FLAG_ERROR_STRINGLIST("Flag value must be a string list", "Flags"), + // // TRUSTED_ADDED("$4You successfully trusted a user to the plot", "Trusted"), WAS_NOT_ADDED("$2That player was not trusted on this plot", "Trusted"), diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BooleanFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BooleanFlag.java index 841df766c..692c0b501 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BooleanFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/BooleanFlag.java @@ -31,7 +31,7 @@ public class BooleanFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be a boolean (true|false)"; + return Captions.FLAG_ERROR_BOOLEAN.getTranslated(); } public boolean isTrue(Plot plot) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/DoubleFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/DoubleFlag.java index 8cc665471..ab2c86c45 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/DoubleFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/DoubleFlag.java @@ -22,6 +22,6 @@ public class DoubleFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be a number."; + return Captions.FLAG_ERROR_BOOLEAN.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/EnumFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/EnumFlag.java index 88119bbaa..06936d4df 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/EnumFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/EnumFlag.java @@ -28,6 +28,6 @@ public class EnumFlag extends Flag { } @Override public String getValueDescription() { - return "Must be one of: " + StringMan.getString(values); + return Captions.FLAG_ERROR_ENUM.getTranslated() + StringMan.getString(values); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/GameModeFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/GameModeFlag.java index 26510b35b..023bf804a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/GameModeFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/GameModeFlag.java @@ -37,6 +37,6 @@ public class GameModeFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be a gamemode: 'survival', 'creative', 'adventure' or 'spectator'"; + return Captions.FLAG_ERROR_GAMEMODE.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerFlag.java index ced532cd1..8b527c46a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerFlag.java @@ -10,7 +10,7 @@ public class IntegerFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be a whole number"; + return Captions.FLAG_ERROR_INTEGER.getTranslated(); } @Override public String valueToString(Object value) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerListFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerListFlag.java index 1f24cb4a3..e9162000b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerListFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntegerListFlag.java @@ -27,6 +27,6 @@ public class IntegerListFlag extends ListFlag> { } @Override public String getValueDescription() { - return "Flag value must be an integer list"; + return Captions.FLAG_ERROR_INTEGER_LIST.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntervalFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntervalFlag.java index 0468c59b2..7b6b64d47 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntervalFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/IntervalFlag.java @@ -40,7 +40,7 @@ public class IntervalFlag extends Flag { } @Override public String getValueDescription() { - return "Value(s) must be numeric. /plot set flag [amount]"; + return Captions.FLAG_ERROR_INTERVAL.getTranslated(); } @EqualsAndHashCode @RequiredArgsConstructor @Getter public static final class Interval { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/LongFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/LongFlag.java index 8d57e8865..1d8846701 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/LongFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/LongFlag.java @@ -21,6 +21,6 @@ public class LongFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be a whole number (large numbers allowed)"; + return Captions.FLAG_ERROR_LONG.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotBlockListFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotBlockListFlag.java index 93bd8c56f..1abaf32b0 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotBlockListFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotBlockListFlag.java @@ -29,6 +29,6 @@ public class PlotBlockListFlag extends ListFlag> { } @Override public String getValueDescription() { - return "Flag value must be a block list"; + return Captions.FLAG_ERROR_PLOTBLOCKLIST.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotWeatherFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotWeatherFlag.java index 43544748f..1893d5370 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotWeatherFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/PlotWeatherFlag.java @@ -31,6 +31,6 @@ public class PlotWeatherFlag extends Flag { } @Override public String getValueDescription() { - return "Flag must be a weather: 'rain' or 'sun'"; + return Captions.FLAG_ERROR_WEATHER.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringFlag.java index 6438ec938..779f47e0d 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringFlag.java @@ -18,6 +18,6 @@ public class StringFlag extends Flag { } @Override public String getValueDescription() { - return "Flag value must be alphanumeric. Some special characters are allowed."; + return Captions.FLAG_ERROR_STRING.getTranslated(); } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringListFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringListFlag.java index a1e28aa3d..eb76ec8c1 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringListFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/StringListFlag.java @@ -22,6 +22,6 @@ public class StringListFlag extends ListFlag> { } @Override public String getValueDescription() { - return "Flag value must be a string list"; + return Captions.FLAG_ERROR_STRINGLIST.getTranslated(); } } From 315f26fb82c58b98f7dd0bf16bb06939c9ec663a Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 4 Nov 2019 00:46:08 +0100 Subject: [PATCH 3/4] Add missing color --- .../intellectualsites/plotsquared/bukkit/BukkitMain.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java index 272d09056..a7835f8db 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java @@ -698,11 +698,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain } } if (Settings.UUID.OFFLINE) { - PlotSquared.log(Captions.PREFIX + " &6" + getPluginName() + PlotSquared.log(Captions.PREFIX + "&6" + getPluginName() + " is using Offline Mode UUIDs either because of user preference, or because you are using an old version of " + "Bukkit"); } else { - PlotSquared.log(Captions.PREFIX + "" + getPluginName() + " is using online UUIDs"); + PlotSquared.log(Captions.PREFIX + "&6" + getPluginName() + " is using online UUIDs"); } if (Settings.UUID.USE_SQLUUIDHANDLER) { return new SQLUUIDHandler(wrapper); From a25511c8496fa92b3bde9b3df07b32a87d9e3285 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 4 Nov 2019 19:22:54 +0100 Subject: [PATCH 4/4] Add custom translations for special flags --- .../intellectualsites/plotsquared/plot/config/Captions.java | 4 +++- .../github/intellectualsites/plotsquared/plot/flag/Flags.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java index a27711e2b..68783e02e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Captions.java @@ -555,11 +555,13 @@ public enum Captions { FLAG_ERROR_INTEGER("Flag value must be a whole number", "Flags"), FLAG_ERROR_INTEGER_LIST("Flag value must be an integer list", "Flags"), FLAG_ERROR_INTERVAL("Value(s) must be numeric. /plot set flag [amount]", "Flags"), + FLAG_ERROR_KEEP("Flag value must be a timestamp or a boolean", "Flags"), FLAG_ERROR_LONG("Flag value must be a whole number (large numbers allowed)", "Flags"), FLAG_ERROR_PLOTBLOCKLIST("Flag value must be a block list", "Flags"), - FLAG_ERROR_WEATHER("Flag must be a weather: 'rain' or 'sun'", "Flags"), + FLAG_ERROR_PRICE("Flag value must be a positive number.", "Flags"), FLAG_ERROR_STRING("Flag value must be alphanumeric. Some special characters are allowed.", "Flags"), FLAG_ERROR_STRINGLIST("Flag value must be a string list", "Flags"), + FLAG_ERROR_WEATHER("Flag must be a weather: 'rain' or 'sun'", "Flags"), // // TRUSTED_ADDED("$4You successfully trusted a user to the plot", "Trusted"), diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java index b21d6fb25..07e71a348 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java @@ -40,7 +40,7 @@ public final class Flags { } @Override public String getValueDescription() { - return "Flag value must be a positive number."; + return Captions.FLAG_ERROR_PRICE.getTranslated(); } }; public static final BooleanFlag EXPLOSION = new BooleanFlag("explosion"); @@ -114,7 +114,7 @@ public final class Flags { } @Override public String getValueDescription() { - return "Flag value must be a timestamp or a boolean"; + return Captions.FLAG_ERROR_KEEP.getTranslated(); } }; public static final TeleportDenyFlag DENY_TELEPORT = new TeleportDenyFlag("deny-teleport");