From b93aabafd810c4e54d61f77512106fd6544741c7 Mon Sep 17 00:00:00 2001 From: LlmDl Date: Mon, 2 Dec 2024 17:10:20 -0600 Subject: [PATCH] - Fix legacy economy provider check on admin logging in also running on servers with the economy aspect of Towny disabled. --- Towny/pom.xml | 2 +- .../com/palmergames/bukkit/towny/tasks/OnPlayerLogin.java | 2 +- Towny/src/main/resources/ChangeLog.txt | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Towny/pom.xml b/Towny/pom.xml index 7bff614ba9..95d836b259 100644 --- a/Towny/pom.xml +++ b/Towny/pom.xml @@ -13,7 +13,7 @@ towny jar - 0.101.0.1 + 0.101.0.2 diff --git a/Towny/src/main/java/com/palmergames/bukkit/towny/tasks/OnPlayerLogin.java b/Towny/src/main/java/com/palmergames/bukkit/towny/tasks/OnPlayerLogin.java index 41682230a7..3cf6586c21 100644 --- a/Towny/src/main/java/com/palmergames/bukkit/towny/tasks/OnPlayerLogin.java +++ b/Towny/src/main/java/com/palmergames/bukkit/towny/tasks/OnPlayerLogin.java @@ -113,7 +113,7 @@ else if (nationHasPendingAllyInvites(nation)) audience.sendMessage(Translatable.of("default_towny_prefix").append(Translatable.of("msg_click_to_download")).locale(player).component().clickEvent(clickEvent)); } - if (TownyEconomyHandler.getProvider().isLegacy() && player.hasPermission(PermissionNodes.TOWNY_ADMIN_UPDATEALERTS.getNode())) { + if (TownyEconomyHandler.isActive() && TownyEconomyHandler.getProvider().isLegacy() && player.hasPermission(PermissionNodes.TOWNY_ADMIN_UPDATEALERTS.getNode())) { Audience audience = Towny.getAdventure().player(player); ClickEvent clickEvent = ClickEvent.runCommand("/townyadmin eco convert modern"); audience.sendMessage(Translatable.of("default_towny_prefix").append(Translatable.of("msg_legacy_economy_detected")).locale(player).component().clickEvent(clickEvent)); diff --git a/Towny/src/main/resources/ChangeLog.txt b/Towny/src/main/resources/ChangeLog.txt index 9fc69b32e7..24a7eec7a5 100644 --- a/Towny/src/main/resources/ChangeLog.txt +++ b/Towny/src/main/resources/ChangeLog.txt @@ -10157,4 +10157,6 @@ v0.92.0.11: - Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.1 to 3.11.1. - Bump org.apache.logging.log4j:log4j-core from 2.24.1 to 2.24.2. - Bump com.zaxxer:HikariCP from 6.0.0 to 6.2.1. - - Drop Java back to 17 to support 1.19. \ No newline at end of file + - Drop Java back to 17 to support 1.19. +0.101.0.2: + - Fix legacy economy provider check on admin logging in also running on servers with the economy aspect of Towny disabled. \ No newline at end of file