From e5b69121d0b49b2bee3d98a0f89449c8e5bed588 Mon Sep 17 00:00:00 2001 From: Kiran Hart Date: Thu, 20 Jan 2022 12:24:42 -0500 Subject: [PATCH] 2.53.2 - ban times will say expired if it drops below zero rather than showing negeative numbers --- pom.xml | 2 +- src/main/java/ca/tweetzy/auctionhouse/guis/GUIBans.java | 2 +- .../java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0e4e97d..9acd7dd 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 ca.tweetzy auctionhouse - 2.53.1 + 2.53.2 UTF-8 diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/GUIBans.java b/src/main/java/ca/tweetzy/auctionhouse/guis/GUIBans.java index 7d35ddf..57e942a 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/GUIBans.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/GUIBans.java @@ -66,7 +66,7 @@ public class GUIBans extends Gui { put("%player_name%", offlinePlayer.getName()); put("%player_displayname%", AuctionAPI.getInstance().getDisplayName(offlinePlayer)); put("%ban_reason%", ban.getReason()); - put("%ban_amount%", TimeUtils.makeReadable(ban.getTime() - System.currentTimeMillis())); + put("%ban_amount%", (ban.getTime() - System.currentTimeMillis()) <= 0 ? AuctionHouse.getInstance().getLocale().getMessage("bans.ban expired").getMessage() : TimeUtils.makeReadable(ban.getTime() - System.currentTimeMillis())); }}), ClickType.RIGHT, e -> { AuctionHouse.getInstance().getAuctionBanManager().removeBan(ban.getBannedPlayer()); AuctionHouse.getInstance().getLocale().getMessage("bans.playerunbanned").processPlaceholder("player_displayname", AuctionAPI.getInstance().getDisplayName(offlinePlayer)).processPlaceholder("player", offlinePlayer.getName()).sendPrefixedMessage(e.player); diff --git a/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java b/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java index 390ca9e..c0613b8 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java +++ b/src/main/java/ca/tweetzy/auctionhouse/settings/LocaleSettings.java @@ -101,6 +101,7 @@ public class LocaleSettings { languageNodes.put("bans.playerunbanned", "&cUnbanned &4%player% &cfrom the auction house"); languageNodes.put("bans.remainingtime", "&cYou are banned from the auction house for &4%ban_amount%"); languageNodes.put("bans.unbanned", "&aYou are now unbanned from the auction house"); + languageNodes.put("bans.ban expired", "&aBan Expired"); languageNodes.put("auction_filter.sale_types.biddable", "Biddable"); languageNodes.put("auction_filter.sale_types.non_biddable", "Not Biddable");