Skip to content

Commit

Permalink
0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Warriorrrr committed Jun 13, 2023
1 parent ef680e0 commit 5eb70de
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
group = io.github.townyadvanced
version = 0.0.6-SNAPSHOT
version = 0.0.6
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

public class TownyMenus extends JavaPlugin {

private static final Version requiredTownyVersion = Version.fromString("0.99.0.6");
private static final Version requiredTownyVersion = Version.fromString("0.99.0.8");
private static TownyMenus plugin;
private final Object scheduler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public static MenuInventory createDepositWithdrawMenu(final Player player, final
private static UserInputAction depositOrWithdraw(final Player player, final Government government, boolean withdraw) {
final Locale locale = Localization.localeOrDefault(player);

return ClickAction.userInput(of("government-menus-input").translate(locale) + (withdraw ? of("government-menus-withdraw").translate(locale) : of("government-menus-deposit").translate(locale)) + of("government-menus-amount").translate(locale), completion -> {
return ClickAction.userInput(of("government-menus-input").append(withdraw ? of("government-menus-input-withdraw") : of("government-menus-input-deposit")).append(of("government-menus-input-amount")).stripColors(true).translate(locale), completion -> {
try {
MathUtil.getIntOrThrow(completion.getText());
} catch (TownyException e) {
Expand All @@ -132,7 +132,7 @@ private static UserInputAction depositOrWithdraw(final Player player, final Gove
try {
Method method = clazz.getDeclaredMethod(town ? "townTransaction" : "nationTransaction", Player.class, String[].class, boolean.class);
method.setAccessible(true);
method.invoke(null, player, new String[]{"", completion.getText()}, withdraw);
method.invoke(null, player, new String[]{completion.getText()}, withdraw);

MenuHistory.last(player);
return AnvilResponse.nil();
Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,10 @@
- Menu created items are now marked with a special entry so that they can be identified & removed when a menu is closed or an item is dropped.
- Not aware of any exploits that would allow menu items to be taken, but better safe than sorry.
- Added Folia support.
- The minimum required Towny version is now 0.99.0.6.
- The minimum required Towny version is now 0.99.0.6.
0.0.6:
- Fixed an issue where town deposits were not working.
- The minimum Towny version has been raised to 0.99.0.8.
- Fully localized TownyMenus, courtesy of Litt1eBai with PR #18.
- Updated AnvilGUI to version 1.6.6-SNAPSHOT for 1.20 support.
- Fixed a small Folia compatability issue.

0 comments on commit 5eb70de

Please sign in to comment.