diff --git a/commons/src/generated/java/net/swofty/commons/skyblock/item/ItemType.java b/commons/src/generated/java/net/swofty/commons/skyblock/item/ItemType.java index ec8113c04..d1b807584 100644 --- a/commons/src/generated/java/net/swofty/commons/skyblock/item/ItemType.java +++ b/commons/src/generated/java/net/swofty/commons/skyblock/item/ItemType.java @@ -1,6 +1,8 @@ // AUTO-GENERATED FILE. DO NOT EDIT. package net.swofty.commons.skyblock.item; +import java.lang.Exception; +import java.lang.String; import net.minestom.server.item.Material; import net.swofty.commons.StringUtility; import org.jetbrains.annotations.Nullable; diff --git a/commons/src/main/java/net/swofty/commons/config/Settings.java b/commons/src/main/java/net/swofty/commons/config/Settings.java index 8bde0920e..68a375449 100644 --- a/commons/src/main/java/net/swofty/commons/config/Settings.java +++ b/commons/src/main/java/net/swofty/commons/config/Settings.java @@ -26,6 +26,7 @@ public class Settings { @Comment("The secret key used to authenticate with Velocity proxy") private String velocitySecret = "ixmSUgWOgvs7"; + @Comment("Whether to require player authentication on initial connection") private boolean requireAuth = false; @Comment("Whether to enable sandbox features (such as editing items)") diff --git a/commons/src/main/java/net/swofty/commons/proxy/FromProxyChannels.java b/commons/src/main/java/net/swofty/commons/proxy/FromProxyChannels.java index a0c69a130..b572b7413 100644 --- a/commons/src/main/java/net/swofty/commons/proxy/FromProxyChannels.java +++ b/commons/src/main/java/net/swofty/commons/proxy/FromProxyChannels.java @@ -6,7 +6,6 @@ import net.swofty.commons.proxy.requirements.from.GivePlayersOriginTypeRequirements; import net.swofty.commons.proxy.requirements.from.PingServerRequirements; import net.swofty.commons.proxy.requirements.from.PlayerHasSwitchedFromHereRequirements; -import net.swofty.commons.proxy.requirements.from.PromptPlayerForAuthenticationRequirements; import net.swofty.commons.proxy.requirements.from.RefreshCoopDataOnServerRequirements; import net.swofty.commons.proxy.requirements.from.RunEventRequirements; import net.swofty.commons.proxy.requirements.from.TeleportRequirements; @@ -16,7 +15,6 @@ @Getter public enum FromProxyChannels { TELEPORT("teleport", new TeleportRequirements()), - PROMPT_PLAYER_FOR_AUTHENTICATION("authenticate", new PromptPlayerForAuthenticationRequirements()), PLAYER_HAS_SWITCHED_FROM_HERE("player-has-switched-from-here", new PlayerHasSwitchedFromHereRequirements()), DOES_SERVER_HAVE_ISLAND("does-server-have-island", new DoesServerHaveIslandRequirements()), REFRESH_COOP_DATA_ON_SERVER("refresh-coop-data", new RefreshCoopDataOnServerRequirements()), diff --git a/configuration/i18n/en_US/commands.properties b/configuration/i18n/en_US/commands.properties index 7c33bd442..ba4479a4f 100644 --- a/configuration/i18n/en_US/commands.properties +++ b/configuration/i18n/en_US/commands.properties @@ -3,8 +3,8 @@ # ============================================================ commands.common.separator = ----------------------------------------------------- commands.common.player_not_found = Can't find a player by the name of '{player}' -commands.common.player_not_found_short = Could not find player: {player} -commands.common.unknown_command_use_help = Unknown command. Use /{command} for help. +commands.common.player_not_found_short=Could not find player: +commands.common.unknown_command_use_help=Unknown command. Use / for help. commands.common.service_offline_friend = Could not connect to the friend service! Please try again later. commands.common.service_offline_party = Could not connect to the party service! Please try again later. commands.common.service_offline_party_alt = Couldn't find a party service! Please try again later. @@ -46,10 +46,10 @@ commands.party.help_demote = /p demote - /p chat - Sends a chat message to the entire party commands.party.help_hijack = /p hijack - Hijacks a party (Admin only) commands.party.not_in_party = You are not in a party! -commands.party.list_header = Party Members ({count}) -commands.party.list_leader = Party Leader: {leader} -commands.party.list_moderators = Party Moderators: {moderators} -commands.party.list_members = Party Members: {members} +commands.party.list_header=Party Members () +commands.party.list_leader=Party Leader: +commands.party.list_moderators=Party Moderators: +commands.party.list_members=Party Members: commands.party.error_not_found = Couldn't find a player with that name! commands.party.error_not_online = That player is not online! commands.party.error_invite_self = You cannot invite yourself! @@ -60,27 +60,27 @@ commands.party.error_need_staff = You need STAFF to do this command # ============================================================ # Message Command # ============================================================ -commands.message.player_not_found = Can't find a player by the name of '{player}' -commands.message.player_not_online = The player you tried to message, {player}, is not online. -commands.message.outgoing = To {target}: {message} -commands.message.incoming = From {sender}: {message} +commands.message.player_not_found=Can't find a player by the name of '' +commands.message.player_not_online=The player you tried to message, , is not online. +commands.message.outgoing=To : +commands.message.incoming=From : # ============================================================ # Mute Command # ============================================================ commands.mute.invalid_reason = Invalid mute reason. Use tab-completion to see valid options. -commands.mute.success = Successfully muted player {player}. Punishment ID: {id} -commands.mute.already_muted = This player already has an active mute. Punishment ID: {id} -commands.mute.failed = Failed to mute player: {error} +commands.mute.success=Successfully muted player . Punishment ID: +commands.mute.already_muted=This player already has an active mute. Punishment ID: +commands.mute.failed=Failed to mute player: commands.mute.service_offline = Could not mute this player at this time. The punishment service may be offline. # ============================================================ # Ban Command # ============================================================ commands.ban.invalid_reason = Invalid ban reason. Use tab-completion to see valid options. -commands.ban.success = Successfully banned player {player}. Punishment ID: {id} -commands.ban.already_banned = This player is already banned. Use the tag -O to overwrite. Punishment ID: {id} -commands.ban.failed = Failed to ban player: {error} +commands.ban.success=Successfully banned player . Punishment ID: +commands.ban.already_banned=This player is already banned. Use the tag -O to overwrite. Punishment ID: +commands.ban.failed=Failed to ban player: commands.ban.service_offline = Could not ban this player at this time. The punishment service may be offline. # ============================================================ @@ -98,8 +98,8 @@ commands.unban.service_offline = Could not unban this player at this time. # ============================================================ # Rank Command # ============================================================ -commands.rank.player_not_found = Couldn't find a player by the name of {player}. -commands.rank.success = Successfully set {player}'s rank to {rank}. +commands.rank.player_not_found=Couldn't find a player by the name of . +commands.rank.success=Successfully set 's rank to . # ============================================================ # Chat Command diff --git a/configuration/i18n/en_US/gui/gui_abiphone.properties b/configuration/i18n/en_US/gui/gui_abiphone.properties index 603f079e3..ed51ed769 100644 --- a/configuration/i18n/en_US/gui/gui_abiphone.properties +++ b/configuration/i18n/en_US/gui/gui_abiphone.properties @@ -4,10 +4,24 @@ # --- GUIAbiphone / AbiphoneView --- gui_abiphone.sort_button = Sort TO-DO -gui_abiphone.sort_button.lore = \n First Added\n Alphabetical\n Last Called\n Most Called\n Do Not Disturb First\n\nRight-click to go backwards!\nClick to switch! +gui_abiphone.sort_button.lore.1= +gui_abiphone.sort_button.lore.2= First Added +gui_abiphone.sort_button.lore.3= Alphabetical +gui_abiphone.sort_button.lore.4= Last Called +gui_abiphone.sort_button.lore.5= Most Called +gui_abiphone.sort_button.lore.6= Do Not Disturb First +gui_abiphone.sort_button.lore.7= +gui_abiphone.sort_button.lore.8=Right-click to go backwards! +gui_abiphone.sort_button.lore.9=Click to switch! gui_abiphone.contacts_directory = Contacts Directory TO-DO -gui_abiphone.contacts_directory.lore = Browse through all NPCs in SkyBlock\nwhich both own an Abiphone AND are\nwilling to add you as a contact.\n\nYour contacts: {contact_count}/{total_contacts}\n\nClick to view contacts! +gui_abiphone.contacts_directory.lore.1=Browse through all NPCs in SkyBlock +gui_abiphone.contacts_directory.lore.2=which both own an Abiphone AND are +gui_abiphone.contacts_directory.lore.3=willing to add you as a contact. +gui_abiphone.contacts_directory.lore.4= +gui_abiphone.contacts_directory.lore.5=Your contacts: / +gui_abiphone.contacts_directory.lore.6= +gui_abiphone.contacts_directory.lore.7=Click to view contacts! gui_abiphone.contact_manage_hint = Right-click to manage! gui_abiphone.contact_call_hint = Left-click to call! @@ -19,13 +33,17 @@ gui_abiphone.ring_3 = \u2706 RING... RING... RING... # --- GUIConfirmAbiphone --- gui_abiphone.confirm.title = Confirm gui_abiphone.confirm.confirm_button = Confirm -gui_abiphone.confirm.confirm_button.lore = Click to remove {npc_name}\nfrom your\ncontacts! +gui_abiphone.confirm.confirm_button.lore.1=Click to remove +gui_abiphone.confirm.confirm_button.lore.2=from your +gui_abiphone.confirm.confirm_button.lore.3=contacts! gui_abiphone.confirm.cancel_button = Cancel # --- GUIContactManagement / GUIContactManagementView --- gui_abiphone.management.title = Contact Management gui_abiphone.management.remove_contact = Remove Contact -gui_abiphone.management.remove_contact.lore = In case you're no longer friends, or\nwhatever other reason.\n \nClick to remove! - -gui_abiphone.management.removed_message = \u2706 Removed {npc_name} from your contacts! +gui_abiphone.management.remove_contact.lore.1=In case you're no longer friends, or +gui_abiphone.management.remove_contact.lore.2=whatever other reason. +gui_abiphone.management.remove_contact.lore.3= +gui_abiphone.management.remove_contact.lore.4=Click to remove! +gui_abiphone.management.removed_message=\u2706 Removed from your contacts! diff --git a/configuration/i18n/en_US/gui/gui_anvil.properties b/configuration/i18n/en_US/gui/gui_anvil.properties index 0164bea67..4d530ab34 100644 --- a/configuration/i18n/en_US/gui/gui_anvil.properties +++ b/configuration/i18n/en_US/gui/gui_anvil.properties @@ -1,26 +1,29 @@ -# ============================================================================= -# Anvil GUI Translations -# ============================================================================= - gui_anvil.title = Anvil gui_anvil.combine_items = Combine Items -gui_anvil.combine_items.lore = Combine the items in the slots to the\nleft and right below. +gui_anvil.combine_items.lore.1=Combine the items in the slots to the +gui_anvil.combine_items.lore.2=left and right below. gui_anvil.result_empty = Anvil -gui_anvil.result_empty.lore = Place a target item in the left slot\nand a sacrifice item in the right slot\nto combine them! +gui_anvil.result_empty.lore.1=Place a target item in the left slot +gui_anvil.result_empty.lore.2=and a sacrifice item in the right slot +gui_anvil.result_empty.lore.3=to combine them! gui_anvil.result_error = Error! gui_anvil.result_error.lore = You can not combine those Items gui_anvil.item_to_upgrade = Item to Upgrade -gui_anvil.item_to_upgrade.lore = The item you want to upgrade should\nbe placed in the slot on this side. +gui_anvil.item_to_upgrade.lore.1=The item you want to upgrade should +gui_anvil.item_to_upgrade.lore.2=be placed in the slot on this side. gui_anvil.item_to_sacrifice = Item to Sacrifice -gui_anvil.item_to_sacrifice.lore = The item you are sacrificing in order\nto upgrade the item on the left\nshould be placed in the slot on this\nside. +gui_anvil.item_to_sacrifice.lore.1=The item you are sacrificing in order +gui_anvil.item_to_sacrifice.lore.2=to upgrade the item on the left +gui_anvil.item_to_sacrifice.lore.3=should be placed in the slot on this +gui_anvil.item_to_sacrifice.lore.4=side. gui_anvil.cost_label = Cost -gui_anvil.cost_exp_levels = {cost} Exp Levels +gui_anvil.cost_exp_levels= Exp Levels gui_anvil.click_to_combine = Click to combine! gui_anvil.claim_result = Anvil diff --git a/configuration/i18n/en_US/gui/gui_auction.properties b/configuration/i18n/en_US/gui/gui_auction.properties index 5ce7a6197..c8dee0b27 100644 --- a/configuration/i18n/en_US/gui/gui_auction.properties +++ b/configuration/i18n/en_US/gui/gui_auction.properties @@ -1,26 +1,40 @@ -# ============================================================ -# Auction GUI - Extracted UI strings -# Source: type.skyblockgeneric/gui/inventories/auction/ -# ============================================================ - # --- GUIAuctionHouse --- gui_auction.house.title = Auction House gui_auction.house.offline_fill = Auction House is currently offline! gui_auction.house.offline_message = Auction House is currently offline! gui_auction.house.stats_button = Auction Stats -gui_auction.house.stats_button.lore = View various statistics about you and\nthe Auction House.\n \nClick to view! +gui_auction.house.stats_button.lore.1=View various statistics about you and +gui_auction.house.stats_button.lore.2=the Auction House. +gui_auction.house.stats_button.lore.3= +gui_auction.house.stats_button.lore.4 = Click to view! gui_auction.house.browser_button = Auctions Browser -gui_auction.house.browser_button.lore = Find items for sale by players\nacross Hypixel SkyBlock!\n \nItems offered here are for auction,\nmeaning you have to place the top\nbid to acquire them!\n \nClick to browse! +gui_auction.house.browser_button.lore.1=Find items for sale by players +gui_auction.house.browser_button.lore.2=across Hypixel SkyBlock! +gui_auction.house.browser_button.lore.3= +gui_auction.house.browser_button.lore.4 = Items offered here are for auction, +gui_auction.house.browser_button.lore.5=meaning you have to place the top +gui_auction.house.browser_button.lore.6=bid to acquire them! +gui_auction.house.browser_button.lore.7= +gui_auction.house.browser_button.lore.8 = Click to browse! gui_auction.house.create_button = Create Auction -gui_auction.house.create_button.lore = Set your own items on auction for\nother players to purchase.\n \nClick to become rich! +gui_auction.house.create_button.lore.1=Set your own items on auction for +gui_auction.house.create_button.lore.2=other players to purchase. +gui_auction.house.create_button.lore.3= +gui_auction.house.create_button.lore.4 = Click to become rich! gui_auction.house.manage_button = Manage Auctions -gui_auction.house.manage_button.lore = You own {count} auctions in progress or\nwhich recently ended.\n \nClick to manage! +gui_auction.house.manage_button.lore.1=You own auctions in progress or +gui_auction.house.manage_button.lore.2=which recently ended. +gui_auction.house.manage_button.lore.3= +gui_auction.house.manage_button.lore.4 = Click to manage! gui_auction.house.bids_button = View Bids -gui_auction.house.bids_button.lore = You've placed bids, check up on\nthem here!\n \nClick to view! +gui_auction.house.bids_button.lore.1=You've placed bids, check up on +gui_auction.house.bids_button.lore.2=them here! +gui_auction.house.bids_button.lore.3= +gui_auction.house.bids_button.lore.4 = Click to view! # --- GUIAuctionBrowser --- gui_auction.browser.title = Auction Browser -gui_auction.browser.title_with_category = Auction Browser - {category} +gui_auction.browser.title_with_category=Auction Browser - gui_auction.browser.offline_message = Auction House is currently offline! gui_auction.browser.sort_button = Sort gui_auction.browser.sort_selected_prefix = > @@ -45,43 +59,85 @@ gui_auction.create.select_item = Click an item in your inventory! gui_auction.create.select_item.lore = Selects it for auction gui_auction.create.auction_for_item = AUCTION FOR ITEM: gui_auction.create.auction_for_item_pickup = Click to pickup! -gui_auction.create.duration_bin.lore = How long the item will be\nup for sale. -gui_auction.create.duration_normal.lore = How long players will be\nable to place bids for.\n \nNote: Bids automatically\nincrease the duration of\nauctions. -gui_auction.create.duration_extra_fee = Extra fee: +{fee} coins +gui_auction.create.duration_bin.lore.1=How long the item will be +gui_auction.create.duration_bin.lore.2=up for sale. +gui_auction.create.duration_normal.lore.1=How long players will be +gui_auction.create.duration_normal.lore.2=able to place bids for. +gui_auction.create.duration_normal.lore.3= +gui_auction.create.duration_normal.lore.4=Note: Bids automatically +gui_auction.create.duration_normal.lore.5=increase the duration of +gui_auction.create.duration_normal.lore.6=auctions. +gui_auction.create.duration_extra_fee=Extra fee: + coins gui_auction.create.duration_click = Click to edit! -gui_auction.create.duration_label = Duration: {duration} +gui_auction.create.duration_label=Duration: gui_auction.create.switch_to_auction = Switch to Auction -gui_auction.create.switch_to_auction.lore = With traditional auctions, multiple\nbuyers compete for the item by\nbidding turn by turn.\n \nClick to switch! +gui_auction.create.switch_to_auction.lore.1=With traditional auctions, multiple +gui_auction.create.switch_to_auction.lore.2=buyers compete for the item by +gui_auction.create.switch_to_auction.lore.3=bidding turn by turn. +gui_auction.create.switch_to_auction.lore.4= +gui_auction.create.switch_to_auction.lore.5 = Click to switch! gui_auction.create.switch_to_bin = Switch to BIN -gui_auction.create.switch_to_bin.lore = BIN Auctions are simple.\n \nSet a price, then one player may buy\nthe item at that price.\n \n(BIN means Buy It Now)\n \nClick to switch! +gui_auction.create.switch_to_bin.lore.1=BIN Auctions are simple. +gui_auction.create.switch_to_bin.lore.2= +gui_auction.create.switch_to_bin.lore.3 = Set a price, then one player may buy +gui_auction.create.switch_to_bin.lore.4=the item at that price. +gui_auction.create.switch_to_bin.lore.5= +gui_auction.create.switch_to_bin.lore.6 = (BIN means Buy It Now) +gui_auction.create.switch_to_bin.lore.7= +gui_auction.create.switch_to_bin.lore.8 = Click to switch! gui_auction.create.submit_no_item = Create Auction -gui_auction.create.submit_no_item.lore = No item selected!\n \nClick an item in your inventory to\nselect it for this auction. -gui_auction.create.submit_ready = Create {type}Auction -gui_auction.create.submit_ready.lore = This item will be added to the auction\nhouse for other players to\npurchase.\n \nItem: {item_name}\nAuction Duration: {duration}\n{price_label}: {price} coins\n \nCreation fee: +{fee} coins\n \nClick to submit! +gui_auction.create.submit_no_item.lore.1=No item selected! +gui_auction.create.submit_no_item.lore.2= +gui_auction.create.submit_no_item.lore.3 = Click an item in your inventory to +gui_auction.create.submit_no_item.lore.4=select it for this auction. +gui_auction.create.submit_ready=Create Auction +gui_auction.create.submit_ready.lore.1=This item will be added to the auction +gui_auction.create.submit_ready.lore.2=house for other players to +gui_auction.create.submit_ready.lore.3=purchase. +gui_auction.create.submit_ready.lore.4= +gui_auction.create.submit_ready.lore.5 = Item: +gui_auction.create.submit_ready.lore.6=Auction Duration: +gui_auction.create.submit_ready.lore.7=: coins +gui_auction.create.submit_ready.lore.8= +gui_auction.create.submit_ready.lore.9 = Creation fee: + coins +gui_auction.create.submit_ready.lore.10= +gui_auction.create.submit_ready.lore.11 = Click to submit! gui_auction.create.submit_click = Click to submit! gui_auction.create.price_bin_label = Item Price gui_auction.create.price_normal_label = Starting bid -gui_auction.create.price_bin.lore = The price at which you want\nto sell this item. -gui_auction.create.price_normal.lore = The minimum price a player\ncan offer to obtain your\nitem.\n \nOnce a player bids for your\nitem, other players will\nhave until the auction ends\nto make a higher bid. -gui_auction.create.price_extra_fee = Extra fee: +{fee} coins (5%) +gui_auction.create.price_bin.lore.1=The price at which you want +gui_auction.create.price_bin.lore.2=to sell this item. +gui_auction.create.price_normal.lore.1=The minimum price a player +gui_auction.create.price_normal.lore.2=can offer to obtain your +gui_auction.create.price_normal.lore.3=item. +gui_auction.create.price_normal.lore.4= +gui_auction.create.price_normal.lore.5=Once a player bids for your +gui_auction.create.price_normal.lore.6=item, other players will +gui_auction.create.price_normal.lore.7=have until the auction ends +gui_auction.create.price_normal.lore.8=to make a higher bid. +gui_auction.create.price_extra_fee=Extra fee: + coins (5%) gui_auction.create.price_click = Click to edit! -gui_auction.create.price_label_bin = Item Price: {price} coins -gui_auction.create.price_label_normal = Starting bid: {price} coins +gui_auction.create.price_label_bin=Item Price: coins +gui_auction.create.price_label_normal=Starting bid: coins gui_auction.create.not_enough_coins = You don't have enough coins to create this auction! gui_auction.create.escrow_message = Putting item in escrow... gui_auction.create.setup_message = Setting up the auction... -gui_auction.create.started_message = Auction started for {item_name}! -gui_auction.create.started_id = ID: {uuid} +gui_auction.create.started_message=Auction started for ! +gui_auction.create.started_id=ID: gui_auction.create.number_parse_error = Could not read this number! gui_auction.create.price_too_low = That price is too low for your item! gui_auction.create.already_have_item = You already have an item in the auction slot! # --- GUIAuctionDuration --- gui_auction.duration.title = Auction Duration -gui_auction.duration.hours = {hours} Hours +gui_auction.duration.hours= Hours gui_auction.duration.hours_click = Click to set this duration! gui_auction.duration.custom = Custom Duration -gui_auction.duration.custom.lore = Specify how long you want\nthe auction to last.\n \nRight-click for minutes!\nLeft-click to set hours! +gui_auction.duration.custom.lore.1=Specify how long you want +gui_auction.duration.custom.lore.2=the auction to last. +gui_auction.duration.custom.lore.3= +gui_auction.duration.custom.lore.4 = Right-click for minutes! +gui_auction.duration.custom.lore.5=Left-click to set hours! gui_auction.duration.number_parse_error = Could not read this number! gui_auction.duration.invalid_time = Invalid time amount! gui_auction.duration.max_exceeded = You can only put an auction up to a maximum of 14 days! @@ -89,9 +145,37 @@ gui_auction.duration.max_exceeded = You can only put an auction up to a max # --- GUIAuctionHouseStats --- gui_auction.stats.title = Auction Stats gui_auction.stats.seller_stats = Seller Stats -gui_auction.stats.seller_stats.lore = Auctions created: {auctions_created}\nAuctions completed without bids: {completed_without_bids}\nAuctions completed with bids: {completed_with_bids}\n \nHighest auction held: {highest_auction}\nTotal coins earned: {total_earned}\nCoins spent on fees: {fees_spent}\n \nCommon Sold: {common_sold}\nUncommon Sold: {uncommon_sold}\nRare Sold: {rare_sold}\nEpic Sold: {epic_sold}\nLegendary Sold: {legendary_sold}\nMythic Sold: {mythic_sold}\nSpecial Sold: {special_sold}\nUltimate Sold: {ultimate_sold} +gui_auction.stats.seller_stats.lore.1=Auctions created: +gui_auction.stats.seller_stats.lore.2=Auctions completed without bids: +gui_auction.stats.seller_stats.lore.3=Auctions completed with bids: +gui_auction.stats.seller_stats.lore.4= +gui_auction.stats.seller_stats.lore.5 = Highest auction held: +gui_auction.stats.seller_stats.lore.6=Total coins earned: +gui_auction.stats.seller_stats.lore.7=Coins spent on fees: +gui_auction.stats.seller_stats.lore.8= +gui_auction.stats.seller_stats.lore.9 = Common Sold: +gui_auction.stats.seller_stats.lore.10=Uncommon Sold: +gui_auction.stats.seller_stats.lore.11=Rare Sold: +gui_auction.stats.seller_stats.lore.12=Epic Sold: +gui_auction.stats.seller_stats.lore.13=Legendary Sold: +gui_auction.stats.seller_stats.lore.14=Mythic Sold: +gui_auction.stats.seller_stats.lore.15=Special Sold: +gui_auction.stats.seller_stats.lore.16=Ultimate Sold: gui_auction.stats.buyer_stats = Buyer Stats -gui_auction.stats.buyer_stats.lore = Auctions won: {auctions_won}\nTotal bids: {total_bids}\n \nHighest bid made: {highest_bid}\nTotal coins spent: {total_spent}\n \nCommon Bought: {common_bought}\nUncommon Bought: {uncommon_bought}\nRare Bought: {rare_bought}\nEpic Bought: {epic_bought}\nLegendary Bought: {legendary_bought}\nMythic Bought: {mythic_bought}\nSpecial Bought: {special_bought}\nUltimate Bought: {ultimate_bought} +gui_auction.stats.buyer_stats.lore.1=Auctions won: +gui_auction.stats.buyer_stats.lore.2=Total bids: +gui_auction.stats.buyer_stats.lore.3= +gui_auction.stats.buyer_stats.lore.4 = Highest bid made: +gui_auction.stats.buyer_stats.lore.5=Total coins spent: +gui_auction.stats.buyer_stats.lore.6= +gui_auction.stats.buyer_stats.lore.7 = Common Bought: +gui_auction.stats.buyer_stats.lore.8=Uncommon Bought: +gui_auction.stats.buyer_stats.lore.9=Rare Bought: +gui_auction.stats.buyer_stats.lore.10=Epic Bought: +gui_auction.stats.buyer_stats.lore.11=Legendary Bought: +gui_auction.stats.buyer_stats.lore.12=Mythic Bought: +gui_auction.stats.buyer_stats.lore.13=Special Bought: +gui_auction.stats.buyer_stats.lore.14=Ultimate Bought: # --- GUIAuctionViewItem --- gui_auction.view.title = Auction View @@ -101,7 +185,10 @@ gui_auction.view.offline_message = Auction House is currently offline! gui_auction.manage.title = Manage Auctions gui_auction.manage.offline_message = Auction House is currently offline! gui_auction.manage.create_button = Create Auction -gui_auction.manage.create_button.lore = Set your own items on auction for\nother players to purchase.\n \nClick to become rich! +gui_auction.manage.create_button.lore.1=Set your own items on auction for +gui_auction.manage.create_button.lore.2=other players to purchase. +gui_auction.manage.create_button.lore.3= +gui_auction.manage.create_button.lore.4 = Click to become rich! # --- GUIViewBids --- gui_auction.bids.title = Your Bids @@ -109,74 +196,155 @@ gui_auction.bids.offline_message = Auction House is currently offline! # --- AuctionViewSelfBIN --- gui_auction.view_self_bin.collect_auction = Collect Auction -gui_auction.view_self_bin.collect_sold.lore = \nThis item has been sold!\n \n{buyer_name} bought it for {price} coins\n \nClick to collect coins! +gui_auction.view_self_bin.collect_sold.lore.1= +gui_auction.view_self_bin.collect_sold.lore.2 = This item has been sold! +gui_auction.view_self_bin.collect_sold.lore.3= +gui_auction.view_self_bin.collect_sold.lore.4 = bought it for coins +gui_auction.view_self_bin.collect_sold.lore.5= +gui_auction.view_self_bin.collect_sold.lore.6 = Click to collect coins! gui_auction.view_self_bin.claiming_coins = Claiming your coins... -gui_auction.view_self_bin.collected_coins = You collected {amount} coins from the auction! +gui_auction.view_self_bin.collected_coins=You collected coins from the auction! gui_auction.view_self_bin.cannot_buy_own = You Cannot Buy Your Own Item -gui_auction.view_self_bin.cannot_buy_own_claimed.lore = \nYou cannot buy your own item!\n \nYou have already claimed your item! +gui_auction.view_self_bin.cannot_buy_own_claimed.lore.1= +gui_auction.view_self_bin.cannot_buy_own_claimed.lore.2 = You cannot buy your own item! +gui_auction.view_self_bin.cannot_buy_own_claimed.lore.3= +gui_auction.view_self_bin.cannot_buy_own_claimed.lore.4 = You have already claimed your item! gui_auction.view_self_bin.claim_item_back = Claim Item Back -gui_auction.view_self_bin.claim_item_back.lore = \nThis auction has ended!\nNobody bought it :(\n \nClick to claim it back! +gui_auction.view_self_bin.claim_item_back.lore.1= +gui_auction.view_self_bin.claim_item_back.lore.2 = This auction has ended! +gui_auction.view_self_bin.claim_item_back.lore.3=Nobody bought it :( +gui_auction.view_self_bin.claim_item_back.lore.4= +gui_auction.view_self_bin.claim_item_back.lore.5 = Click to claim it back! gui_auction.view_self_bin.claiming_item = Claiming your item... gui_auction.view_self_bin.claimed_item = You have claimed your item. -gui_auction.view_self_bin.cannot_buy_own_expired.lore = \nYou cannot buy your own item!\n \nThis item has expired and has been returned to you. -gui_auction.view_self_bin.cannot_buy_own_active.lore = \nYou cannot buy your own item!\n \nYou can only buy items from other players. +gui_auction.view_self_bin.cannot_buy_own_expired.lore.1= +gui_auction.view_self_bin.cannot_buy_own_expired.lore.2 = You cannot buy your own item! +gui_auction.view_self_bin.cannot_buy_own_expired.lore.3= +gui_auction.view_self_bin.cannot_buy_own_expired.lore.4 = This item has expired and has been returned to you. +gui_auction.view_self_bin.cannot_buy_own_active.lore.1= +gui_auction.view_self_bin.cannot_buy_own_active.lore.2 = You cannot buy your own item! +gui_auction.view_self_bin.cannot_buy_own_active.lore.3= +gui_auction.view_self_bin.cannot_buy_own_active.lore.4 = You can only buy items from other players. # --- AuctionViewSelfNormal --- gui_auction.view_self_normal.bid_history = Bid History -gui_auction.view_self_normal.bid_history_total = Total bids: {count} bids +gui_auction.view_self_normal.bid_history_total=Total bids: bids gui_auction.view_self_normal.bid_separator = --------------- -gui_auction.view_self_normal.bid_value = Bid: {value} coins -gui_auction.view_self_normal.bid_by = By: {player_name} +gui_auction.view_self_normal.bid_value=Bid: coins +gui_auction.view_self_normal.bid_by=By: gui_auction.view_self_normal.collect_auction = Collect Auction -gui_auction.view_self_normal.collect_no_bids.lore = \nThis auction has ended!\n \nNoone bid on this auction!\n \nClick to collect your item! -gui_auction.view_self_normal.collect_with_bids.lore = \nThis auction has ended!\n \nThe highest bid was {amount} coins\n \nClick to collect coins! -gui_auction.view_self_normal.collected_coins = You collected {amount} coins from the auction! +gui_auction.view_self_normal.collect_no_bids.lore.1= +gui_auction.view_self_normal.collect_no_bids.lore.2 = This auction has ended! +gui_auction.view_self_normal.collect_no_bids.lore.3= +gui_auction.view_self_normal.collect_no_bids.lore.4 = Noone bid on this auction! +gui_auction.view_self_normal.collect_no_bids.lore.5= +gui_auction.view_self_normal.collect_no_bids.lore.6 = Click to collect your item! +gui_auction.view_self_normal.collect_with_bids.lore.1= +gui_auction.view_self_normal.collect_with_bids.lore.2 = This auction has ended! +gui_auction.view_self_normal.collect_with_bids.lore.3= +gui_auction.view_self_normal.collect_with_bids.lore.4 = The highest bid was coins +gui_auction.view_self_normal.collect_with_bids.lore.5= +gui_auction.view_self_normal.collect_with_bids.lore.6 = Click to collect coins! +gui_auction.view_self_normal.collected_coins=You collected coins from the auction! gui_auction.view_self_normal.auction_ended = Auction Ended -gui_auction.view_self_normal.auction_ended_claimed.lore = \nThis auction has ended!\n \nThe highest bid was {amount} coins\n \nYou have already collected your coins! +gui_auction.view_self_normal.auction_ended_claimed.lore.1= +gui_auction.view_self_normal.auction_ended_claimed.lore.2 = This auction has ended! +gui_auction.view_self_normal.auction_ended_claimed.lore.3= +gui_auction.view_self_normal.auction_ended_claimed.lore.4 = The highest bid was coins +gui_auction.view_self_normal.auction_ended_claimed.lore.5= +gui_auction.view_self_normal.auction_ended_claimed.lore.6 = You have already collected your coins! gui_auction.view_self_normal.own_auction = Your Own Auction -gui_auction.view_self_normal.own_auction.lore = You cannot buy your own item!\nAllow it to end and collect your coins. +gui_auction.view_self_normal.own_auction.lore.1=You cannot buy your own item! +gui_auction.view_self_normal.own_auction.lore.2=Allow it to end and collect your coins. # --- AuctionViewThirdBin --- gui_auction.view_third_bin.claim_item = Claim Item -gui_auction.view_third_bin.claim_sold.lore = \nThis item has been sold!\n \n{buyer_name} bought it for {price} coins\n \nClick to claim item! +gui_auction.view_third_bin.claim_sold.lore.1= +gui_auction.view_third_bin.claim_sold.lore.2 = This item has been sold! +gui_auction.view_third_bin.claim_sold.lore.3= +gui_auction.view_third_bin.claim_sold.lore.4 = bought it for coins +gui_auction.view_third_bin.claim_sold.lore.5= +gui_auction.view_third_bin.claim_sold.lore.6 = Click to claim item! gui_auction.view_third_bin.claiming_item = Claiming your item... gui_auction.view_third_bin.claimed_item = You have claimed your item. gui_auction.view_third_bin.item_sold = Item Has Been Sold -gui_auction.view_third_bin.item_sold_claimed.lore = \nThis item has been sold!\n \n{buyer_name} bought it for {price} coins\n \nYou have already claimed this item! -gui_auction.view_third_bin.item_sold_other.lore = \nThis item has been sold!\n \n{buyer_name} bought it for {price} coins\n \nYou can no longer purchase this item. +gui_auction.view_third_bin.item_sold_claimed.lore.1= +gui_auction.view_third_bin.item_sold_claimed.lore.2 = This item has been sold! +gui_auction.view_third_bin.item_sold_claimed.lore.3= +gui_auction.view_third_bin.item_sold_claimed.lore.4 = bought it for coins +gui_auction.view_third_bin.item_sold_claimed.lore.5= +gui_auction.view_third_bin.item_sold_claimed.lore.6 = You have already claimed this item! +gui_auction.view_third_bin.item_sold_other.lore.1= +gui_auction.view_third_bin.item_sold_other.lore.2 = This item has been sold! +gui_auction.view_third_bin.item_sold_other.lore.3= +gui_auction.view_third_bin.item_sold_other.lore.4 = bought it for coins +gui_auction.view_third_bin.item_sold_other.lore.5= +gui_auction.view_third_bin.item_sold_other.lore.6 = You can no longer purchase this item. gui_auction.view_third_bin.buy_now = Buy Item Right Now -gui_auction.view_third_bin.buy_now.lore = \nPrice: {price} coins\n \nClick to purchase! +gui_auction.view_third_bin.buy_now.lore.1= +gui_auction.view_third_bin.buy_now.lore.2 = Price: coins +gui_auction.view_third_bin.buy_now.lore.3= +gui_auction.view_third_bin.buy_now.lore.4 = Click to purchase! gui_auction.view_third_bin.not_enough_coins = You do not have enough coins to purchase this item! gui_auction.view_third_bin.escrow_message = Putting coins in escrow... gui_auction.view_third_bin.processing = Processing purchase... gui_auction.view_third_bin.already_sold = Couldn't purchase the item, it has been sold! gui_auction.view_third_bin.returning_escrow = Returning escrowed coins... gui_auction.view_third_bin.same_coop = Cannot purchase an item from someone in the same coop! -gui_auction.view_third_bin.purchased = You purchased {item_name} for {price} coins! -gui_auction.view_third_bin.owner_notification = [Auction] {buyer_name} just purchased your item {item_name}! +gui_auction.view_third_bin.purchased=You purchased for coins! +gui_auction.view_third_bin.owner_notification=[Auction] just purchased your item ! # --- AuctionViewThirdNormal --- gui_auction.view_third_normal.bid_history = Bid History -gui_auction.view_third_normal.bid_history_total = Total bids: {count} bids +gui_auction.view_third_normal.bid_history_total=Total bids: bids gui_auction.view_third_normal.bid_separator = --------------- -gui_auction.view_third_normal.bid_value = Bid: {value} coins -gui_auction.view_third_normal.bid_by = By: {player_name} +gui_auction.view_third_normal.bid_value=Bid: coins +gui_auction.view_third_normal.bid_by=By: gui_auction.view_third_normal.auction_ended_lost = Auction Ended -gui_auction.view_third_normal.auction_ended_lost_claim.lore = This auction has ended.\nYou did not win this auction.\n \nYou can claim your {amount} coins back.\n \nClick to claim coins! +gui_auction.view_third_normal.auction_ended_lost_claim.lore.1=This auction has ended. +gui_auction.view_third_normal.auction_ended_lost_claim.lore.2=You did not win this auction. +gui_auction.view_third_normal.auction_ended_lost_claim.lore.3= +gui_auction.view_third_normal.auction_ended_lost_claim.lore.4 = You can claim your coins back. +gui_auction.view_third_normal.auction_ended_lost_claim.lore.5= +gui_auction.view_third_normal.auction_ended_lost_claim.lore.6 = Click to claim coins! gui_auction.view_third_normal.claiming_bid_coins = Claiming your bid coins back... -gui_auction.view_third_normal.coins_returned = You have had {amount} coins returned to you. -gui_auction.view_third_normal.auction_ended_lost_no_claim.lore = This auction has ended.\nYou did not win this auction.\n \nYou either did not bid or you\nhave claimed your coins back. +gui_auction.view_third_normal.coins_returned=You have had coins returned to you. +gui_auction.view_third_normal.auction_ended_lost_no_claim.lore.1=This auction has ended. +gui_auction.view_third_normal.auction_ended_lost_no_claim.lore.2=You did not win this auction. +gui_auction.view_third_normal.auction_ended_lost_no_claim.lore.3= +gui_auction.view_third_normal.auction_ended_lost_no_claim.lore.4 = You either did not bid or you +gui_auction.view_third_normal.auction_ended_lost_no_claim.lore.5=have claimed your coins back. gui_auction.view_third_normal.auction_ended_won = Auction Ended -gui_auction.view_third_normal.auction_ended_won_claim.lore = This auction has ended.\nYou won this auction.\n \nYou can claim your item.\n \nClick to claim item! +gui_auction.view_third_normal.auction_ended_won_claim.lore.1=This auction has ended. +gui_auction.view_third_normal.auction_ended_won_claim.lore.2=You won this auction. +gui_auction.view_third_normal.auction_ended_won_claim.lore.3= +gui_auction.view_third_normal.auction_ended_won_claim.lore.4 = You can claim your item. +gui_auction.view_third_normal.auction_ended_won_claim.lore.5= +gui_auction.view_third_normal.auction_ended_won_claim.lore.6 = Click to claim item! gui_auction.view_third_normal.claiming_item = Claiming your item... gui_auction.view_third_normal.claimed_item = You have claimed your item. -gui_auction.view_third_normal.auction_ended_won_claimed.lore = This auction has ended.\nYou won this auction.\n \nYou have already claimed your item. -gui_auction.view_third_normal.bid_amount = Bid Amount: {amount} -gui_auction.view_third_normal.bid_amount.lore = You need to bid at least {minimum} coins to\nhold the top bid on this auction.\n \nThe top bid on auction end wins the\nitem.\n \nIf you do not win, you can claim your\nbid coins back.\n \nClick to edit amount! +gui_auction.view_third_normal.auction_ended_won_claimed.lore.1=This auction has ended. +gui_auction.view_third_normal.auction_ended_won_claimed.lore.2=You won this auction. +gui_auction.view_third_normal.auction_ended_won_claimed.lore.3= +gui_auction.view_third_normal.auction_ended_won_claimed.lore.4 = You have already claimed your item. +gui_auction.view_third_normal.bid_amount=Bid Amount: +gui_auction.view_third_normal.bid_amount.lore.1=You need to bid at least coins to +gui_auction.view_third_normal.bid_amount.lore.2=hold the top bid on this auction. +gui_auction.view_third_normal.bid_amount.lore.3= +gui_auction.view_third_normal.bid_amount.lore.4 = The top bid on auction end wins the +gui_auction.view_third_normal.bid_amount.lore.5=item. +gui_auction.view_third_normal.bid_amount.lore.6= +gui_auction.view_third_normal.bid_amount.lore.7 = If you do not win, you can claim your +gui_auction.view_third_normal.bid_amount.lore.8=bid coins back. +gui_auction.view_third_normal.bid_amount.lore.9= +gui_auction.view_third_normal.bid_amount.lore.10 = Click to edit amount! gui_auction.view_third_normal.submit_bid = Submit Bid -gui_auction.view_third_normal.submit_bid.lore = \nNew Bid: {amount} coins\n \nClick to bid! +gui_auction.view_third_normal.submit_bid.lore.1= +gui_auction.view_third_normal.submit_bid.lore.2 = New Bid: coins +gui_auction.view_third_normal.submit_bid.lore.3= +gui_auction.view_third_normal.submit_bid.lore.4 = Click to bid! gui_auction.view_third_normal.number_parse_error = Could not read this number! -gui_auction.view_third_normal.bid_too_low = You need to bid at least {minimum} coins to hold the top bid on this auction. +gui_auction.view_third_normal.bid_too_low=You need to bid at least coins to hold the top bid on this auction. gui_auction.view_third_normal.not_enough_coins = You do not have enough coins to bid this amount! gui_auction.view_third_normal.already_top_bid = You already have the top bid on this auction! gui_auction.view_third_normal.escrow_message = Putting coins in escrow... @@ -185,6 +353,6 @@ gui_auction.view_third_normal.returning_escrow = Returning escrowed c gui_auction.view_third_normal.processing_bid = Processing bid... gui_auction.view_third_normal.bid_changed = Couldn't place your bid, the highest bid has changed! gui_auction.view_third_normal.auction_ended_error = Couldn't place your bid, the auction has ended! -gui_auction.view_third_normal.bid_placed = Bid of {amount} coins placed! -gui_auction.view_third_normal.outbid_notification = [Auction] {bidder_name} outbid you by {difference} coins for the item {item_name}! -gui_auction.view_third_normal.owner_bid_notification = [Auction] {bidder_name} placed a bid of {amount} coins on your item {item_name}! +gui_auction.view_third_normal.bid_placed=Bid of coins placed! +gui_auction.view_third_normal.outbid_notification=[Auction] outbid you by coins for the item ! +gui_auction.view_third_normal.owner_bid_notification=[Auction] placed a bid of coins on your item ! diff --git a/configuration/i18n/en_US/gui/gui_banker.properties b/configuration/i18n/en_US/gui/gui_banker.properties index fefa9785d..4e2218344 100644 --- a/configuration/i18n/en_US/gui/gui_banker.properties +++ b/configuration/i18n/en_US/gui/gui_banker.properties @@ -10,21 +10,47 @@ gui_banker.main.title_coop = Co-op Bank Account gui_banker.main.processing_transactions = You currently have processing transactions! gui_banker.main.processing_wait = Please wait a moment before accessing your bank account. gui_banker.main.information = Information -gui_banker.main.information.lore = Keep your coins safe in the bank!\nYou lose half the coins in your purse when dying in combat.\n \nBalance limit: {limit} Coins\n \nThe banker rewards you every 31\nhours with interest for the coins in your bank balance.\n \nInterest is in: {hours}h +gui_banker.main.information.lore.1=Keep your coins safe in the bank! +gui_banker.main.information.lore.2=You lose half the coins in your purse when dying in combat. +gui_banker.main.information.lore.3= +gui_banker.main.information.lore.4 = Balance limit: Coins +gui_banker.main.information.lore.5= +gui_banker.main.information.lore.6 = The banker rewards you every 31 +gui_banker.main.information.lore.7=hours with interest for the coins in your bank balance. +gui_banker.main.information.lore.8= +gui_banker.main.information.lore.9=Interest is in: h gui_banker.main.deposit = Deposit Coins -gui_banker.main.deposit.lore = Current balance: {balance}\n \nStore coins in the bank to keep\nthem safe while you go on\non adventures!\n \nYou will earn 2% interest every\nseason for your first 10 million\nbanked coins.\n \nUntil interest: {hours}h\n \nClick to make a deposit! +gui_banker.main.deposit.lore.1=Current balance: +gui_banker.main.deposit.lore.2= +gui_banker.main.deposit.lore.3 = Store coins in the bank to keep +gui_banker.main.deposit.lore.4=them safe while you go on +gui_banker.main.deposit.lore.5=on adventures! +gui_banker.main.deposit.lore.6= +gui_banker.main.deposit.lore.7 = You will earn 2% interest every +gui_banker.main.deposit.lore.8=season for your first 10 million +gui_banker.main.deposit.lore.9=banked coins. +gui_banker.main.deposit.lore.10= +gui_banker.main.deposit.lore.11 = Until interest: h +gui_banker.main.deposit.lore.12= +gui_banker.main.deposit.lore.13 = Click to make a deposit! gui_banker.main.withdraw = Withdraw Coins -gui_banker.main.withdraw.lore = Current balance: {balance}\n \nWithdraw coins from the bank\nto use them for trading or\nother purposes!\n \nClick to make a withdrawal! +gui_banker.main.withdraw.lore.1=Current balance: +gui_banker.main.withdraw.lore.2= +gui_banker.main.withdraw.lore.3 = Withdraw coins from the bank +gui_banker.main.withdraw.lore.4=to use them for trading or +gui_banker.main.withdraw.lore.5=other purposes! +gui_banker.main.withdraw.lore.6= +gui_banker.main.withdraw.lore.7 = Click to make a withdrawal! gui_banker.main.recent_transactions = Recent Transactions gui_banker.main.no_transactions = No transactions yet! -gui_banker.main.transaction_entry = {sign} {amount}, {time_ago} by {originator} +gui_banker.main.transaction_entry= , by # --- GUIBankerDeposit --- gui_banker.deposit.title = Bank Deposit gui_banker.deposit.whole_purse = Your whole purse gui_banker.deposit.whole_purse_subtitle = Bank deposit -gui_banker.deposit.current_balance = Current balance: {balance} -gui_banker.deposit.amount_to_deposit = Amount to deposit: {amount} +gui_banker.deposit.current_balance=Current balance: +gui_banker.deposit.amount_to_deposit=Amount to deposit: gui_banker.deposit.click = Click to deposit coins! gui_banker.deposit.half_purse = Half of your purse gui_banker.deposit.custom_amount = Custom amount @@ -32,17 +58,17 @@ gui_banker.deposit.custom_amount_label = Amount to deposit: Custom gui_banker.deposit.not_enough_coins = You do not have that many coins to deposit! gui_banker.deposit.invalid_amount = You cannot deposit that amount! gui_banker.deposit.invalid_number = That is not a valid number! -gui_banker.deposit.exceed_limit = You cannot deposit that much, you would exceed your balance limit of {limit} coins! +gui_banker.deposit.exceed_limit=You cannot deposit that much, you would exceed your balance limit of coins! gui_banker.deposit.depositing = Depositing coins... -gui_banker.deposit.success = You have deposited {amount} coins! You now have {balance} coins in your account. +gui_banker.deposit.success=You have deposited coins! You now have coins in your account. gui_banker.deposit.coop_busy = You cannot deposit coins as your coop members are currently using the bank. # --- GUIBankerWithdraw --- gui_banker.withdraw.title = Bank Withdrawal gui_banker.withdraw.everything = Everything in the account gui_banker.withdraw.everything_subtitle = Bank withdrawal -gui_banker.withdraw.current_balance = Current balance: {balance} -gui_banker.withdraw.amount_to_withdraw = Amount to withdraw: {amount} +gui_banker.withdraw.current_balance=Current balance: +gui_banker.withdraw.amount_to_withdraw=Amount to withdraw: gui_banker.withdraw.click = Click to withdraw coins! gui_banker.withdraw.half_account = Half of the account gui_banker.withdraw.twenty_percent = 20% of the account @@ -51,5 +77,5 @@ gui_banker.withdraw.not_enough_coins = You do not have that many coins to w gui_banker.withdraw.invalid_amount = You cannot withdraw that amount! gui_banker.withdraw.invalid_number = That is not a valid number! gui_banker.withdraw.withdrawing = Withdrawing coins... -gui_banker.withdraw.success = You have withdrawn {amount} coins! You now have {balance} coins in your account. +gui_banker.withdraw.success=You have withdrawn coins! You now have coins in your account. gui_banker.withdraw.coop_busy = You cannot withdraw coins as your coop members are currently using the bank. diff --git a/configuration/i18n/en_US/gui/gui_bazaar.properties b/configuration/i18n/en_US/gui/gui_bazaar.properties index d189fd237..2772f5551 100644 --- a/configuration/i18n/en_US/gui/gui_bazaar.properties +++ b/configuration/i18n/en_US/gui/gui_bazaar.properties @@ -1,33 +1,32 @@ -# ============================================================ -# Bazaar GUI - Extracted UI strings -# Source: type.skyblockgeneric/gui/inventories/bazaar/ -# ============================================================ - # --- GUIBazaar --- -gui_bazaar.main.title = Bazaar \u2192 {category} +gui_bazaar.main.title=Bazaar \u2192 gui_bazaar.main.manage_orders_button = Manage Orders -gui_bazaar.main.manage_orders_button.lore = View your pending Bazaar orders\nClick to open +gui_bazaar.main.manage_orders_button.lore.1=View your pending Bazaar orders +gui_bazaar.main.manage_orders_button.lore.2=Click to open gui_bazaar.main.category_subtitle = Category gui_bazaar.main.category_viewing = Currently Viewing gui_bazaar.main.category_click = Click to view! gui_bazaar.main.loading = Loading... gui_bazaar.main.error_loading = Error Loading -gui_bazaar.main.error_loading.lore = Failed to load bazaar data\nPlease try again later -gui_bazaar.main.item_set_products = {count} products +gui_bazaar.main.error_loading.lore.1=Failed to load bazaar data +gui_bazaar.main.error_loading.lore.2=Please try again later +gui_bazaar.main.item_set_products= products gui_bazaar.main.item_set_click = Click to view products! gui_bazaar.main.offline_message = The Bazaar is currently offline! # --- GUIBazaarItemSet --- -gui_bazaar.item_set.title = {category} -> {set_name} +gui_bazaar.item_set.title= -> gui_bazaar.item_set.manage_orders_button = Manage Orders -gui_bazaar.item_set.manage_orders_button.lore = View your pending Bazaar orders\n \nClick to manage! -gui_bazaar.item_set.commodity_label = {rarity} commodity -gui_bazaar.item_set.buy_price = Buy price: {price} coins -gui_bazaar.item_set.buy_price_best = {price} best offer +gui_bazaar.item_set.manage_orders_button.lore.1=View your pending Bazaar orders +gui_bazaar.item_set.manage_orders_button.lore.2= +gui_bazaar.item_set.manage_orders_button.lore.3 = Click to manage! +gui_bazaar.item_set.commodity_label= commodity +gui_bazaar.item_set.buy_price=Buy price: coins +gui_bazaar.item_set.buy_price_best= best offer gui_bazaar.item_set.buy_price_none = Buy price: No offers gui_bazaar.item_set.buy_price_none_desc = No sell orders available -gui_bazaar.item_set.sell_price = Sell price: {price} coins -gui_bazaar.item_set.sell_price_best = {price} best bid +gui_bazaar.item_set.sell_price=Sell price: coins +gui_bazaar.item_set.sell_price_best= best bid gui_bazaar.item_set.sell_price_none = Sell price: No orders gui_bazaar.item_set.sell_price_none_desc = No buy orders available gui_bazaar.item_set.click_to_view = Click to view details! @@ -36,94 +35,97 @@ gui_bazaar.item_set.error_try_again = Please try again later gui_bazaar.item_set.offline_message = The Bazaar is currently offline! # --- GUIBazaarItem --- -gui_bazaar.item.title = {set_name} \u2192 {item_name} +gui_bazaar.item.title= \u2192 gui_bazaar.item.manage_orders_button = Manage Orders -gui_bazaar.item.manage_orders_button.lore = View your pending Bazaar orders\nClick to open +gui_bazaar.item.manage_orders_button.lore.1=View your pending Bazaar orders +gui_bazaar.item.manage_orders_button.lore.2=Click to open gui_bazaar.item.go_back_bazaar = Go Back gui_bazaar.item.go_back_bazaar.lore = To Bazaar gui_bazaar.item.buy_instantly = Buy Instantly gui_bazaar.item.buy_instantly_subtitle = Instant Buy gui_bazaar.item.buy_no_offers = No sell offers available -gui_bazaar.item.buy_price = Price: {price} coins (+4% fee) -gui_bazaar.item.buy_max_space = Max space: {amount}x +gui_bazaar.item.buy_price=Price: coins (+4% fee) +gui_bazaar.item.buy_max_space=Max space: x gui_bazaar.item.buy_click = Click to select amount! gui_bazaar.item.buy_no_offers_message = [Bazaar] No sell offers available! gui_bazaar.item.buy_inventory_full = [Bazaar] Inventory full! -gui_bazaar.item.buy_need_coins = [Bazaar] Need {amount} coins! +gui_bazaar.item.buy_need_coins=[Bazaar] Need coins! gui_bazaar.item.sell_instantly = Sell Instantly gui_bazaar.item.sell_instantly_subtitle = Instant Sell gui_bazaar.item.sell_have_zero = You have: 0x -gui_bazaar.item.sell_have = You have: {amount}x +gui_bazaar.item.sell_have=You have: x gui_bazaar.item.sell_no_orders = No buy orders available -gui_bazaar.item.sell_price = Price: {price} coins +gui_bazaar.item.sell_price=Price: coins gui_bazaar.item.sell_click = Click to select amount! -gui_bazaar.item.sell_no_items = [Bazaar] You don't have any {item_name}! +gui_bazaar.item.sell_no_items=[Bazaar] You don't have any ! gui_bazaar.item.sell_no_orders_message = [Bazaar] No buy orders available! gui_bazaar.item.create_buy_order = Create Buy Order gui_bazaar.item.create_buy_order_subtitle = Create Buy Order gui_bazaar.item.create_buy_order_max = Max space: 71680x -gui_bazaar.item.create_buy_order_best_ask = Best ask: {price} coins +gui_bazaar.item.create_buy_order_best_ask=Best ask: coins gui_bazaar.item.create_buy_order_click = Click to create order! -gui_bazaar.item.buy_order_need_coins = [Bazaar] Need {amount} coins! -gui_bazaar.item.buy_order_escrow = [Bazaar] Escrowing {amount} coins... -gui_bazaar.item.buy_order_created = [Bazaar] Buy order created for {amount}x at {price} coins each! -gui_bazaar.item.buy_order_failed = [Bazaar] Failed! Refunded {amount} coins. +gui_bazaar.item.buy_order_need_coins=[Bazaar] Need coins! +gui_bazaar.item.buy_order_escrow=[Bazaar] Escrowing coins... +gui_bazaar.item.buy_order_created=[Bazaar] Buy order created for x at coins each! +gui_bazaar.item.buy_order_failed=[Bazaar] Failed! Refunded coins. gui_bazaar.item.create_sell_order = Create Sell Order gui_bazaar.item.create_sell_order_subtitle = Create Sell Order -gui_bazaar.item.create_sell_order_have = You have: {amount}x -gui_bazaar.item.create_sell_order_best_bid = Best bid: {price} coins +gui_bazaar.item.create_sell_order_have=You have: x +gui_bazaar.item.create_sell_order_best_bid=Best bid: coins gui_bazaar.item.create_sell_order_click = Click to create order! -gui_bazaar.item.sell_order_no_items = [Bazaar] You don't have any {item_name}! +gui_bazaar.item.sell_order_no_items=[Bazaar] You don't have any ! gui_bazaar.item.sell_order_remove_fail = [Bazaar] Failed to remove items! -gui_bazaar.item.sell_order_escrow = [Bazaar] Escrowing {amount}x {item_name}... -gui_bazaar.item.sell_order_created = [Bazaar] Sell order created for {amount}x at {price} coins each! +gui_bazaar.item.sell_order_escrow=[Bazaar] Escrowing x ... +gui_bazaar.item.sell_order_created=[Bazaar] Sell order created for x at coins each! gui_bazaar.item.sell_order_failed = [Bazaar] Failed! Items returned. gui_bazaar.item.bazaar_result_prefix = [Bazaar] # --- GUIBazaarOrders --- gui_bazaar.orders.title = Co-op Bazaar Orders gui_bazaar.orders.sell_orders_header = SELL ORDERS -gui_bazaar.orders.sell_orders_header.lore = Your active sell orders +gui_bazaar.orders.sell_orders_header.lore.1=Your active sell orders gui_bazaar.orders.buy_orders_header = BUY ORDERS -gui_bazaar.orders.buy_orders_header.lore = Your active buy orders +gui_bazaar.orders.buy_orders_header.lore.1=Your active buy orders gui_bazaar.orders.no_sell_orders = No Sell Orders -gui_bazaar.orders.no_sell_orders.lore = You don't have any active\nsell orders in the Bazaar. +gui_bazaar.orders.no_sell_orders.lore.1=You don't have any active +gui_bazaar.orders.no_sell_orders.lore.2=sell orders in the Bazaar. gui_bazaar.orders.no_buy_orders = No Buy Orders -gui_bazaar.orders.no_buy_orders.lore = You don't have any active\nbuy orders in the Bazaar. +gui_bazaar.orders.no_buy_orders.lore.1=You don't have any active +gui_bazaar.orders.no_buy_orders.lore.2=buy orders in the Bazaar. gui_bazaar.orders.completed_label = \u2713 COMPLETED gui_bazaar.orders.completed_ready = Ready to claim! -gui_bazaar.orders.completed_amount = Completed amount: {amount}x -gui_bazaar.orders.completed_value = Total value: {amount} coins +gui_bazaar.orders.completed_amount=Completed amount: x +gui_bazaar.orders.completed_value=Total value: coins gui_bazaar.orders.completed_receive = You will receive: -gui_bazaar.orders.completed_receive_coins = +{amount} coins -gui_bazaar.orders.completed_receive_items = +{amount}x {item_name} -gui_bazaar.orders.completed_receive_refund = +{amount} coins refund +gui_bazaar.orders.completed_receive_coins=+ coins +gui_bazaar.orders.completed_receive_items=+x +gui_bazaar.orders.completed_receive_refund=+ coins refund gui_bazaar.orders.completed_click = Click to claim rewards! -gui_bazaar.orders.active_worth = Worth {amount} coins -gui_bazaar.orders.active_order_amount = Order amount: {amount}x -gui_bazaar.orders.active_price_per_unit = Price per unit: {price} coins +gui_bazaar.orders.active_worth=Worth coins +gui_bazaar.orders.active_order_amount=Order amount: x +gui_bazaar.orders.active_price_per_unit=Price per unit: coins gui_bazaar.orders.active_click = Click to view options! # --- GUIBazaarOrderOptions --- -gui_bazaar.order_options.title = Order Details - {item_name} +gui_bazaar.order_options.title=Order Details - gui_bazaar.order_options.order_type_sell = Sell Order gui_bazaar.order_options.order_type_buy = Buy Order -gui_bazaar.order_options.original_amount = Original Amount: {amount}x -gui_bazaar.order_options.remaining_amount = Remaining Amount: {amount}x -gui_bazaar.order_options.price_per_unit = Price per unit: {price} coins -gui_bazaar.order_options.filled_items = \u2713 {count} items filled -gui_bazaar.order_options.filled_progress = Progress: {percent} +gui_bazaar.order_options.original_amount=Original Amount: x +gui_bazaar.order_options.remaining_amount=Remaining Amount: x +gui_bazaar.order_options.price_per_unit=Price per unit: coins +gui_bazaar.order_options.filled_items=\u2713 items filled +gui_bazaar.order_options.filled_progress=Progress: gui_bazaar.order_options.no_fills = \u25cb No fills yet gui_bazaar.order_options.no_fills_progress = Progress: 0.0% -gui_bazaar.order_options.order_id = Order ID: {id}... +gui_bazaar.order_options.order_id=Order ID: ... gui_bazaar.order_options.transaction_history = Transaction History gui_bazaar.order_options.transaction_history_subtitle = Transaction History gui_bazaar.order_options.no_transactions = No transactions yet gui_bazaar.order_options.no_transactions_pending = Your order is still pending -gui_bazaar.order_options.transaction_count = {count} transaction{suffix} -gui_bazaar.order_options.transaction_more = ... and {count} more -gui_bazaar.order_options.transaction_saved = Saved: {amount} coins -gui_bazaar.order_options.transaction_tax = Tax: -{amount} coins +gui_bazaar.order_options.transaction_count= transaction +gui_bazaar.order_options.transaction_more=... and more +gui_bazaar.order_options.transaction_saved=Saved: coins +gui_bazaar.order_options.transaction_tax=Tax: - coins gui_bazaar.order_options.financial_summary = Financial Summary gui_bazaar.order_options.financial_subtitle = Financial Summary gui_bazaar.order_options.original_order_value = Original Order Value: @@ -136,63 +138,89 @@ gui_bazaar.order_options.spent_prefix = Spent: - gui_bazaar.order_options.saved_prefix = Saved: + gui_bazaar.order_options.avg_sell_price = Average sell price: gui_bazaar.order_options.avg_buy_price = Average buy price: -gui_bazaar.order_options.vs_your_bid = vs your bid of {price} coins/item +gui_bazaar.order_options.vs_your_bid=vs your bid of coins/item gui_bazaar.order_options.cancel_order = Cancel Order -gui_bazaar.order_options.cancel_order.lore_header = Cancel this bazaar order and\nreceive back your remaining: +gui_bazaar.order_options.cancel_order.lore_header.1=Cancel this bazaar order and +gui_bazaar.order_options.cancel_order.lore_header.2=receive back your remaining: gui_bazaar.order_options.cancel_undone = This action cannot be undone! -gui_bazaar.order_options.cancel_completed_remain = Any completed transactions will\nremain completed. +gui_bazaar.order_options.cancel_completed_remain.1=Any completed transactions will +gui_bazaar.order_options.cancel_completed_remain.2=remain completed. gui_bazaar.order_options.cancel_click = Click to cancel! gui_bazaar.order_options.cancel_message = [Bazaar] Cancelling order... gui_bazaar.order_options.cancel_success = [Bazaar] Order cancelled successfully! -gui_bazaar.order_options.cancel_return_items = [Bazaar] Returned {amount}x {item_name} to your inventory. -gui_bazaar.order_options.cancel_refund_coins = [Bazaar] Refunded {amount} coins to your wallet. +gui_bazaar.order_options.cancel_return_items=[Bazaar] Returned x to your inventory. +gui_bazaar.order_options.cancel_refund_coins=[Bazaar] Refunded coins to your wallet. gui_bazaar.order_options.cancel_failed = [Bazaar] Failed to cancel order. It may have already been filled or expired. gui_bazaar.order_options.view_market = View Market -gui_bazaar.order_options.view_market.lore = View the current market for\n{item_name}\n \nSee current buy/sell orders,\nprice trends, and market activity.\n \nClick to view! +gui_bazaar.order_options.view_market.lore.1=View the current market for +gui_bazaar.order_options.view_market.lore.2= +gui_bazaar.order_options.view_market.lore.3= +gui_bazaar.order_options.view_market.lore.4=See current buy/sell orders, +gui_bazaar.order_options.view_market.lore.5=price trends, and market activity. +gui_bazaar.order_options.view_market.lore.6= +gui_bazaar.order_options.view_market.lore.7=Click to view! gui_bazaar.order_options.no_completed = No Completed Transactions -gui_bazaar.order_options.no_completed.lore = This order has no completed\ntransactions ready to claim yet.\n \nOnce parts of your order are\nfilled, you can view and claim\nthem here. +gui_bazaar.order_options.no_completed.lore.1=This order has no completed +gui_bazaar.order_options.no_completed.lore.2=transactions ready to claim yet. +gui_bazaar.order_options.no_completed.lore.3= +gui_bazaar.order_options.no_completed.lore.4=Once parts of your order are +gui_bazaar.order_options.no_completed.lore.5=filled, you can view and claim +gui_bazaar.order_options.no_completed.lore.6=them here. gui_bazaar.order_options.view_completed = View Completed Transactions -gui_bazaar.order_options.view_completed.lore = Switch to view completed\ntransactions for this order.\n \nReady to claim: {count} transaction{suffix}\nTotal value: {amount} coins\n \nClick to view! +gui_bazaar.order_options.view_completed.lore.1=Switch to view completed +gui_bazaar.order_options.view_completed.lore.2=transactions for this order. +gui_bazaar.order_options.view_completed.lore.3= +gui_bazaar.order_options.view_completed.lore.4=Ready to claim: transaction +gui_bazaar.order_options.view_completed.lore.5=Total value: coins +gui_bazaar.order_options.view_completed.lore.6= +gui_bazaar.order_options.view_completed.lore.7=Click to view! gui_bazaar.order_options.no_completed_message = [Bazaar] No completed transactions to view for this order. # --- GUIBazaarOrderCompletedOptions --- gui_bazaar.order_completed.title = Completed Order gui_bazaar.order_completed.order_completed_label = \u2713 ORDER COMPLETED -gui_bazaar.order_completed.completed_count = Completed: {amount}x {item_name} -gui_bazaar.order_completed.transactions_count = Transactions: {count} -gui_bazaar.order_completed.gross_earnings = Gross earnings: +{amount} coins -gui_bazaar.order_completed.tax_paid = Tax paid: -{amount} coins -gui_bazaar.order_completed.net_earnings = Net earnings: +{amount} coins -gui_bazaar.order_completed.total_spent = Total spent: -{amount} coins -gui_bazaar.order_completed.total_saved = Total saved: +{amount} coins -gui_bazaar.order_completed.refund_ready = Refund ready: +{amount} coins -gui_bazaar.order_completed.order_name = {item_name} Order +gui_bazaar.order_completed.completed_count=Completed: x +gui_bazaar.order_completed.transactions_count=Transactions: +gui_bazaar.order_completed.gross_earnings=Gross earnings: + coins +gui_bazaar.order_completed.tax_paid=Tax paid: - coins +gui_bazaar.order_completed.net_earnings=Net earnings: + coins +gui_bazaar.order_completed.total_spent=Total spent: - coins +gui_bazaar.order_completed.total_saved=Total saved: + coins +gui_bazaar.order_completed.refund_ready=Refund ready: + coins +gui_bazaar.order_completed.order_name= Order gui_bazaar.order_completed.transaction_history = Transaction History gui_bazaar.order_completed.transaction_subtitle = Transaction Details -gui_bazaar.order_completed.transaction_more = ... and {count} more -gui_bazaar.order_completed.transaction_saved = Saved: +{amount} coins -gui_bazaar.order_completed.transaction_tax = Tax: -{amount} coins -gui_bazaar.order_completed.refund_label = \u25cf Refund: +{amount} coins +gui_bazaar.order_completed.transaction_more=... and more +gui_bazaar.order_completed.transaction_saved=Saved: + coins +gui_bazaar.order_completed.transaction_tax=Tax: - coins +gui_bazaar.order_completed.refund_label=\u25cf Refund: + coins gui_bazaar.order_completed.claim_rewards = Claim Rewards -gui_bazaar.order_completed.claim_rewards_header = Claim all rewards from this\ncompleted order: +gui_bazaar.order_completed.claim_rewards_header.1=Claim all rewards from this +gui_bazaar.order_completed.claim_rewards_header.2=completed order: gui_bazaar.order_completed.claim_click = Click to claim! gui_bazaar.order_completed.view_unfilled = View Unfilled Order -gui_bazaar.order_completed.view_unfilled.lore = Switch to view the remaining\nunfilled portion of this order.\n \nRemaining: {amount}x\nPrice: {price} coins each\n \nClick to switch! +gui_bazaar.order_completed.view_unfilled.lore.1=Switch to view the remaining +gui_bazaar.order_completed.view_unfilled.lore.2=unfilled portion of this order. +gui_bazaar.order_completed.view_unfilled.lore.3= +gui_bazaar.order_completed.view_unfilled.lore.4 = Remaining: x +gui_bazaar.order_completed.view_unfilled.lore.5=Price: coins each +gui_bazaar.order_completed.view_unfilled.lore.6= +gui_bazaar.order_completed.view_unfilled.lore.7 = Click to switch! gui_bazaar.order_completed.no_rewards = [Bazaar] No rewards to claim! -gui_bazaar.order_completed.received_coins = [Bazaar] Received {amount} coins! -gui_bazaar.order_completed.received_items = [Bazaar] Received {amount}x {item_name}! -gui_bazaar.order_completed.received_refund = [Bazaar] Received {amount} coins refund! +gui_bazaar.order_completed.received_coins=[Bazaar] Received coins! +gui_bazaar.order_completed.received_items=[Bazaar] Received x ! +gui_bazaar.order_completed.received_refund=[Bazaar] Received coins refund! gui_bazaar.order_completed.all_claimed = [Bazaar] All rewards claimed successfully! -gui_bazaar.order_completed.claim_failed = [Bazaar] Failed to claim rewards: {error} +gui_bazaar.order_completed.claim_failed=[Bazaar] Failed to claim rewards: # --- GUIBazaarOrderAmountSelection --- gui_bazaar.amount_selection.title_instant_buy = Cobblestone \u2192 Instant Buy gui_bazaar.amount_selection.title_instant_sell = Cobblestone \u2192 Instant Sell gui_bazaar.amount_selection.title_buy = How many do you want? gui_bazaar.amount_selection.title_sell = How many to sell? -gui_bazaar.amount_selection.per_unit = Per unit: {price} -gui_bazaar.amount_selection.total_cost = Total cost: {amount} -gui_bazaar.amount_selection.total_rev = Total rev : {amount} +gui_bazaar.amount_selection.per_unit=Per unit: +gui_bazaar.amount_selection.total_cost=Total cost: +gui_bazaar.amount_selection.total_rev=Total rev : gui_bazaar.amount_selection.click_buy = Click to buy now! gui_bazaar.amount_selection.click_sell = Click to sell now! gui_bazaar.amount_selection.limit_subtitle = Buy Order Setup @@ -200,9 +228,9 @@ gui_bazaar.amount_selection.limit_click = Click to proceed! gui_bazaar.amount_selection.custom_amount = Custom Amount gui_bazaar.amount_selection.custom_instant = Type a custom amount gui_bazaar.amount_selection.custom_limit = Buy Order Quantity -gui_bazaar.amount_selection.custom_max = Up to {max}x +gui_bazaar.amount_selection.custom_max=Up to x gui_bazaar.amount_selection.custom_click = Click to specify! -gui_bazaar.amount_selection.invalid_range = Enter 1\u2013{max} +gui_bazaar.amount_selection.invalid_range=Enter 1\u2013 gui_bazaar.amount_selection.invalid_number = Invalid number # --- GUIBazaarPriceSelection --- @@ -211,22 +239,25 @@ gui_bazaar.price_selection.title_buy = At what price are you buying? gui_bazaar.price_selection.offer_setup_sell = Sell Offer Setup gui_bazaar.price_selection.offer_setup_buy = Buy Offer Setup gui_bazaar.price_selection.spread_10pct = 10% of Spread -gui_bazaar.price_selection.lowest_price = Lowest price: {price} coins -gui_bazaar.price_selection.highest_price = Highest price: {price} coins -gui_bazaar.price_selection.spread = Spread: {high} - {low} = {spread} coins -gui_bazaar.price_selection.selling_amount = Selling {amount}x -gui_bazaar.price_selection.buying_amount = Buying {amount}x -gui_bazaar.price_selection.unit_price = Unit price: {price} coins -gui_bazaar.price_selection.total = Total: {amount} coins +gui_bazaar.price_selection.lowest_price=Lowest price: coins +gui_bazaar.price_selection.highest_price=Highest price: coins +gui_bazaar.price_selection.spread=Spread: - = coins +gui_bazaar.price_selection.selling_amount=Selling x +gui_bazaar.price_selection.buying_amount=Buying x +gui_bazaar.price_selection.unit_price=Unit price: coins +gui_bazaar.price_selection.total=Total: coins gui_bazaar.price_selection.click_to_use = Click to use this price! gui_bazaar.price_selection.best_offer_minus = Best Offer -0.1 gui_bazaar.price_selection.best_offer_plus = Best Offer +0.1 -gui_bazaar.price_selection.best_offer_beat = Beat the price of the best offer so\nyours is filled first. +gui_bazaar.price_selection.best_offer_beat.1=Beat the price of the best offer so +gui_bazaar.price_selection.best_offer_beat.2=yours is filled first. gui_bazaar.price_selection.same_as_best = Same as Best Offer -gui_bazaar.price_selection.same_as_best.lore = Use the same price as the lowest\nSell Offer for this item. +gui_bazaar.price_selection.same_as_best.lore.1=Use the same price as the lowest +gui_bazaar.price_selection.same_as_best.lore.2=Sell Offer for this item. gui_bazaar.price_selection.custom_price = Custom Price -gui_bazaar.price_selection.custom_price.lore = Set the price per unit you're willing\nto pay. Minimum 50% of the best order. -gui_bazaar.price_selection.ordering_amount = Ordering: {amount}x +gui_bazaar.price_selection.custom_price.lore.1=Set the price per unit you're willing +gui_bazaar.price_selection.custom_price.lore.2=to pay. Minimum 50% of the best order. +gui_bazaar.price_selection.ordering_amount=Ordering: x gui_bazaar.price_selection.custom_click = Click to specify! gui_bazaar.price_selection.invalid_price = Invalid price. Price must be a number. gui_bazaar.price_selection.offline_message = The Bazaar is currently offline! diff --git a/configuration/i18n/en_US/gui/gui_builder.properties b/configuration/i18n/en_US/gui/gui_builder.properties index 4c2c2c391..d21d3dd3c 100644 --- a/configuration/i18n/en_US/gui/gui_builder.properties +++ b/configuration/i18n/en_US/gui/gui_builder.properties @@ -9,13 +9,16 @@ gui_builder.woodworking_button = Woodworking gui_builder.woodworking_button.lore = Wood-related blocks! gui_builder.rocks_bricks_button = Rocks & Bricks -gui_builder.rocks_bricks_button.lore = Rocks, stones, sands and brick\nblocks. +gui_builder.rocks_bricks_button.lore.1=Rocks, stones, sands and brick +gui_builder.rocks_bricks_button.lore.2=blocks. gui_builder.green_thumb_button = Green Thumb -gui_builder.green_thumb_button.lore = Everything you need to grow a\nnice garden. +gui_builder.green_thumb_button.lore.1=Everything you need to grow a +gui_builder.green_thumb_button.lore.2=nice garden. gui_builder.variety_button = Variety -gui_builder.variety_button.lore = Weird blocks and an assortment\nof decorative fruits. +gui_builder.variety_button.lore.1=Weird blocks and an assortment +gui_builder.variety_button.lore.2=of decorative fruits. # --- GUIShopBuilderWoodworking --- gui_builder.woodworking.title = Woodworking diff --git a/configuration/i18n/en_US/gui/gui_common.properties b/configuration/i18n/en_US/gui/gui_common.properties index adcad16d5..340218e86 100644 --- a/configuration/i18n/en_US/gui/gui_common.properties +++ b/configuration/i18n/en_US/gui/gui_common.properties @@ -2,7 +2,7 @@ gui_common.close = Close gui_common.go_back = Go Back -gui_common.go_back.lore = To {gui_title} +gui_common.go_back.lore=To gui_common.click_to_view = Click to view! gui_common.click_to_open = Click to open! gui_common.click_to_select = Click to select! @@ -14,3 +14,4 @@ gui_common.next_page = Next Page gui_common.search = Search gui_common.confirm = Confirm gui_common.cancel = Cancel +gui_common.details=Click for details! diff --git a/configuration/i18n/en_US/gui/gui_coop.properties b/configuration/i18n/en_US/gui/gui_coop.properties index f4e7827ee..5e96c5087 100644 --- a/configuration/i18n/en_US/gui/gui_coop.properties +++ b/configuration/i18n/en_US/gui/gui_coop.properties @@ -1,18 +1,21 @@ -# ============================================================================= -# Co-op GUI Translations -# ============================================================================= - # --- GUICoopInviteSender --- gui_coop.sender.title = Co-op Invitation gui_coop.sender.confirm_button = Confirm co-op -gui_coop.sender.confirm_button.lore = Ends the invitation so that you may\nplay on this co-op profile.\n \nClick to confirm! +gui_coop.sender.confirm_button.lore.1=Ends the invitation so that you may +gui_coop.sender.confirm_button.lore.2=play on this co-op profile. +gui_coop.sender.confirm_button.lore.3= +gui_coop.sender.confirm_button.lore.4 = Click to confirm! gui_coop.sender.cancel_button = Cancel invite -gui_coop.sender.cancel_button.lore = Cancels the invite and removes\nthe co-op profile.\n \nClick to cancel! - -gui_coop.sender.player_head_self.lore = \nHey that's you!\nCreated the invite! -gui_coop.sender.player_accepted = Accepted: {status} +gui_coop.sender.cancel_button.lore.1=Cancels the invite and removes +gui_coop.sender.cancel_button.lore.2=the co-op profile. +gui_coop.sender.cancel_button.lore.3= +gui_coop.sender.cancel_button.lore.4 = Click to cancel! +gui_coop.sender.player_head_self.lore.1= +gui_coop.sender.player_head_self.lore.2=Hey that's you! +gui_coop.sender.player_head_self.lore.3=Created the invite! +gui_coop.sender.player_accepted=Accepted: gui_coop.sender.accepted_yes = Yes gui_coop.sender.accepted_no = Not yet @@ -21,14 +24,37 @@ gui_coop.sender.reconnect_kick = You must reconnect to switch profiles # --- GUICoopInviteTarget --- gui_coop.target.title = Co-op Invitation - -gui_coop.target.originator_head.lore = \nCreated the invite! +gui_coop.target.originator_head.lore.1= +gui_coop.target.originator_head.lore.2=Created the invite! gui_coop.target.deny_button = Deny Invite gui_coop.target.denied_message = [Co-op] You have denied the co-op invite! -gui_coop.target.denied_notify = [Co-op] {player_name} has denied your co-op invite! -gui_coop.target.accepted_notify = [Co-op] {player_name} has accepted your co-op invite! +gui_coop.target.denied_notify=[Co-op] has denied your co-op invite! +gui_coop.target.accepted_notify=[Co-op] has accepted your co-op invite! gui_coop.target.reconnect_kick = You must reconnect to switch profiles gui_coop.target.accept_button = Accept Invite -gui_coop.target.accept_button.lore = Creates a NEW co-op profile on your\naccount with the above player.\n \nShared with co-op:\n- Private Island\n- Collections progress\n- Banks & Auctions\n \nPer-player:\n- Inventory\n- Purse\n- Storage\n- Quests and Objectives\n- Pets\n \nUses a profile slot!\nProfiles: {profile_count}/4\n \nClick to accept!\n \nWARNING: Creation of profiles\nwhich boost other profiles will\nbe considered abusive and\npunished. +gui_coop.target.accept_button.lore.1=Creates a NEW co-op profile on your +gui_coop.target.accept_button.lore.2=account with the above player. +gui_coop.target.accept_button.lore.3= +gui_coop.target.accept_button.lore.4 = Shared with co-op: +gui_coop.target.accept_button.lore.5=- Private Island +gui_coop.target.accept_button.lore.6=- Collections progress +gui_coop.target.accept_button.lore.7=- Banks & Auctions +gui_coop.target.accept_button.lore.8= +gui_coop.target.accept_button.lore.9 = Per-player: +gui_coop.target.accept_button.lore.10=- Inventory +gui_coop.target.accept_button.lore.11=- Purse +gui_coop.target.accept_button.lore.12=- Storage +gui_coop.target.accept_button.lore.13=- Quests and Objectives +gui_coop.target.accept_button.lore.14=- Pets +gui_coop.target.accept_button.lore.15= +gui_coop.target.accept_button.lore.16=Uses a profile slot! +gui_coop.target.accept_button.lore.17=Profiles: /4 +gui_coop.target.accept_button.lore.18= +gui_coop.target.accept_button.lore.19 = Click to accept! +gui_coop.target.accept_button.lore.20= +gui_coop.target.accept_button.lore.21 = WARNING: Creation of profiles +gui_coop.target.accept_button.lore.22=which boost other profiles will +gui_coop.target.accept_button.lore.23=be considered abusive and +gui_coop.target.accept_button.lore.24=punished. diff --git a/configuration/i18n/en_US/gui/gui_election.properties b/configuration/i18n/en_US/gui/gui_election.properties index be604cc1a..e668cfa7d 100644 --- a/configuration/i18n/en_US/gui/gui_election.properties +++ b/configuration/i18n/en_US/gui/gui_election.properties @@ -1,33 +1,30 @@ -# ============================================================================= -# Election GUI Translations -# ============================================================================= - # --- ElectionView (Voting GUI) --- gui_election.view.title = Election gui_election.view.no_election = No Active Election -gui_election.view.no_election.lore = There is no active election\nat this time. -gui_election.view.candidate.year = Year {year} Candidate -gui_election.view.candidate.votes = Votes: {color}{votes} ({color}{percentage}) -gui_election.view.candidate.last_elected = Last elected: {color}{years}y ago -gui_election.view.candidate.last_elected_never = Last elected: {color}Never -gui_election.view.candidate.minister_note_1 = ✯ {color}Minister Perks are also granted if +gui_election.view.no_election.lore.1=There is no active election +gui_election.view.no_election.lore.2=at this time. +gui_election.view.candidate.year=Year Candidate +gui_election.view.candidate.votes=Votes: () +gui_election.view.candidate.last_elected=Last elected: y ago +gui_election.view.candidate.last_elected_never=Last elected: Never +gui_election.view.candidate.minister_note_1=Minister Perks are also granted if gui_election.view.candidate.minister_note_2 = this mayor wins second place! gui_election.view.candidate.voted = You voted for this candidate! gui_election.view.candidate.change_vote_1 = You may change your vote at any gui_election.view.candidate.change_vote_2 = time until the election ends! -gui_election.view.candidate.click_vote = Click to vote for {name}! +gui_election.view.candidate.click_vote=Click to vote for ! gui_election.view.vote_divider = ----------------------------------------------------- -gui_election.view.vote_cast = You cast 1 vote for {candidate} in the Year {year} Elections! +gui_election.view.vote_cast=You cast 1 vote for in the Year Elections! gui_election.view.vote_fame = New player Fame Rank +1 vote -gui_election.view.vote_result = {candidate} now has {percentage} of votes with {votes} votes! +gui_election.view.vote_result= now has of votes with votes! gui_election.view.already_voted = You voted for this candidate. # --- ElectionViewStatsView --- -gui_election.stats.title = Election, Year {year} -gui_election.stats.leader = {color}Leading in votes! +gui_election.stats.title=Election, Year +gui_election.stats.leader=Leading in votes! # --- MayorMenuView --- -gui_election.mayor.title = Mayor {name} +gui_election.mayor.title=Mayor gui_election.mayor.title_fallback = Mayor gui_election.mayor.perks_label = Perks List gui_election.mayor.perks_footer_1 = The listed perks are available to @@ -36,13 +33,13 @@ gui_election.mayor.perks_footer_3 = the next elections. gui_election.mayor.results_title = Mayor Election Results gui_election.mayor.results_no_data_1 = No previous election data gui_election.mayor.results_no_data_2 = available. -gui_election.mayor.results_year = Year {year} +gui_election.mayor.results_year=Year gui_election.mayor.results_footer_1 = These are the votes for the -gui_election.mayor.results_footer_2 = last election in which {name} +gui_election.mayor.results_footer_2=last election in which gui_election.mayor.results_footer_3 = was elected. # --- MinisterMenuView --- -gui_election.minister.title = Minister {name} +gui_election.minister.title=Minister gui_election.minister.title_fallback = Minister gui_election.minister.perk_label = Active Perk gui_election.minister.perk_footer_1 = The Minister is who came in 2nd Place @@ -51,7 +48,7 @@ gui_election.minister.perk_footer_3 = of their perks active. # --- ElectionDisplay (Holograms) --- gui_election.display.title = MAYOR ELECTIONS -gui_election.display.year = Year {year} -gui_election.display.time_left = Time left: {time} -gui_election.display.your_vote = Your vote: {candidate} +gui_election.display.year=Year +gui_election.display.time_left=Time left: +gui_election.display.your_vote=Your vote: gui_election.display.click_switch = CLICK TO SWITCH diff --git a/configuration/i18n/en_US/gui/gui_enchantment.properties b/configuration/i18n/en_US/gui/gui_enchantment.properties index ee02bf480..67609dd16 100644 --- a/configuration/i18n/en_US/gui/gui_enchantment.properties +++ b/configuration/i18n/en_US/gui/gui_enchantment.properties @@ -1,44 +1,50 @@ -# ============================================================================= -# Enchantment Table GUI Translations -# ============================================================================= - gui_enchantment.title = Enchantment Table -gui_enchantment.title_selected = Enchant Item -> {enchantment} +gui_enchantment.title_selected=Enchant Item -> gui_enchantment.bookshelf_power = Bookshelf Power -gui_enchantment.bookshelf_power.lore = Stronger enchantments require\nmore bookshelf power which can\nbe increased by placing\nbookshelves nearby.\n \nCurrent Bookshelf Power:\n{power} +gui_enchantment.bookshelf_power.lore.1=Stronger enchantments require +gui_enchantment.bookshelf_power.lore.2=more bookshelf power which can +gui_enchantment.bookshelf_power.lore.3=be increased by placing +gui_enchantment.bookshelf_power.lore.4=bookshelves nearby. +gui_enchantment.bookshelf_power.lore.5= +gui_enchantment.bookshelf_power.lore.6=Current Bookshelf Power: +gui_enchantment.bookshelf_power.lore.7= gui_enchantment.enchantments_guide = Enchantments Guide -gui_enchantment.enchantments_guide.lore = View a complete list of all\nenchantments and their\nrequirements.\n \nClick to view! +gui_enchantment.enchantments_guide.lore.1=View a complete list of all +gui_enchantment.enchantments_guide.lore.2=enchantments and their +gui_enchantment.enchantments_guide.lore.3=requirements. +gui_enchantment.enchantments_guide.lore.4= +gui_enchantment.enchantments_guide.lore.5=Click to view! gui_enchantment.enchant_item_label = Enchant Item -gui_enchantment.enchant_item_label.lore = Add and remove enchantments from\nthe time in the slot above! +gui_enchantment.enchant_item_label.lore.1=Add and remove enchantments from +gui_enchantment.enchant_item_label.lore.2=the time in the slot above! gui_enchantment.place_item = Enchant Item -gui_enchantment.place_item.lore = Place an item in the open slot\nto enchant it! +gui_enchantment.place_item.lore.1=Place an item in the open slot +gui_enchantment.place_item.lore.2=to enchant it! gui_enchantment.invalid_item = Invalid Item! gui_enchantment.invalid_item.lore = You cannot enchant stacked items! gui_enchantment.cannot_enchant = Cannot Enchant Item! gui_enchantment.cannot_enchant.lore = This item cannot be enchanted! - -gui_enchantment.requires_bookshelf = Requires {power} Bookshelf Power! +gui_enchantment.requires_bookshelf=Requires Bookshelf Power! gui_enchantment.click_to_view = Click to view! gui_enchantment.cost_label = Cost -gui_enchantment.cost_exp_levels_pass = {cost} Exp Levels \u2713 -gui_enchantment.cost_exp_levels_fail = {cost} Exp Levels \u2716 - -gui_enchantment.already_present = This enchantment is already present\nand can be removed. +gui_enchantment.cost_exp_levels_pass= Exp Levels \u2713 +gui_enchantment.cost_exp_levels_fail= Exp Levels \u2716 +gui_enchantment.already_present.1=This enchantment is already present +gui_enchantment.already_present.2=and can be removed. gui_enchantment.higher_level_present = Higher level already present! gui_enchantment.insufficient_levels = You have insufficient levels! gui_enchantment.click_to_enchant = Click to enchant! gui_enchantment.click_to_remove = Click to remove! -gui_enchantment.warning_remove_conflicting = WARNING: This will remove {enchantment}. +gui_enchantment.warning_remove_conflicting=WARNING: This will remove . gui_enchantment.go_back = Go Back - -gui_enchantment.requires_bookshelf_message = This enchantment requires {power} Bookshelf Power! +gui_enchantment.requires_bookshelf_message=This enchantment requires Bookshelf Power! gui_enchantment.insufficient_levels_message = You have insufficient levels! -gui_enchantment.enchanted_message = You enchanted your {item_name} with {enchantment} {level}! -gui_enchantment.removed_message = You removed {enchantment} from your {item_name}! +gui_enchantment.enchanted_message=You enchanted your with ! +gui_enchantment.removed_message=You removed from your ! diff --git a/configuration/i18n/en_US/gui/gui_minion.properties b/configuration/i18n/en_US/gui/gui_minion.properties index da0d9dff9..1a12e32dd 100644 --- a/configuration/i18n/en_US/gui/gui_minion.properties +++ b/configuration/i18n/en_US/gui/gui_minion.properties @@ -1,22 +1,30 @@ # ============================================================================= # Minion GUI Translations # ============================================================================= - -gui_minion.title = {minion_name} {tier} +gui_minion.title= gui_minion.coop_member_open = You can't open this inventory while a coop member has it open! gui_minion.cant_put_items = You can't put items in this inventory! gui_minion.pickup_button = Pickup Minion gui_minion.pickup_button.lore = Click to pickup! -gui_minion.pickup_message = You picked up a minion! You currently have {current} out of a maximum of {max} minions placed. +gui_minion.pickup_message=You picked up a minion! You currently have out of a maximum of minions placed. gui_minion.collect_all_button = Collect All gui_minion.collect_all_button.lore = Click to collect all items! gui_minion.no_items_stored = This Minion does not have any items stored! gui_minion.ideal_layout = Ideal Layout -gui_minion.ideal_layout.lore = View the most efficient spot for this\nminion to be placed in.\n \nClick to view! +gui_minion.ideal_layout.lore.1=View the most efficient spot for this +gui_minion.ideal_layout.lore.2=minion to be placed in. +gui_minion.ideal_layout.lore.3= +gui_minion.ideal_layout.lore.4 = Click to view! gui_minion.next_tier = Next Tier -gui_minion.next_tier.lore = View the items required to upgrade\nthis minion to the next tier.\n \nTime Between Actions: {current_time}s > {next_time}s\nMax Storage: {current_storage} > {next_storage}\n \nClick to view! +gui_minion.next_tier.lore.1=View the items required to upgrade +gui_minion.next_tier.lore.2=this minion to the next tier. +gui_minion.next_tier.lore.3= +gui_minion.next_tier.lore.4 = Time Between Actions: s > s +gui_minion.next_tier.lore.5=Max Storage: > +gui_minion.next_tier.lore.6= +gui_minion.next_tier.lore.7 = Click to view! diff --git a/configuration/i18n/en_US/gui/gui_misc.properties b/configuration/i18n/en_US/gui/gui_misc.properties index 070940a51..5ec966eef 100644 --- a/configuration/i18n/en_US/gui/gui_misc.properties +++ b/configuration/i18n/en_US/gui/gui_misc.properties @@ -10,12 +10,17 @@ gui_misc.booster_cookie.cancel_button = Cancel gui_misc.booster_cookie.cancel_button.lore = I'm not hungry... gui_misc.booster_cookie.consume_button = Consume Cookie -gui_misc.booster_cookie.consume_button.lore = Gain the Cookie Buff!\n \nDuration: 4 days!\n \nYou will be able to gain\n4,000 Bits from this\ncookie. +gui_misc.booster_cookie.consume_button.lore.1=Gain the Cookie Buff! +gui_misc.booster_cookie.consume_button.lore.2= +gui_misc.booster_cookie.consume_button.lore.3 = Duration: 4 days! +gui_misc.booster_cookie.consume_button.lore.4= +gui_misc.booster_cookie.consume_button.lore.5 = You will be able to gain +gui_misc.booster_cookie.consume_button.lore.6=4,000 Bits from this +gui_misc.booster_cookie.consume_button.lore.7=cookie. # --- GUIBrewingStand --- gui_misc.brewing_stand.title = Brewing Stand - -gui_misc.brewing_stand.remaining_time = {seconds}s remaining +gui_misc.brewing_stand.remaining_time=s remaining gui_misc.brewing_stand.place_bottles = Place Water Bottles or Potions gui_misc.brewing_stand.place_bottles_below = below to brew. @@ -23,17 +28,29 @@ gui_misc.brewing_stand.place_bottles_below = below to brew. gui_misc.consume_soulflow.title = Consume Soulflow gui_misc.consume_soulflow.confirm_button = Consume Soulflow? -gui_misc.consume_soulflow.confirm_button.lore = Takes all the \u2e0e Soulflow items in\nyour inventory and internalizes them\nto be ready for use.\n\nInternalized: {soulflow}\u2e0e\n\nAdding from inventory: +{addition}\u2e0e Soulflow\n\nClick to consume! -gui_misc.consume_soulflow.consumed_message = You internalized +{addition}\u2e0e Soulflow and have a total of {total}\u2e0e! +gui_misc.consume_soulflow.confirm_button.lore.1=Takes all the \u2e0e Soulflow items in +gui_misc.consume_soulflow.confirm_button.lore.2=your inventory and internalizes them +gui_misc.consume_soulflow.confirm_button.lore.3=to be ready for use. +gui_misc.consume_soulflow.confirm_button.lore.4= +gui_misc.consume_soulflow.confirm_button.lore.5 = Internalized: \u2e0e +gui_misc.consume_soulflow.confirm_button.lore.6= +gui_misc.consume_soulflow.confirm_button.lore.7 = Adding from inventory: +\u2e0e Soulflow +gui_misc.consume_soulflow.confirm_button.lore.8= +gui_misc.consume_soulflow.confirm_button.lore.9 = Click to consume! +gui_misc.consume_soulflow.consumed_message=You internalized +\u2e0e Soulflow and have a total of \u2e0e! # --- GUICreative --- -gui_misc.creative.title = Creative Menu | Page {page}/{total_pages} +gui_misc.creative.title=Creative Menu | Page / gui_misc.creative.close_button = Close gui_misc.creative.search_button = Search Items -gui_misc.creative.search_button.lore = /itemlist \\n\nSearch all items in SkyBlock.\n\nClick to search! +gui_misc.creative.search_button.lore.1=/itemlist \ +gui_misc.creative.search_button.lore.2= +gui_misc.creative.search_button.lore.3 = Search all items in SkyBlock. +gui_misc.creative.search_button.lore.4= +gui_misc.creative.search_button.lore.5 = Click to search! gui_misc.creative.click_to_retrieve = Click to retrieve! gui_misc.creative.right_click_stack = Right-click for a stack! -gui_misc.creative.given_stack = You have been given a stack of {item_name}. -gui_misc.creative.given_single = You have been given a {item_name}. +gui_misc.creative.given_stack=You have been given a stack of . +gui_misc.creative.given_single=You have been given a . diff --git a/configuration/i18n/en_US/gui/gui_museum.properties b/configuration/i18n/en_US/gui/gui_museum.properties index be9dd7055..935d53897 100644 --- a/configuration/i18n/en_US/gui/gui_museum.properties +++ b/configuration/i18n/en_US/gui/gui_museum.properties @@ -1,7 +1,3 @@ -# ============================================================================= -# Museum GUI Translations -# ============================================================================= - # --- GUIMuseumAppraisal --- gui_museum.appraisal.title = Museum Appraisal @@ -13,28 +9,51 @@ gui_museum.main.title = Your Museum gui_museum.main.item_tracker_offline = The item tracker is currently offline. Please try again later. gui_museum.main.rewards_button = Museum Rewards -gui_museum.main.rewards_button.lore = Each time you donate an item to your\nMuseum, the Curator will reward you.\n \nSpecial Items do not count towards\nyour Museum rewards progress.\n \nCurrently, most rewards are coming\nsoon, but you can view them anyway.\n \nClick to view! +gui_museum.main.rewards_button.lore.1=Each time you donate an item to your +gui_museum.main.rewards_button.lore.2=Museum, the Curator will reward you. +gui_museum.main.rewards_button.lore.3= +gui_museum.main.rewards_button.lore.4 = Special Items do not count towards +gui_museum.main.rewards_button.lore.5=your Museum rewards progress. +gui_museum.main.rewards_button.lore.6= +gui_museum.main.rewards_button.lore.7 = Currently, most rewards are coming +gui_museum.main.rewards_button.lore.8=soon, but you can view them anyway. +gui_museum.main.rewards_button.lore.9= +gui_museum.main.rewards_button.lore.10 = Click to view! gui_museum.main.edit_npc_tags = Edit NPC Tags -gui_museum.main.edit_npc_tags.lore = Edit the tags that appear above\nyour NPC. Show off your SkyBlock\nprogress with tags showing your\nhighest collection, best Skill, and\nmore!\n \nCOMING SOON +gui_museum.main.edit_npc_tags.lore.1=Edit the tags that appear above +gui_museum.main.edit_npc_tags.lore.2=your NPC. Show off your SkyBlock +gui_museum.main.edit_npc_tags.lore.3=progress with tags showing your +gui_museum.main.edit_npc_tags.lore.4=highest collection, best Skill, and +gui_museum.main.edit_npc_tags.lore.5=more! +gui_museum.main.edit_npc_tags.lore.6= +gui_museum.main.edit_npc_tags.lore.7 = COMING SOON gui_museum.main.museum_info = Museum -gui_museum.main.museum_info.lore = The Museum is a compendium of all of\nyour items in SkyBlock. Donate items\nto your Museum to unlock rewards.\n \nOther players can visit your Museum\nat any time! Display your best items\nproudly for all to see.\n -gui_museum.main.items_donated = Items Donated: {percentage}% +gui_museum.main.museum_info.lore.1=The Museum is a compendium of all of +gui_museum.main.museum_info.lore.2=your items in SkyBlock. Donate items +gui_museum.main.museum_info.lore.3=to your Museum to unlock rewards. +gui_museum.main.museum_info.lore.4= +gui_museum.main.museum_info.lore.5=Other players can visit your Museum +gui_museum.main.museum_info.lore.6=at any time! Display your best items +gui_museum.main.museum_info.lore.7=proudly for all to see. +gui_museum.main.museum_info.lore.8= +gui_museum.main.items_donated=Items Donated: % gui_museum.main.top_items = Top Items - -gui_museum.main.category_button.lore_prefix = View all of the {color}{category} that you\nhave donated to the Museum!\n -gui_museum.main.category_items_donated = Items Donated: {percentage}% +gui_museum.main.category_button.lore_prefix.1=View all of the that you +gui_museum.main.category_button.lore_prefix.2=have donated to the Museum! +gui_museum.main.category_button.lore_prefix.3= +gui_museum.main.category_items_donated=Items Donated: % gui_museum.main.category_click = Click to view! # --- GUIMuseumCategory --- -gui_museum.category.title = Museum -> {category} -gui_museum.category.already_in_museum = You already have a {item_name} in your Museum! -gui_museum.category.can_only_readd = You can only re-add the item that was already in your Museum! -gui_museum.category.donated = You donated your {item_name} to the Museum! - -gui_museum.category.item_not_in_museum = {item_name} -gui_museum.category.item_not_in_museum.lore = Click on this item in your inventory to\nadd it to your Museum! +gui_museum.category.title=Museum -> +gui_museum.category.already_in_museum=You already have a in your Museum! +gui_museum.category.can_only_read=You can only re-add the item that was already in your Museum! +gui_museum.category.donated=You donated your to the Museum! +gui_museum.category.item_not_in_museum= +gui_museum.category.item_not_in_museum.lore.1=Click on this item in your inventory to +gui_museum.category.item_not_in_museum.lore.2=add it to your Museum! gui_museum.category.item_donated_label = Item Donated gui_museum.category.item_created_label = Item Created @@ -43,26 +62,28 @@ gui_museum.category.item_value_label = Item Value gui_museum.category.uncalculated = Uncalculated gui_museum.category.display_slot_label = Display Slot gui_museum.category.not_in_display = Not In Display -gui_museum.category.retrieved_from_museum.lore = You have retrieved this from your\nMuseum but can add it back at any\ntime. +gui_museum.category.retrieved_from_museum.lore.1=You have retrieved this from your +gui_museum.category.retrieved_from_museum.lore.2=Museum but can add it back at any +gui_museum.category.retrieved_from_museum.lore.3=time. gui_museum.category.click_to_retrieve = Click to retrieve item! gui_museum.category.click_to_donate = Click to donate item! - -gui_museum.category.retrieved_message = You retrieved your {item_name} from the Museum. It still counts towards your Museum progress, but not towards your total item value. +gui_museum.category.retrieved_message=You retrieved your from the Museum. It still counts towards your Museum progress, but not towards your total item value. gui_museum.category.retrieved_return_message = You can return or replace the item in your Museum at any time! # --- GUIMuseumArmorCategory --- gui_museum.armor_category.title = Museum -> Armor Sets - -gui_museum.armor_category.already_in_museum = You already have a {item_name} in your Museum! -gui_museum.armor_category.can_only_readd = You can only re-add the set that was already in your Museum! -gui_museum.armor_category.missing_items = You are missing some of the items from the {set_name} set in your inventory! ({count}/4) -gui_museum.armor_category.donated = You donated your {set_name} Set to the Museum! +gui_museum.armor_category.already_in_museum=You already have a in your Museum! +gui_museum.armor_category.can_only_read=You can only re-add the set that was already in your Museum! +gui_museum.armor_category.missing_items=You are missing some of the items from the set in your inventory! (/4) +gui_museum.armor_category.donated=You donated your Set to the Museum! gui_museum.armor_category.need_empty_slots = You need at least 4 empty slots in your inventory to retrieve the set back! -gui_museum.armor_category.retrieved_message = You retrieved your {set_name} from the Museum. It still counts towards your Museum progress, but not towards your total item value. +gui_museum.armor_category.retrieved_message=You retrieved your from the Museum. It still counts towards your Museum progress, but not towards your total item value. gui_museum.armor_category.retrieved_return_message = You can return or replace the set in your Museum at any time! - -gui_museum.armor_category.not_in_museum = {set_name} -gui_museum.armor_category.not_in_museum.lore = Click on an armor piece in your\ninventory that belongs to this armor\nset to donate the full set to your\nMuseum +gui_museum.armor_category.not_in_museum= +gui_museum.armor_category.not_in_museum.lore.1=Click on an armor piece in your +gui_museum.armor_category.not_in_museum.lore.2=inventory that belongs to this armor +gui_museum.armor_category.not_in_museum.lore.3=set to donate the full set to your +gui_museum.armor_category.not_in_museum.lore.4=Museum gui_museum.armor_category.set_donated_label = Set Donated gui_museum.armor_category.helmet_data = Helmet Data @@ -71,19 +92,27 @@ gui_museum.armor_category.leggings_data = Leggings Data gui_museum.armor_category.boots_data = Boots Data gui_museum.armor_category.set_clean_value_label = Set Clean Value gui_museum.armor_category.set_value_label = Set Value -gui_museum.armor_category.retrieved_from_museum.lore = You have retrieved this from your\nMuseum but can add it back at any\ntime. +gui_museum.armor_category.retrieved_from_museum.lore.1=You have retrieved this from your +gui_museum.armor_category.retrieved_from_museum.lore.2=Museum but can add it back at any +gui_museum.armor_category.retrieved_from_museum.lore.3=time. gui_museum.armor_category.click_to_retrieve = Click to retrieve set! gui_museum.armor_category.click_to_donate_armor = Click to donate armor set! # --- GUIMuseumNonEmptyDisplay --- gui_museum.display.title = Museum Display -gui_museum.display.title_with_count = Display with {count} items +gui_museum.display.title_with_count=Display with items gui_museum.display.no_items = No items found at this display position. gui_museum.display.item_tracker_offline = The item tracker is currently offline. Please try again later. gui_museum.display.remove_button = Remove From Display -gui_museum.display.remove_single.lore = Removes this item from being\ndisplayed in your Museum.\n \nClick to remove! -gui_museum.display.remove_multiple.lore = Removes these {count} items from being\ndisplayed in your Museum.\n \nClick to remove! +gui_museum.display.remove_single.lore.1=Removes this item from being +gui_museum.display.remove_single.lore.2=displayed in your Museum. +gui_museum.display.remove_single.lore.3= +gui_museum.display.remove_single.lore.4=Click to remove! +gui_museum.display.remove_multiple.lore.1=Removes these items from being +gui_museum.display.remove_multiple.lore.2=displayed in your Museum. +gui_museum.display.remove_multiple.lore.3= +gui_museum.display.remove_multiple.lore.4=Click to remove! gui_museum.display.item_donated_label = Item Donated gui_museum.display.item_created_label = Item Created @@ -91,17 +120,17 @@ gui_museum.display.item_clean_value_label = Item Clean Value gui_museum.display.item_value_label = Item Value # --- GUIMuseumEmptyDisplay --- -gui_museum.empty_display.title = {display} Slot #{position} ({page}/{max_page}) +gui_museum.empty_display.title= Slot # (/) gui_museum.empty_display.item_tracker_offline = The item tracker is currently offline. Please try again later. - -gui_museum.empty_display.no_items = {display} Slot #{position} -gui_museum.empty_display.no_items.lore = You don't have any displayable items\nfor this slot. Donate more items to\nyour Museum! +gui_museum.empty_display.no_items= Slot # +gui_museum.empty_display.no_items.lore.1=You don't have any displayable items +gui_museum.empty_display.no_items.lore.2=for this slot. Donate more items to +gui_museum.empty_display.no_items.lore.3=your Museum! gui_museum.empty_display.error = Error gui_museum.empty_display.error.lore = Unknown item type - -gui_museum.empty_display.set_display_single = You set {display} Slot #{position} to display {item_name}! -gui_museum.empty_display.set_display_armor = You set {display} Slot #{position} to display {set_name} Set! +gui_museum.empty_display.set_display_single=You set Slot # to display ! +gui_museum.empty_display.set_display_armor=You set Slot # to display Set! gui_museum.empty_display.item_created_label = Item Created gui_museum.empty_display.item_clean_value_label = Item Clean Value diff --git a/configuration/i18n/en_US/gui/gui_profile.properties b/configuration/i18n/en_US/gui/gui_profile.properties index 8e92ea18b..9aaf74292 100644 --- a/configuration/i18n/en_US/gui/gui_profile.properties +++ b/configuration/i18n/en_US/gui/gui_profile.properties @@ -1,8 +1,4 @@ -# ============================================================================= -# Player Profile GUI Translations -# ============================================================================= - -gui_profile.title = {player_name}'s Profile +gui_profile.title='s Profile gui_profile.empty_held_item = Empty Held Item Slot gui_profile.empty_helmet = Empty Helmet Slot @@ -10,13 +6,13 @@ gui_profile.empty_chestplate = Empty Chestplate Slot gui_profile.empty_leggings = Empty Leggings Slot gui_profile.empty_boots = Empty Boots Slot gui_profile.empty_pet = Empty Pet Slot - -gui_profile.skyblock_level = SkyBlock Level: {level} -gui_profile.oldest_profile = Oldest Profile: {age} +gui_profile.skyblock_level=SkyBlock Level: +gui_profile.oldest_profile=Oldest Profile: gui_profile.no_emblem = No Selected Emblem -gui_profile.no_emblem.lore = This player does not have any\nemblem selected. -gui_profile.emblem_selected = Selected Emblem: {emblem} +gui_profile.no_emblem.lore.1=This player does not have any +gui_profile.no_emblem.lore.2=emblem selected. +gui_profile.emblem_selected=Selected Emblem: gui_profile.click_view_emblems = Click to view unlocked emblems! gui_profile.visit_island = Visit Island @@ -33,7 +29,10 @@ gui_profile.coop_request.lore = Send a co-op request! gui_profile.personal_vault = Personal Vault gui_profile.personal_vault.lore = Click to view! - -gui_profile.museum.lore = Profile: {profile_name}\n \nItems Donated: Museum not there yet :)\n \nClick to visit! +gui_profile.museum.lore.1=Profile: +gui_profile.museum.lore.2= +gui_profile.museum.lore.3=Items Donated: Museum not there yet :) +gui_profile.museum.lore.4= +gui_profile.museum.lore.5=Click to visit! gui_profile.feature_not_added = This feature is not added yet. diff --git a/configuration/i18n/en_US/gui/gui_reforge.properties b/configuration/i18n/en_US/gui/gui_reforge.properties index c92252d9e..45f26d978 100644 --- a/configuration/i18n/en_US/gui/gui_reforge.properties +++ b/configuration/i18n/en_US/gui/gui_reforge.properties @@ -5,7 +5,10 @@ gui_reforge.title = Reforge Item gui_reforge.reforge_button_empty = Reforge Item -gui_reforge.reforge_button_empty.lore = Place an item above to reforge it!\nReforging items adds a random\nmodifier to the item that grants stat\nboosts. +gui_reforge.reforge_button_empty.lore.1=Place an item above to reforge it! +gui_reforge.reforge_button_empty.lore.2=Reforging items adds a random +gui_reforge.reforge_button_empty.lore.3=modifier to the item that grants stat +gui_reforge.reforge_button_empty.lore.4=boosts. gui_reforge.error_cannot_reforge = Error! gui_reforge.error_cannot_reforge.lore = You cannot reforge this item! @@ -14,9 +17,16 @@ gui_reforge.error_no_reforges = Error! gui_reforge.error_no_reforges.lore = No reforges available for this item type! gui_reforge.reforge_button = Reforge Item -gui_reforge.reforge_button.lore = Reforges the above item, giving it a\nrandom stat modifier that boosts its\nstats.\n \nCost\n{cost} Coins\n \nClick to reforge! +gui_reforge.reforge_button.lore.1=Reforges the above item, giving it a +gui_reforge.reforge_button.lore.2=random stat modifier that boosts its +gui_reforge.reforge_button.lore.3=stats. +gui_reforge.reforge_button.lore.4= +gui_reforge.reforge_button.lore.5=Cost +gui_reforge.reforge_button.lore.6= Coins +gui_reforge.reforge_button.lore.7= +gui_reforge.reforge_button.lore.8=Click to reforge! gui_reforge.place_item_message = Place an item in the empty slot above to reforge it! gui_reforge.not_enough_coins = You don't have enough Coins! gui_reforge.no_reforges_available = No reforges available for this item! -gui_reforge.success_message = You reforged your{old_name} {item_name} into a {new_name} {item_name}! +gui_reforge.success_message=You reforged your into a ! diff --git a/configuration/i18n/en_US/gui/gui_rusty.properties b/configuration/i18n/en_US/gui/gui_rusty.properties index fa6cfe1dc..7ddf8df22 100644 --- a/configuration/i18n/en_US/gui/gui_rusty.properties +++ b/configuration/i18n/en_US/gui/gui_rusty.properties @@ -1,40 +1,65 @@ -# ============================================================================= -# Rusty GUI Translations -# ============================================================================= - # --- GUIRusty (main menu) --- gui_rusty.main.title = Rusty The Janitor gui_rusty.main.weapons_button = Weapons -gui_rusty.main.weapons_button.lore = Contains reobtainable weapons and\ngear that you have lost from all\naround SkyBlock.\n\nClick to view! +gui_rusty.main.weapons_button.lore.1=Contains reobtainable weapons and +gui_rusty.main.weapons_button.lore.2=gear that you have lost from all +gui_rusty.main.weapons_button.lore.3=around SkyBlock. +gui_rusty.main.weapons_button.lore.4= +gui_rusty.main.weapons_button.lore.5=Click to view! gui_rusty.main.pets_button = Pets -gui_rusty.main.pets_button.lore = Contains pets, and some reobtainable\npet items from all around SkyBlock\n\nClick to view! +gui_rusty.main.pets_button.lore.1=Contains pets, and some reobtainable +gui_rusty.main.pets_button.lore.2=pet items from all around SkyBlock +gui_rusty.main.pets_button.lore.3= +gui_rusty.main.pets_button.lore.4=Click to view! gui_rusty.main.accessories_button = Accessories -gui_rusty.main.accessories_button.lore = Contains accessories and talismans\nfrom all around SkyBlock.\n\nClick to view! +gui_rusty.main.accessories_button.lore.1=Contains accessories and talismans +gui_rusty.main.accessories_button.lore.2=from all around SkyBlock. +gui_rusty.main.accessories_button.lore.3= +gui_rusty.main.accessories_button.lore.4=Click to view! gui_rusty.main.miscellaneous_button = Miscellaneous -gui_rusty.main.miscellaneous_button.lore = Contains tools, travel scrolls,\none-time qust rewards, and more\nrandom junk.\n\nClick to view! +gui_rusty.main.miscellaneous_button.lore.1=Contains tools, travel scrolls, +gui_rusty.main.miscellaneous_button.lore.2=one-time qust rewards, and more +gui_rusty.main.miscellaneous_button.lore.3=random junk. +gui_rusty.main.miscellaneous_button.lore.4= +gui_rusty.main.miscellaneous_button.lore.5=Click to view! gui_rusty.main.janitor_info = The Janitor -gui_rusty.main.janitor_info.lore = Rusty watches over the neatness of the Gold\nMines, but really he watches over the whole of\nSkyBlock.\n\nIf you misplace a one-time-reward from a\nquest, it may be offered here! +gui_rusty.main.janitor_info.lore.1=Rusty watches over the neatness of the Gold +gui_rusty.main.janitor_info.lore.2=Mines, but really he watches over the whole of +gui_rusty.main.janitor_info.lore.3=SkyBlock. +gui_rusty.main.janitor_info.lore.4= +gui_rusty.main.janitor_info.lore.5=If you misplace a one-time-reward from a +gui_rusty.main.janitor_info.lore.6=quest, it may be offered here! # --- GUIRustySubMenu --- gui_rusty.submenu.shop_confirmations = Shop Confirmations -gui_rusty.submenu.shop_confirmations.lore = Confirm when purchasing item worth\nat least a million coins.\n\nClick to {toggle_action}! +gui_rusty.submenu.shop_confirmations.lore.1=Confirm when purchasing item worth +gui_rusty.submenu.shop_confirmations.lore.2=at least a million coins. +gui_rusty.submenu.shop_confirmations.lore.3= +gui_rusty.submenu.shop_confirmations.lore.4=Click to ! gui_rusty.submenu.janitor_info = The Janitor -gui_rusty.submenu.janitor_info.lore = Rusty watches over the neatness of the Gold\nMines, but really he watches over the whole of\nSkyBlock.\n\nIf you misplace a one-time reward from a\nquest, it may be offered here! +gui_rusty.submenu.janitor_info.lore.1=Rusty watches over the neatness of the Gold +gui_rusty.submenu.janitor_info.lore.2=Mines, but really he watches over the whole of +gui_rusty.submenu.janitor_info.lore.3=SkyBlock. +gui_rusty.submenu.janitor_info.lore.4= +gui_rusty.submenu.janitor_info.lore.5 = If you misplace a one-time reward from a +gui_rusty.submenu.janitor_info.lore.6=quest, it may be offered here! gui_rusty.submenu.sort_by_rarity = Sort by Rarity -gui_rusty.submenu.sort_by_rarity.lore = Enabled: {status}\n\nClick to toggle! +gui_rusty.submenu.sort_by_rarity.lore.1=Enabled: +gui_rusty.submenu.sort_by_rarity.lore.2= +gui_rusty.submenu.sort_by_rarity.lore.3=Click to toggle! gui_rusty.submenu.unknown_item = ??? gui_rusty.submenu.cost_label = Cost gui_rusty.submenu.click_to_trade = Click to trade! -gui_rusty.submenu.bought_message = You bought {item_name} for {price} Coins! +gui_rusty.submenu.bought_message=You bought for Coins! gui_rusty.submenu.not_enough_coins = You don't have enough coins! # --- GUIRustyAccessories --- diff --git a/configuration/i18n/en_US/gui/gui_sbmenu.properties b/configuration/i18n/en_US/gui/gui_sbmenu.properties index 33344cd38..9524cba97 100644 --- a/configuration/i18n/en_US/gui/gui_sbmenu.properties +++ b/configuration/i18n/en_US/gui/gui_sbmenu.properties @@ -1,49 +1,115 @@ -# ============================================================================= -# SkyBlock Menu GUIs - English (US) Translation -# ============================================================================= - -# ============================================================================= -# Main SkyBlock Menu (GUISkyBlockMenu) -# ============================================================================= gui_sbmenu.main.title = SkyBlock Menu gui_sbmenu.main.your_profile = Your SkyBlock Profile -gui_sbmenu.main.your_profile.lore = View your equipment, stats, and more!\n \n{stats_display}\n \nClick to view! +gui_sbmenu.main.your_profile.view_equipment=View your equipment, stats, and more! +gui_sbmenu.main.your_profile.view=Click to view! gui_sbmenu.main.skyblock_leveling = SkyBlock Leveling -gui_sbmenu.main.skyblock_leveling.lore = Your SkyBlock Level: [{level_display}]\n \nDetermine how far you've\nprogressed in SkyBlock and earn\nrewards from completing unique\ntasks.\n \nProgress to Level {next_level}\n{next_level_display}\n \nClick to view! +gui_sbmenu.main.skyblock_leveling.lore.1=Your SkyBlock Level: [] +gui_sbmenu.main.skyblock_leveling.lore.2= +gui_sbmenu.main.skyblock_leveling.lore.3=Determine how far you've +gui_sbmenu.main.skyblock_leveling.lore.4=progressed in SkyBlock and earn +gui_sbmenu.main.skyblock_leveling.lore.5=rewards from completing unique +gui_sbmenu.main.skyblock_leveling.lore.6=tasks. +gui_sbmenu.main.skyblock_leveling.lore.7= +gui_sbmenu.main.skyblock_leveling.lore.8=Progress to Level +gui_sbmenu.main.skyblock_leveling.lore.9= +gui_sbmenu.main.skyblock_leveling.lore.10= +gui_sbmenu.main.skyblock_leveling.lore.11=Click to view! gui_sbmenu.main.your_bags = Your Bags -gui_sbmenu.main.your_bags.lore = Different bags allow you to store\nmany different items inside!\n \nClick to view! +gui_sbmenu.main.your_bags.lore.1=Different bags allow you to store +gui_sbmenu.main.your_bags.lore.2=many different items inside! +gui_sbmenu.main.your_bags.lore.3= +gui_sbmenu.main.your_bags.lore.4=Click to view! gui_sbmenu.main.pets = Pets -gui_sbmenu.main.pets.lore = View and manage all of your\nPets.\n \nLevel up your pets faster by\ngaining XP in their favourite\nskill!\n \nSelected pet: {selected_pet}\n \nClick to view! +gui_sbmenu.main.pets.lore.1=View and manage all of your +gui_sbmenu.main.pets.lore.2=Pets. +gui_sbmenu.main.pets.lore.3= +gui_sbmenu.main.pets.lore.4=Level up your pets faster by +gui_sbmenu.main.pets.lore.5=gaining XP in their favourite +gui_sbmenu.main.pets.lore.6=skill! +gui_sbmenu.main.pets.lore.7= +gui_sbmenu.main.pets.lore.8=Selected pet: +gui_sbmenu.main.pets.lore.9= +gui_sbmenu.main.pets.lore.10=Click to view! gui_sbmenu.main.recipe_book = Recipe Book -gui_sbmenu.main.recipe_book.lore = Through your adventure, you will\nunlock recipes for all kinds of\nspecial items! You can view how to\ncraft these items here.\n \n{mission_display}\n \nClick to view! +gui_sbmenu.main.recipe_book.lore.1=Through your adventure, you will +gui_sbmenu.main.recipe_book.lore.2=unlock recipes for all kinds of +gui_sbmenu.main.recipe_book.lore.3=special items! You can view how to +gui_sbmenu.main.recipe_book.lore.4=craft these items here. +gui_sbmenu.main.recipe_book.lore.5= +gui_sbmenu.main.recipe_book.lore.6= +gui_sbmenu.main.recipe_book.lore.7= +gui_sbmenu.main.recipe_book.lore.8= +gui_sbmenu.main.recipe_book.lore.9=Click to view! gui_sbmenu.main.storage = Storage -gui_sbmenu.main.storage.lore = Store global items that you\nwant to access at any time\nfrom anywhere here.\n \nClick to view! +gui_sbmenu.main.storage.lore.1=Store global items that you +gui_sbmenu.main.storage.lore.2=want to access at any time +gui_sbmenu.main.storage.lore.3=from anywhere here. +gui_sbmenu.main.storage.lore.4= +gui_sbmenu.main.storage.lore.5=Click to view! gui_sbmenu.main.quests = Quests & Chapters -gui_sbmenu.main.quests.lore = Each island has its own series of\nChapters for you to complete!\n \nComplete tasks within a Chapter to\nearn small rewards, or complete\nentire Chapters to earn big ones!\n \nSome islands also have Quests for\nyou to complete! Some items can only\nbe obtained through Quests.\n \nClick to view! +gui_sbmenu.main.quests.lore.1=Each island has its own series of +gui_sbmenu.main.quests.lore.2=Chapters for you to complete! +gui_sbmenu.main.quests.lore.3= +gui_sbmenu.main.quests.lore.4=Complete tasks within a Chapter to +gui_sbmenu.main.quests.lore.5=earn small rewards, or complete +gui_sbmenu.main.quests.lore.6=entire Chapters to earn big ones! +gui_sbmenu.main.quests.lore.7= +gui_sbmenu.main.quests.lore.8=Some islands also have Quests for +gui_sbmenu.main.quests.lore.9=you to complete! Some items can only +gui_sbmenu.main.quests.lore.10=be obtained through Quests. +gui_sbmenu.main.quests.lore.11= +gui_sbmenu.main.quests.lore.12=Click to view! gui_sbmenu.main.calendar = Calendar and Events -gui_sbmenu.main.calendar.lore_header = View the SkyBlock Calendar, upcoming\nevents, and event rewards!\n \nDate: {date} +gui_sbmenu.main.calendar.lore_header.1=View the SkyBlock Calendar, upcoming +gui_sbmenu.main.calendar.lore_header.2=events, and event rewards! +gui_sbmenu.main.calendar.lore_header.3= +gui_sbmenu.main.calendar.lore_header.4=Date: gui_sbmenu.main.calendar.current_events = Current events: -gui_sbmenu.main.calendar.current_event = Current event: {event_name} -gui_sbmenu.main.calendar.event_ends_in = Ends in: {time_left} +gui_sbmenu.main.calendar.current_event=Current event: +gui_sbmenu.main.calendar.event_ends_in=Ends in: gui_sbmenu.main.calendar.no_current_events = No current events. -gui_sbmenu.main.calendar.next_event = Next event: {event_name} -gui_sbmenu.main.calendar.next_event_starting = Starting in: {time_left} +gui_sbmenu.main.calendar.next_event=Next event: +gui_sbmenu.main.calendar.next_event_starting=Starting in: gui_sbmenu.main.calendar.no_upcoming_events = No upcoming events. -gui_sbmenu.main.calendar.lore_footer = Also accessible via /calendar\n \nClick to view! +gui_sbmenu.main.calendar.lore_footer.1=Also accessible via /calendar +gui_sbmenu.main.calendar.lore_footer.2= +gui_sbmenu.main.calendar.lore_footer.3=Click to view! gui_sbmenu.main.skills = Your Skills -gui_sbmenu.main.skills.lore = View your Skill progression and\nrewards.\n \nClick to view! +gui_sbmenu.main.skills.lore.1=View your Skill progression and +gui_sbmenu.main.skills.lore.2=rewards. +gui_sbmenu.main.skills.lore.3= +gui_sbmenu.main.skills.lore.4=Click to view! gui_sbmenu.main.collections = Collections -gui_sbmenu.main.collections.lore = View all of the items available in\nSkyBlock. Collect more of an item to\nunlock rewards on your way to\nbecoming a master of SkyBlock!\n \n{collection_display}\n \nClick to view! +gui_sbmenu.main.collections.lore.1=View all of the items available in +gui_sbmenu.main.collections.lore.2=SkyBlock. Collect more of an item to +gui_sbmenu.main.collections.lore.3=unlock rewards on your way to +gui_sbmenu.main.collections.lore.4=becoming a master of SkyBlock! +gui_sbmenu.main.collections.lore.5= +gui_sbmenu.main.collections.lore.6= +gui_sbmenu.main.collections.lore.7= +gui_sbmenu.main.collections.lore.8= +gui_sbmenu.main.collections.lore.9=Click to view! gui_sbmenu.main.crafting_table = Crafting Table -gui_sbmenu.main.crafting_table.lore = Opens the crafting grid.\n \nClick to open! +gui_sbmenu.main.crafting_table.lore.1=Opens the crafting grid. +gui_sbmenu.main.crafting_table.lore.2= +gui_sbmenu.main.crafting_table.lore.3=Click to open! gui_sbmenu.main.fast_travel = Fast Travel -gui_sbmenu.main.fast_travel.lore = Teleport to islands you've already\nvisited.\n \nRight-click to warp home!\nClick to pick location! +gui_sbmenu.main.fast_travel.lore.1=Teleport to islands you've already +gui_sbmenu.main.fast_travel.lore.2=visited. +gui_sbmenu.main.fast_travel.lore.3= +gui_sbmenu.main.fast_travel.lore.4=Right-click to warp home! +gui_sbmenu.main.fast_travel.lore.5=Click to pick location! gui_sbmenu.main.profile_management = Profile Management -gui_sbmenu.main.profile_management.lore = You can have multiple SkyBlock\nprofiles at the same time.\n \nEach profile has its own island,\ninventory, quest log...\n \nProfiles: {profile_count}/4\n \nClick to manage! +gui_sbmenu.main.profile_management.lore.1=You can have multiple SkyBlock +gui_sbmenu.main.profile_management.lore.2=profiles at the same time. +gui_sbmenu.main.profile_management.lore.3= +gui_sbmenu.main.profile_management.lore.4=Each profile has its own island, +gui_sbmenu.main.profile_management.lore.5=inventory, quest log... +gui_sbmenu.main.profile_management.lore.6= +gui_sbmenu.main.profile_management.lore.7=Profiles: /4 +gui_sbmenu.main.profile_management.lore.8= +gui_sbmenu.main.profile_management.lore.9=Click to manage! -# ============================================================================= -# SkyBlock Profile (GUISkyBlockProfile) -# ============================================================================= gui_sbmenu.profile.title = Your Equipment and Stats gui_sbmenu.profile.empty_held_item = Empty Held Item Slot gui_sbmenu.profile.empty_helmet = Empty Helmet Slot @@ -52,72 +118,134 @@ gui_sbmenu.profile.empty_leggings = Empty Leggings Slot gui_sbmenu.profile.empty_boots = Empty Boots Slot gui_sbmenu.profile.empty_pet = Empty Pet Slot gui_sbmenu.profile.combat_stats = Combat Stats -gui_sbmenu.profile.combat_stats.lore = Gives you a better chance at\nfighting strong monsters. \n \n{stats_display}\n\nClick for details! +gui_sbmenu.profile.combat_stats.lore.1=Gives you a better chance at +gui_sbmenu.profile.combat_stats.lore.2=fighting strong monsters. gui_sbmenu.profile.gathering_stats = Gathering Stats -gui_sbmenu.profile.gathering_stats.lore = Lets you collect and harvest better\nitems, or more of them. \n \n{stats_display}\n\nClick for details! +gui_sbmenu.profile.gathering_stats.lore.1=Lets you collect and harvest better +gui_sbmenu.profile.gathering_stats.lore.2=items, or more of them. gui_sbmenu.profile.wisdom_stats = Wisdom Stats -gui_sbmenu.profile.wisdom_stats.lore = Increases the XP you gain on your\nskills \n \n{stats_display}\n\nClick for details! +gui_sbmenu.profile.wisdom_stats.lore.1=Increases the XP you gain on your +gui_sbmenu.profile.wisdom_stats.lore.2=skills gui_sbmenu.profile.misc_stats = Misc Stats -gui_sbmenu.profile.misc_stats.lore = Augments various aspects of your\ngameplay! \n \n{stats_display}\n\nClick for details! +gui_sbmenu.profile.misc_stats.lore.1=Augments various aspects of your +gui_sbmenu.profile.misc_stats.lore.2=gameplay! # ============================================================================= # Pets (GUIPets) # ============================================================================= -gui_sbmenu.pets.title = ({page}/{max_page}) Pets +gui_sbmenu.pets.title=(/) Pets gui_sbmenu.pets.info = Pets -gui_sbmenu.pets.info.lore = View and manage all of your\nPets.\n \nLevel up your pets faster by\ngaining XP in their favourite\nskill!\n \nSelected pet: {selected_pet}\n \nClick to view! +gui_sbmenu.pets.info.lore.1=View and manage all of your +gui_sbmenu.pets.info.lore.2=Pets. +gui_sbmenu.pets.info.lore.3= +gui_sbmenu.pets.info.lore.4=Level up your pets faster by +gui_sbmenu.pets.info.lore.5=gaining XP in their favourite +gui_sbmenu.pets.info.lore.6=skill! +gui_sbmenu.pets.info.lore.7= +gui_sbmenu.pets.info.lore.8=Selected pet: +gui_sbmenu.pets.info.lore.9= +gui_sbmenu.pets.info.lore.10=Click to view! gui_sbmenu.pets.currently_active = Currently Active! gui_sbmenu.pets.click_to_deselect = Click to deselect! gui_sbmenu.pets.click_to_summon = Click to summon! gui_sbmenu.pets.convert_to_item = Convert to item -gui_sbmenu.pets.convert_to_item.lore = Toggle between converting your pets to an item\nso you can pick it up and\nplace it in your inventory!\n \nCurrently: {status}\n \nClick to convert! +gui_sbmenu.pets.convert_to_item.lore.1=Toggle between converting your pets to an item +gui_sbmenu.pets.convert_to_item.lore.2=so you can pick it up and +gui_sbmenu.pets.convert_to_item.lore.3=place it in your inventory! +gui_sbmenu.pets.convert_to_item.lore.4= +gui_sbmenu.pets.convert_to_item.lore.5=Currently: +gui_sbmenu.pets.convert_to_item.lore.6= +gui_sbmenu.pets.convert_to_item.lore.7=Click to convert! gui_sbmenu.pets.sort = Sort gui_sbmenu.pets.sort.right_click = Right-Click to go backwards! gui_sbmenu.pets.sort.click = Click to switch sort! -gui_sbmenu.pets.msg.deselected = Deselected pet {pet_name}! +gui_sbmenu.pets.msg.deselected=Deselected pet ! gui_sbmenu.pets.msg.picked_up = You have picked up your pet! -gui_sbmenu.pets.msg.selected = Selected pet {pet_name}! -gui_sbmenu.pets.msg.conversion_toggle = Pet conversion to item is now {status}! +gui_sbmenu.pets.msg.selected=Selected pet ! +gui_sbmenu.pets.msg.conversion_toggle=Pet conversion to item is now ! # ============================================================================= # Crafting (GUICrafting) # ============================================================================= gui_sbmenu.crafting.title = Craft Item gui_sbmenu.crafting.recipe_required = Recipe Required -gui_sbmenu.crafting.recipe_required.lore = Add the items for a valid\nrecipe in the crafting grid\nto the left! -gui_sbmenu.crafting.crafting_item.lore = ------------------\nThis is the item you are crafting. +gui_sbmenu.crafting.recipe_required.lore.1=Add the items for a valid +gui_sbmenu.crafting.recipe_required.lore.2=recipe in the crafting grid +gui_sbmenu.crafting.recipe_required.lore.3=to the left! +gui_sbmenu.crafting.crafting_item.lore.1=------------------ +gui_sbmenu.crafting.crafting_item.lore.2=This is the item you are crafting. # ============================================================================= # Bags - Your Bags (GUIYourBags) # ============================================================================= gui_sbmenu.bags.main.title = Your Bags gui_sbmenu.bags.sack_of_sacks.unlocked = Sack of Sacks -gui_sbmenu.bags.sack_of_sacks.unlocked.lore = A sack which contains other sacks.\nSackception!\n\nClick to open! +gui_sbmenu.bags.sack_of_sacks.unlocked.lore.1=A sack which contains other sacks. +gui_sbmenu.bags.sack_of_sacks.unlocked.lore.2=Sackception! +gui_sbmenu.bags.sack_of_sacks.unlocked.lore.3= +gui_sbmenu.bags.sack_of_sacks.unlocked.lore.4=Click to open! gui_sbmenu.bags.sack_of_sacks.locked = Sack of Sacks -gui_sbmenu.bags.sack_of_sacks.locked.lore = A sack which contains other sacks.\nSackception!\n\nRequires Clownfish Collection IV. +gui_sbmenu.bags.sack_of_sacks.locked.lore.1=A sack which contains other sacks. +gui_sbmenu.bags.sack_of_sacks.locked.lore.2=Sackception! +gui_sbmenu.bags.sack_of_sacks.locked.lore.3= +gui_sbmenu.bags.sack_of_sacks.locked.lore.4=Requires Clownfish Collection IV. gui_sbmenu.bags.fishing_bag.unlocked = Fishing Bag -gui_sbmenu.bags.fishing_bag.unlocked.lore = A useful bag which can hold all\ntypes of fish, bait, and fishing loot!\n\nClick to open! +gui_sbmenu.bags.fishing_bag.unlocked.lore.1=A useful bag which can hold all +gui_sbmenu.bags.fishing_bag.unlocked.lore.2=types of fish, bait, and fishing loot! +gui_sbmenu.bags.fishing_bag.unlocked.lore.3= +gui_sbmenu.bags.fishing_bag.unlocked.lore.4=Click to open! gui_sbmenu.bags.fishing_bag.locked = Fishing Bag -gui_sbmenu.bags.fishing_bag.locked.lore = A useful bag which can hold all\ntypes of fish, bait, and fishing loot!\n\nRequires Raw Fish Collection III. +gui_sbmenu.bags.fishing_bag.locked.lore.1=A useful bag which can hold all +gui_sbmenu.bags.fishing_bag.locked.lore.2=types of fish, bait, and fishing loot! +gui_sbmenu.bags.fishing_bag.locked.lore.3= +gui_sbmenu.bags.fishing_bag.locked.lore.4=Requires Raw Fish Collection III. gui_sbmenu.bags.potion_bag.unlocked = Potion Bag -gui_sbmenu.bags.potion_bag.unlocked.lore = A handy bag for holding your\nPotions in.\n\nClick to open! +gui_sbmenu.bags.potion_bag.unlocked.lore.1=A handy bag for holding your +gui_sbmenu.bags.potion_bag.unlocked.lore.2=Potions in. +gui_sbmenu.bags.potion_bag.unlocked.lore.3= +gui_sbmenu.bags.potion_bag.unlocked.lore.4=Click to open! gui_sbmenu.bags.potion_bag.locked = Potion Bag -gui_sbmenu.bags.potion_bag.locked.lore = A handy bag for holding your\nPotions in.\n\nRequires Nether Wart Collection II. +gui_sbmenu.bags.potion_bag.locked.lore.1=A handy bag for holding your +gui_sbmenu.bags.potion_bag.locked.lore.2=Potions in. +gui_sbmenu.bags.potion_bag.locked.lore.3= +gui_sbmenu.bags.potion_bag.locked.lore.4=Requires Nether Wart Collection II. gui_sbmenu.bags.quiver.unlocked = Quiver -gui_sbmenu.bags.quiver.unlocked.lore = A masterfully crafted Quiver which\nholds any kind of projectile you can\nthink of!\n \nClick to open! +gui_sbmenu.bags.quiver.unlocked.lore.1=A masterfully crafted Quiver which +gui_sbmenu.bags.quiver.unlocked.lore.2=holds any kind of projectile you can +gui_sbmenu.bags.quiver.unlocked.lore.3=think of! +gui_sbmenu.bags.quiver.unlocked.lore.4= +gui_sbmenu.bags.quiver.unlocked.lore.5=Click to open! gui_sbmenu.bags.quiver.locked = Quiver -gui_sbmenu.bags.quiver.locked.lore = A masterfully crafted Quiver which\nholds any kind of projectile you can\nthink of!\n \nRequires String Collection III. +gui_sbmenu.bags.quiver.locked.lore.1=A masterfully crafted Quiver which +gui_sbmenu.bags.quiver.locked.lore.2=holds any kind of projectile you can +gui_sbmenu.bags.quiver.locked.lore.3=think of! +gui_sbmenu.bags.quiver.locked.lore.4= +gui_sbmenu.bags.quiver.locked.lore.5=Requires String Collection III. gui_sbmenu.bags.accessory_bag.unlocked = Accessory Bag -gui_sbmenu.bags.accessory_bag.unlocked.lore = A special bag which can hold\nTalismans, Rings, Artifacts, and Orbs\nwithin it. All will still work while in this\nbag!\n \nMagical Power: {magical_power}\n \nClick to open! +gui_sbmenu.bags.accessory_bag.unlocked.lore.1=A special bag which can hold +gui_sbmenu.bags.accessory_bag.unlocked.lore.2=Talismans, Rings, Artifacts, and Orbs +gui_sbmenu.bags.accessory_bag.unlocked.lore.3=within it. All will still work while in this +gui_sbmenu.bags.accessory_bag.unlocked.lore.4=bag! +gui_sbmenu.bags.accessory_bag.unlocked.lore.5= +gui_sbmenu.bags.accessory_bag.unlocked.lore.6=Magical Power: +gui_sbmenu.bags.accessory_bag.unlocked.lore.7= +gui_sbmenu.bags.accessory_bag.unlocked.lore.8=Click to open! gui_sbmenu.bags.accessory_bag.locked = Accessory Bag -gui_sbmenu.bags.accessory_bag.locked.lore = A special bag which can hold\nTalismans, Rings, Artifacts, and Orbs\nwithin it. All will still work while in this\nbag!\n \nRequires Redstone Collection II. +gui_sbmenu.bags.accessory_bag.locked.lore.1=A special bag which can hold +gui_sbmenu.bags.accessory_bag.locked.lore.2=Talismans, Rings, Artifacts, and Orbs +gui_sbmenu.bags.accessory_bag.locked.lore.3=within it. All will still work while in this +gui_sbmenu.bags.accessory_bag.locked.lore.4=bag! +gui_sbmenu.bags.accessory_bag.locked.lore.5= +gui_sbmenu.bags.accessory_bag.locked.lore.6=Requires Redstone Collection II. # ============================================================================= # Bags - Accessory Bag (GUIAccessoryBag) # ============================================================================= -gui_sbmenu.bags.accessory.title = Accessory Bag ({page}/{max_page}) +gui_sbmenu.bags.accessory.title=Accessory Bag (/) gui_sbmenu.bags.accessory.locked = Locked -gui_sbmenu.bags.accessory.locked.lore = You need to unlock the\n{upgrade_name} upgrade\nto use this slot. +gui_sbmenu.bags.accessory.locked.lore.1=You need to unlock the +gui_sbmenu.bags.accessory.locked.lore.2= upgrade +gui_sbmenu.bags.accessory.locked.lore.3=to use this slot. gui_sbmenu.bags.accessory.previous_page = Previous Page gui_sbmenu.bags.accessory.next_page = Next Page gui_sbmenu.bags.accessory.msg.cannot_put = You cannot put this item in the Accessory Bag! @@ -127,7 +255,8 @@ gui_sbmenu.bags.accessory.msg.cannot_put = You cannot put this item in the # ============================================================================= gui_sbmenu.bags.quiver.title = Quiver gui_sbmenu.bags.quiver.locked_slot = Locked -gui_sbmenu.bags.quiver.locked_slot.lore = You must have the {upgrade_name} upgrade\nto unlock this slot. +gui_sbmenu.bags.quiver.locked_slot.lore.1=You must have the upgrade +gui_sbmenu.bags.quiver.locked_slot.lore.2=to unlock this slot. gui_sbmenu.bags.quiver.msg.cannot_put = You cannot put this item in the Quiver! # ============================================================================= @@ -135,7 +264,7 @@ gui_sbmenu.bags.quiver.msg.cannot_put = You cannot put this item in the Qui # ============================================================================= gui_sbmenu.bags.sack.go_back = Go Back gui_sbmenu.bags.sack.go_back.lore = To Sack of Sacks -gui_sbmenu.bags.sack.stored = Stored: {color}{amount}/{max} +gui_sbmenu.bags.sack.stored=Stored: / gui_sbmenu.bags.sack.right_click_stack = Right-Click for stack! gui_sbmenu.bags.sack.click_to_pickup = Click to pickup! gui_sbmenu.bags.sack.empty = Empty sack! @@ -145,9 +274,14 @@ gui_sbmenu.bags.sack.empty = Empty sack! # ============================================================================= gui_sbmenu.bags.sack_of_sacks.title = Sack of Sacks gui_sbmenu.bags.sack_of_sacks.locked_slot = Locked -gui_sbmenu.bags.sack_of_sacks.locked_slot.lore = You need to unlock the\n{upgrade_name} upgrade\nto use this slot. +gui_sbmenu.bags.sack_of_sacks.locked_slot.lore.1=You need to unlock the +gui_sbmenu.bags.sack_of_sacks.locked_slot.lore.2= upgrade +gui_sbmenu.bags.sack_of_sacks.locked_slot.lore.3=to use this slot. gui_sbmenu.bags.sack_of_sacks.insert_inventory = Insert inventory -gui_sbmenu.bags.sack_of_sacks.insert_inventory.lore = Inserts your inventory items into\nyour sacks.\n\nClick to put items in! +gui_sbmenu.bags.sack_of_sacks.insert_inventory.lore.1=Inserts your inventory items into +gui_sbmenu.bags.sack_of_sacks.insert_inventory.lore.2=your sacks. +gui_sbmenu.bags.sack_of_sacks.insert_inventory.lore.3= +gui_sbmenu.bags.sack_of_sacks.insert_inventory.lore.4=Click to put items in! gui_sbmenu.bags.sack_of_sacks.msg.cannot_put = You cannot put this item in the Sack of Sacks! # ============================================================================= @@ -156,128 +290,177 @@ gui_sbmenu.bags.sack_of_sacks.msg.cannot_put = You cannot put this item in gui_sbmenu.bestiary.title = Bestiary gui_sbmenu.bestiary.info = Bestiary gui_sbmenu.bestiary.region.your_island = Your Island -gui_sbmenu.bestiary.region.your_island.lore = View all of the mobs that you've\nfound and killed on Your Island. +gui_sbmenu.bestiary.region.your_island.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.your_island.lore.2=found and killed on Your Island. gui_sbmenu.bestiary.region.hub = Hub -gui_sbmenu.bestiary.region.hub.lore = View all of the mobs that you've\nfound and killed in the Hub. +gui_sbmenu.bestiary.region.hub.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.hub.lore.2=found and killed in the Hub. gui_sbmenu.bestiary.region.farming_islands = The Farming Islands -gui_sbmenu.bestiary.region.farming_islands.lore = View all of the mobs that you've\nfound and killed in The Farming\nIslands. +gui_sbmenu.bestiary.region.farming_islands.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.farming_islands.lore.2=found and killed in The Farming +gui_sbmenu.bestiary.region.farming_islands.lore.3=Islands. gui_sbmenu.bestiary.region.garden = Garden -gui_sbmenu.bestiary.region.garden.lore = View all of the Pests that you've\nkilled on the Garden. +gui_sbmenu.bestiary.region.garden.lore.1=View all of the Pests that you've +gui_sbmenu.bestiary.region.garden.lore.2=killed on the Garden. gui_sbmenu.bestiary.region.spiders_den = Spider's Den -gui_sbmenu.bestiary.region.spiders_den.lore = View all of the mobs that you've\nfound and killed in the Spider's Den. +gui_sbmenu.bestiary.region.spiders_den.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.spiders_den.lore.2=found and killed in the Spider's Den. gui_sbmenu.bestiary.region.the_end = The End -gui_sbmenu.bestiary.region.the_end.lore = View all of the mobs that you've\nfound and killed in The End. +gui_sbmenu.bestiary.region.the_end.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.the_end.lore.2=found and killed in The End. gui_sbmenu.bestiary.region.crimson_isle = Crimson Isle -gui_sbmenu.bestiary.region.crimson_isle.lore = View all of the mobs that you've\nfound and killed in the Crimson Isle. +gui_sbmenu.bestiary.region.crimson_isle.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.crimson_isle.lore.2=found and killed in the Crimson Isle. gui_sbmenu.bestiary.region.deep_caverns = Deep Caverns -gui_sbmenu.bestiary.region.deep_caverns.lore = View all of the mobs that you've\nfound and killed in the Deep Caverns. +gui_sbmenu.bestiary.region.deep_caverns.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.deep_caverns.lore.2=found and killed in the Deep Caverns. gui_sbmenu.bestiary.region.dwarven_mines = Dwarven Mines -gui_sbmenu.bestiary.region.dwarven_mines.lore = View all of the mobs that you've\nfound and killed in the Dwarven Mines. +gui_sbmenu.bestiary.region.dwarven_mines.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.dwarven_mines.lore.2=found and killed in the Dwarven Mines. gui_sbmenu.bestiary.region.crystal_hallows = Crystal Hallows -gui_sbmenu.bestiary.region.crystal_hallows.lore = View all of the mobs that you've\nfound and killed in the Crystal\nHollows. +gui_sbmenu.bestiary.region.crystal_hallows.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.crystal_hallows.lore.2=found and killed in the Crystal +gui_sbmenu.bestiary.region.crystal_hallows.lore.3=Hollows. gui_sbmenu.bestiary.region.the_park = The Park -gui_sbmenu.bestiary.region.the_park.lore = View all of the mobs that you've\nfound and killed in The Park. +gui_sbmenu.bestiary.region.the_park.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.the_park.lore.2=found and killed in The Park. gui_sbmenu.bestiary.region.galatea = Galatea -gui_sbmenu.bestiary.region.galatea.lore = View all of the mobs that you've\nfound and killed in Galatea. +gui_sbmenu.bestiary.region.galatea.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.galatea.lore.2=found and killed in Galatea. gui_sbmenu.bestiary.region.spooky_festival = Spooky Festival -gui_sbmenu.bestiary.region.spooky_festival.lore = View all of the mobs that you've\nfound and killed during the Spooky\nFestival. +gui_sbmenu.bestiary.region.spooky_festival.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.spooky_festival.lore.2=found and killed during the Spooky +gui_sbmenu.bestiary.region.spooky_festival.lore.3=Festival. gui_sbmenu.bestiary.region.catacombs = Catacombs -gui_sbmenu.bestiary.region.catacombs.lore = View all of the mobs that you've\nfound and killed in The Catacombs. +gui_sbmenu.bestiary.region.catacombs.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.catacombs.lore.2=found and killed in The Catacombs. gui_sbmenu.bestiary.region.fishing = Fishing -gui_sbmenu.bestiary.region.fishing.lore = View all of the Sea Creatures that\nyou've killed while fishing. +gui_sbmenu.bestiary.region.fishing.lore.1=View all of the Sea Creatures that +gui_sbmenu.bestiary.region.fishing.lore.2=you've killed while fishing. gui_sbmenu.bestiary.region.mythological = Mythological Creatures -gui_sbmenu.bestiary.region.mythological.lore = View all of the Mythological\nCreatures that you've killed. +gui_sbmenu.bestiary.region.mythological.lore.1=View all of the Mythological +gui_sbmenu.bestiary.region.mythological.lore.2=Creatures that you've killed. gui_sbmenu.bestiary.region.jerry = Jerry -gui_sbmenu.bestiary.region.jerry.lore = View all of the mobs that you've\nfound and killed while fighting Jerry. +gui_sbmenu.bestiary.region.jerry.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.jerry.lore.2=found and killed while fighting Jerry. gui_sbmenu.bestiary.region.kuudra = Kuudra -gui_sbmenu.bestiary.region.kuudra.lore = View all of the mobs that you've\nfound and killed while fighting Kuudra. +gui_sbmenu.bestiary.region.kuudra.lore.1=View all of the mobs that you've +gui_sbmenu.bestiary.region.kuudra.lore.2=found and killed while fighting Kuudra. # ============================================================================= # Bestiary - Island (GUIBestiaryIsland) # ============================================================================= -gui_sbmenu.bestiary.island.title = Bestiary > {island_name} -gui_sbmenu.bestiary.island.families_found = Families Found: {color}{percent}% -gui_sbmenu.bestiary.island.families_completed = Families Completed: {color}{percent}% -gui_sbmenu.bestiary.island.mob_found = {name} {tier} -gui_sbmenu.bestiary.island.mob_locked = {name} -gui_sbmenu.bestiary.island.mob_locked.lore = Kill a mob belonging to this Family to\nunlock it in your Bestiary! +gui_sbmenu.bestiary.island.title=Bestiary > +gui_sbmenu.bestiary.island.families_found=Families Found: % +gui_sbmenu.bestiary.island.families_completed=Families Completed: % +gui_sbmenu.bestiary.island.mob_found= +gui_sbmenu.bestiary.island.mob_locked= +gui_sbmenu.bestiary.island.mob_locked.lore.1=Kill a mob belonging to this Family to +gui_sbmenu.bestiary.island.mob_locked.lore.2=unlock it in your Bestiary! gui_sbmenu.bestiary.island.click_to_view = Click to view! # ============================================================================= # Bestiary - Mob (GUIBestiaryMob) # ============================================================================= -gui_sbmenu.bestiary.mob.title = {island_name} > {mob_name} -gui_sbmenu.bestiary.mob.mob_type = Mob Type: {type} -gui_sbmenu.bestiary.mob.mob_types = Mob Types: {types} +gui_sbmenu.bestiary.mob.title= > +gui_sbmenu.bestiary.mob.mob_type=Mob Type: +gui_sbmenu.bestiary.mob.mob_types=Mob Types: gui_sbmenu.bestiary.mob.mob_stats = Mob Stats: -gui_sbmenu.bestiary.mob.health = Health: {color}{value}{symbol} -gui_sbmenu.bestiary.mob.damage = Damage: {color}{value}{symbol} -gui_sbmenu.bestiary.mob.coins_per_kill = Coins per Kill: {amount} -gui_sbmenu.bestiary.mob.skill_exp = {skill_name} Exp: {amount} -gui_sbmenu.bestiary.mob.xp_orbs = XP Orbs: {amount} -gui_sbmenu.bestiary.mob.kills = Kills: {amount} -gui_sbmenu.bestiary.mob.deaths = Deaths: {amount} +gui_sbmenu.bestiary.mob.health=Health: +gui_sbmenu.bestiary.mob.damage=Damage: +gui_sbmenu.bestiary.mob.coins_per_kill=Coins per Kill: +gui_sbmenu.bestiary.mob.skill_exp= Exp: +gui_sbmenu.bestiary.mob.xp_orbs=XP Orbs: +gui_sbmenu.bestiary.mob.kills=Kills: +gui_sbmenu.bestiary.mob.deaths=Deaths: gui_sbmenu.bestiary.mob.common_loot = Common Loot gui_sbmenu.bestiary.mob.uncommon_loot = Uncommon Loot gui_sbmenu.bestiary.mob.rare_loot = Rare Loot gui_sbmenu.bestiary.mob.legendary_loot = Legendary Loot gui_sbmenu.bestiary.mob.rngesus_loot = RNGesus Loot -gui_sbmenu.bestiary.mob.loot_entry = {item_name} -gui_sbmenu.bestiary.mob.loot_entry_chance = {item_name} ({chance}%) -gui_sbmenu.bestiary.mob.level_display = [Lv{level}] {name} +gui_sbmenu.bestiary.mob.loot_entry= +gui_sbmenu.bestiary.mob.loot_entry_chance= (%) +gui_sbmenu.bestiary.mob.level_display=[Lv] # ============================================================================= # Calendar (GUICalendar) # ============================================================================= gui_sbmenu.calendar.title = Calendar and Events -gui_sbmenu.calendar.starts_in = Starts in: {time} -gui_sbmenu.calendar.event_lasts = Event lasts for {duration}! +gui_sbmenu.calendar.starts_in=Starts in: +gui_sbmenu.calendar.event_lasts=Event lasts for ! # ============================================================================= # Collections (GUICollections) # ============================================================================= gui_sbmenu.collection.main.title = Collections gui_sbmenu.collection.main.info = Collections -gui_sbmenu.collection.main.info.lore = View all of the items available in\nSkyBlock. Collect more of an item to\nunlock rewards on your way to\nbecoming a master of SkyBlock!\n \n{collection_display}\n \nClick to view! +gui_sbmenu.collection.main.info.lore.1=View all of the items available in +gui_sbmenu.collection.main.info.lore.2=SkyBlock. Collect more of an item to +gui_sbmenu.collection.main.info.lore.3=unlock rewards on your way to +gui_sbmenu.collection.main.info.lore.4=becoming a master of SkyBlock! +gui_sbmenu.collection.main.info.lore.5=your +gui_sbmenu.collection.main.info.lore.6= +gui_sbmenu.collection.main.info.lore.7= +gui_sbmenu.collection.main.info.lore.8= +gui_sbmenu.collection.main.info.lore.9=Click to view! gui_sbmenu.collection.main.crafted_minions = Crafted Minions -gui_sbmenu.collection.main.crafted_minions.lore = View all the unique minions that you\nhave crafted.\n\nClick to view! -gui_sbmenu.collection.main.category = {category_name} Collections -gui_sbmenu.collection.main.category.lore = View your {category_name} Collections!\n \n{display} +gui_sbmenu.collection.main.crafted_minions.lore.1=View all the unique minions that you +gui_sbmenu.collection.main.crafted_minions.lore.2=have crafted. +gui_sbmenu.collection.main.crafted_minions.lore.3= +gui_sbmenu.collection.main.crafted_minions.lore.4=Click to view! +gui_sbmenu.collection.main.category= Collections +gui_sbmenu.collection.main.category.lore.1=View your Collections! +gui_sbmenu.collection.main.category.lore.2= +gui_sbmenu.collection.main.category.lore.3= # ============================================================================= # Collection Category (GUICollectionCategory) # ============================================================================= -gui_sbmenu.collection.category.title = {category_name} Collections -gui_sbmenu.collection.category.info = {category_name} Collections -gui_sbmenu.collection.category.info.lore = View your {category_name} Collections!\n \n{display} -gui_sbmenu.collection.category.item_locked = {item_name} -gui_sbmenu.collection.category.item_locked.lore = Find this item to add it to your\ncollection and unlock collection\nrewards! -gui_sbmenu.collection.category.item_unlocked = {item_name} -gui_sbmenu.collection.category.item_unlocked.lore = View all your {item_name} Collection\nprogress and rewards!\n \n{display}\n \nClick to view! +gui_sbmenu.collection.category.title= Collections +gui_sbmenu.collection.category.info= Collections +gui_sbmenu.collection.category.info.lore.1=View your Collections! +gui_sbmenu.collection.category.info.lore.2= +gui_sbmenu.collection.category.info.lore.3= +gui_sbmenu.collection.category.item_locked= +gui_sbmenu.collection.category.item_locked.lore.1=Find this item to add it to your +gui_sbmenu.collection.category.item_locked.lore.2=collection and unlock collection +gui_sbmenu.collection.category.item_locked.lore.3=rewards! +gui_sbmenu.collection.category.item_unlocked= +gui_sbmenu.collection.category.item_unlocked.lore.1=View all your Collection +gui_sbmenu.collection.category.item_unlocked.lore.2=progress and rewards! +gui_sbmenu.collection.category.item_unlocked.lore.3= +gui_sbmenu.collection.category.item_unlocked.lore.4= +gui_sbmenu.collection.category.item_unlocked.lore.5= +gui_sbmenu.collection.category.item_unlocked.lore.6=Click to view! gui_sbmenu.collection.category.msg.not_found = You haven't found this item yet! # ============================================================================= # Collection Item (GUICollectionItem) # ============================================================================= -gui_sbmenu.collection.item.title = {item_name} Collection -gui_sbmenu.collection.item.info = {item_name} -gui_sbmenu.collection.item.info.lore = View all your {item_name} Collection\nprogress and rewards!\n \nTotal Collected: {total} +gui_sbmenu.collection.item.title= Collection +gui_sbmenu.collection.item.info= +gui_sbmenu.collection.item.info.lore.1=View all your Collection +gui_sbmenu.collection.item.info.lore.2=progress and rewards! +gui_sbmenu.collection.item.info.lore.3= +gui_sbmenu.collection.item.info.lore.4=Total Collected: gui_sbmenu.collection.item.click_to_view = Click to view rewards! # ============================================================================= # Collection Reward (GUICollectionReward) # ============================================================================= -gui_sbmenu.collection.reward.title = {item_name} {tier} Rewards -gui_sbmenu.collection.reward.info = {item_name} {tier} -gui_sbmenu.collection.reward.info.lore = View your {item_name} {tier} Collection rewards!\n \n{display} +gui_sbmenu.collection.reward.title= Rewards +gui_sbmenu.collection.reward.info= +gui_sbmenu.collection.reward.info.lore.1=View your Collection rewards! +gui_sbmenu.collection.reward.info.lore.2= +gui_sbmenu.collection.reward.info.lore.3= gui_sbmenu.collection.reward.msg.no_recipe = There is no recipe available for this item! # ============================================================================= # Crafted Minions (GUICraftedMinions) # ============================================================================= gui_sbmenu.collection.crafted_minions.title = Crafted Minions -gui_sbmenu.collection.crafted_minions.tier_unlocked = \u2714 Tier {tier} -gui_sbmenu.collection.crafted_minions.tier_locked = \u2716 Tier {tier} +gui_sbmenu.collection.crafted_minions.tier_unlocked=\u2714 Tier +gui_sbmenu.collection.crafted_minions.tier_locked=\u2716 Tier gui_sbmenu.collection.crafted_minions.click_to_view = Click to view recipes! gui_sbmenu.collection.crafted_minions.not_crafted = You haven't crafted this minion. @@ -286,35 +469,55 @@ gui_sbmenu.collection.crafted_minions.not_crafted = You haven't crafted th # ============================================================================= gui_sbmenu.fasttravel.title = Fast Travel gui_sbmenu.fasttravel.paper_icons = Paper Icons -gui_sbmenu.fasttravel.paper_icons.lore = Use paper icons, which may load this menu\nfaster on your computer.\n \nEnabled: {status}\n \nClick to toggle! -gui_sbmenu.fasttravel.warp_command = /warp {island_name} -gui_sbmenu.fasttravel.main_skill = Main skill: {skill} -gui_sbmenu.fasttravel.island_tier = Island tier: {tier} +gui_sbmenu.fasttravel.paper_icons.lore.1=Use paper icons, which may load this menu +gui_sbmenu.fasttravel.paper_icons.lore.2=faster on your computer. +gui_sbmenu.fasttravel.paper_icons.lore.3= +gui_sbmenu.fasttravel.paper_icons.lore.4=Enabled: +gui_sbmenu.fasttravel.paper_icons.lore.5= +gui_sbmenu.fasttravel.paper_icons.lore.6=Click to toggle! +gui_sbmenu.fasttravel.warp_command=/warp +gui_sbmenu.fasttravel.main_skill=Main skill: +gui_sbmenu.fasttravel.island_tier=Island tier: gui_sbmenu.fasttravel.warp_not_unlocked = Warp not unlocked! gui_sbmenu.fasttravel.right_click_warp = Right-Click to warp! gui_sbmenu.fasttravel.left_click_open = Left-Click to open! gui_sbmenu.fasttravel.click_to_warp = Click to warp! gui_sbmenu.fasttravel.msg.not_unlocked = You haven't unlocked this fast travel destination! -gui_sbmenu.fasttravel.msg.warping = Warping you to {destination}... -gui_sbmenu.fasttravel.msg.warped = You have been warped to {destination}! +gui_sbmenu.fasttravel.msg.warping=Warping you to ... +gui_sbmenu.fasttravel.msg.warped=You have been warped to ! # ============================================================================= # Fast Travel Sub Menu (GUIFastTravelSubMenu) # ============================================================================= -gui_sbmenu.fasttravel.submenu.title = {island_name} Warps +gui_sbmenu.fasttravel.submenu.title= Warps # ============================================================================= # Quest Log (GUIMissionLog) # ============================================================================= -gui_sbmenu.questlog.title = Quest Log {suffix} -gui_sbmenu.questlog.info = Quest Log {suffix} -gui_sbmenu.questlog.info.lore = View your active quests,\nprogress, and rewards. +gui_sbmenu.questlog.title=Quest Log +gui_sbmenu.questlog.info=Quest Log +gui_sbmenu.questlog.info.lore.1=View your active quests, +gui_sbmenu.questlog.info.lore.2=progress, and rewards. gui_sbmenu.questlog.fairy_souls = Find all Fairy Souls -gui_sbmenu.questlog.fairy_souls.lore = \n \u2716 Found: {found}/{total}\n\nForever ongoing quest...\n\nClick to view details! +gui_sbmenu.questlog.fairy_souls.lore.1= +gui_sbmenu.questlog.fairy_souls.lore.2=\u2716 Found: / +gui_sbmenu.questlog.fairy_souls.lore.3= +gui_sbmenu.questlog.fairy_souls.lore.4=Forever ongoing quest... +gui_sbmenu.questlog.fairy_souls.lore.5= +gui_sbmenu.questlog.fairy_souls.lore.6=Click to view details! gui_sbmenu.questlog.ongoing_quests = Ongoing Quests -gui_sbmenu.questlog.ongoing_quests.lore = View quests you are currently\nworking towards.\n \nClick to view! +gui_sbmenu.questlog.ongoing_quests.lore.1=View quests you are currently +gui_sbmenu.questlog.ongoing_quests.lore.2=working towards. +gui_sbmenu.questlog.ongoing_quests.lore.3= +gui_sbmenu.questlog.ongoing_quests.lore.4=Click to view! gui_sbmenu.questlog.completed_quests = Completed Quests -gui_sbmenu.questlog.completed_quests.lore = Take a peek at the past and\nbrowse quests you've,\nalready completed.\n \nCompleted: {count}\n \nClick to view! +gui_sbmenu.questlog.completed_quests.lore.1=Take a peek at the past and +gui_sbmenu.questlog.completed_quests.lore.2=browse quests you've, +gui_sbmenu.questlog.completed_quests.lore.3=already completed. +gui_sbmenu.questlog.completed_quests.lore.4= +gui_sbmenu.questlog.completed_quests.lore.5=Completed: +gui_sbmenu.questlog.completed_quests.lore.6= +gui_sbmenu.questlog.completed_quests.lore.7=Click to view! gui_sbmenu.questlog.started = Started: gui_sbmenu.questlog.completed = Completed: gui_sbmenu.questlog.not_started = Not Yet Started @@ -324,30 +527,48 @@ gui_sbmenu.questlog.not_started = Not Yet Started # ============================================================================= gui_sbmenu.questlog.fairy_souls_guide.title = Fairy Souls Guide gui_sbmenu.questlog.fairy_souls_guide.miscellaneous = Miscellaneous -gui_sbmenu.questlog.fairy_souls_guide.fairy_souls_count = Fairy Souls: {found}/{total} -gui_sbmenu.questlog.fairy_souls_guide.dungeons = Dungeons: {count} -gui_sbmenu.questlog.fairy_souls_guide.fishing = Fishing: {count} -gui_sbmenu.questlog.fairy_souls_guide.garden = Garden: {count} -gui_sbmenu.questlog.fairy_souls_guide.placeable = Placeable: {count} -gui_sbmenu.questlog.fairy_souls_guide.glacite_mineshafts = Glacite Mineshafts: {count} +gui_sbmenu.questlog.fairy_souls_guide.fairy_souls_count=Fairy Souls: / +gui_sbmenu.questlog.fairy_souls_guide.dungeons=Dungeons: +gui_sbmenu.questlog.fairy_souls_guide.fishing=Fishing: +gui_sbmenu.questlog.fairy_souls_guide.garden=Garden: +gui_sbmenu.questlog.fairy_souls_guide.placeable=Placeable: +gui_sbmenu.questlog.fairy_souls_guide.glacite_mineshafts=Glacite Mineshafts: # ============================================================================= # Profile Management (GUIProfileManagement) # ============================================================================= gui_sbmenu.profiles.management.title = Profile Management gui_sbmenu.profiles.empty_slot = Empty Profile Slot -gui_sbmenu.profiles.empty_slot.lore = Available\n \nUse this slot if you want to\nstart a new SkyBlock adventure.\n \nEach profile has its own:\n- Personal island\n- Inventory\n- Ender Chest\n- Bank & Purse\n- Quests\n- Collections\n \nWARNING: Creation of profiles\nwhich boost other profiles will\nbe considered abusive and\npunished.\n \nClick to create solo profile! -gui_sbmenu.profiles.selected = Profile: {profile_name} +gui_sbmenu.profiles.empty_slot.lore.1=Available +gui_sbmenu.profiles.empty_slot.lore.2= +gui_sbmenu.profiles.empty_slot.lore.3=Use this slot if you want to +gui_sbmenu.profiles.empty_slot.lore.4=start a new SkyBlock adventure. +gui_sbmenu.profiles.empty_slot.lore.5= +gui_sbmenu.profiles.empty_slot.lore.6=Each profile has its own: +gui_sbmenu.profiles.empty_slot.lore.7=- Personal island +gui_sbmenu.profiles.empty_slot.lore.8=- Inventory +gui_sbmenu.profiles.empty_slot.lore.9=- Ender Chest +gui_sbmenu.profiles.empty_slot.lore.10=- Bank & Purse +gui_sbmenu.profiles.empty_slot.lore.11=- Quests +gui_sbmenu.profiles.empty_slot.lore.12=- Collections +gui_sbmenu.profiles.empty_slot.lore.13= +gui_sbmenu.profiles.empty_slot.lore.14=WARNING: Creation of profiles +gui_sbmenu.profiles.empty_slot.lore.15=which boost other profiles will +gui_sbmenu.profiles.empty_slot.lore.16=be considered abusive and +gui_sbmenu.profiles.empty_slot.lore.17=punished. +gui_sbmenu.profiles.empty_slot.lore.18= +gui_sbmenu.profiles.empty_slot.lore.19=Click to create solo profile! +gui_sbmenu.profiles.selected=Profile: gui_sbmenu.profiles.selected.subtitle = Selected slot gui_sbmenu.profiles.selected.playing = You are playing on this profile! -gui_sbmenu.profiles.unselected = Profile: {profile_name} +gui_sbmenu.profiles.unselected=Profile: gui_sbmenu.profiles.unselected.subtitle = Slot in use gui_sbmenu.profiles.unselected.click = Click to manage! gui_sbmenu.profiles.coop_label = Co-op: gui_sbmenu.profiles.no_skills = No Skills Yet! -gui_sbmenu.profiles.purse_coins = Purse Coins: {coins} -gui_sbmenu.profiles.age = Age: {age} -gui_sbmenu.profiles.msg.playing_on = Yep! {profile_name} is the profile you are playing on! +gui_sbmenu.profiles.purse_coins=Purse Coins: +gui_sbmenu.profiles.age=Age: +gui_sbmenu.profiles.msg.playing_on=Yep! is the profile you are playing on! gui_sbmenu.profiles.msg.switch_first = If you want to delete this profile, switch to another one first! # ============================================================================= @@ -355,12 +576,26 @@ gui_sbmenu.profiles.msg.switch_first = If you want to delete this profile, # ============================================================================= gui_sbmenu.profiles.select.title = Profile Management gui_sbmenu.profiles.select.switch = Switch to Profile -gui_sbmenu.profiles.select.switch.lore = Teleports you to your island on\nanother profile and loads your\ninventory, skills, collections\nand more...\n\nCurrent: {current}\nSwitching to: {switching_to}\n\nClick to switch +gui_sbmenu.profiles.select.switch.lore.1=Teleports you to your island on +gui_sbmenu.profiles.select.switch.lore.2=another profile and loads your +gui_sbmenu.profiles.select.switch.lore.3=inventory, skills, collections +gui_sbmenu.profiles.select.switch.lore.4=and more... +gui_sbmenu.profiles.select.switch.lore.5= +gui_sbmenu.profiles.select.switch.lore.6=Current: +gui_sbmenu.profiles.select.switch.lore.7=Switching to: +gui_sbmenu.profiles.select.switch.lore.8= +gui_sbmenu.profiles.select.switch.lore.9=Click to switch gui_sbmenu.profiles.select.delete = Delete profile -gui_sbmenu.profiles.select.delete.lore = Clear this profile slot by\ndeleting the profile forever.\n\nWarning!\nYou cannot revert this actions!\n\nClick to continue! +gui_sbmenu.profiles.select.delete.lore.1=Clear this profile slot by +gui_sbmenu.profiles.select.delete.lore.2=deleting the profile forever. +gui_sbmenu.profiles.select.delete.lore.3= +gui_sbmenu.profiles.select.delete.lore.4=Warning! +gui_sbmenu.profiles.select.delete.lore.5=You cannot revert this actions! +gui_sbmenu.profiles.select.delete.lore.6= +gui_sbmenu.profiles.select.delete.lore.7=Click to continue! gui_sbmenu.profiles.select.msg.cannot_delete_coop = You cannot delete a profile that is in a coop! gui_sbmenu.profiles.select.msg.coop_leave = Instead run /coopleave to leave your coop. -gui_sbmenu.profiles.select.msg.deleted = Done! Your {profile_name} profile was deleted! +gui_sbmenu.profiles.select.msg.deleted=Done! Your profile was deleted! gui_sbmenu.profiles.select.msg.deleted_generic = Done! Your profile was deleted! # ============================================================================= @@ -368,9 +603,24 @@ gui_sbmenu.profiles.select.msg.deleted_generic = Done! Your profile was d # ============================================================================= gui_sbmenu.profiles.mode.title = Choose a SkyBlock Mode gui_sbmenu.profiles.mode.classic = Classic Profile -gui_sbmenu.profiles.mode.classic.lore = SkyBlock Mode\n\nA SkyBlock adventure with the\ndefault rules.\n\nStart on a new tiny island,\nwithout gear and build your\nway up to become the\ngreatest player in the\nuniverse!\n\nClick to play this mode! +gui_sbmenu.profiles.mode.classic.lore.1=SkyBlock Mode +gui_sbmenu.profiles.mode.classic.lore.2= +gui_sbmenu.profiles.mode.classic.lore.3=A SkyBlock adventure with the +gui_sbmenu.profiles.mode.classic.lore.4=default rules. +gui_sbmenu.profiles.mode.classic.lore.5= +gui_sbmenu.profiles.mode.classic.lore.6=Start on a new tiny island, +gui_sbmenu.profiles.mode.classic.lore.7=without gear and build your +gui_sbmenu.profiles.mode.classic.lore.8=way up to become the +gui_sbmenu.profiles.mode.classic.lore.9=greatest player in the +gui_sbmenu.profiles.mode.classic.lore.10=universe! +gui_sbmenu.profiles.mode.classic.lore.11= +gui_sbmenu.profiles.mode.classic.lore.12=Click to play this mode! gui_sbmenu.profiles.mode.special = Special Modes -gui_sbmenu.profiles.mode.special.lore = Choose a SkyBlock mode with\nspecial rules and unique\nmechanics.\n\nClick to choose a mode! +gui_sbmenu.profiles.mode.special.lore.1=Choose a SkyBlock mode with +gui_sbmenu.profiles.mode.special.lore.2=special rules and unique +gui_sbmenu.profiles.mode.special.lore.3=mechanics. +gui_sbmenu.profiles.mode.special.lore.4= +gui_sbmenu.profiles.mode.special.lore.5=Click to choose a mode! gui_sbmenu.profiles.mode.msg.unavailable = Special Modes in SkyBlock are currently unavailable. Please check back another time. # ============================================================================= @@ -378,7 +628,17 @@ gui_sbmenu.profiles.mode.msg.unavailable = Special Modes in SkyBlock are cu # ============================================================================= gui_sbmenu.profiles.create.title = Create a Profile gui_sbmenu.profiles.create.confirm = Create New Profile -gui_sbmenu.profiles.create.confirm.lore = You are creating a new SkyBlock\nprofile.\n\nProfile name: {profile_name}\n\nYou won't lose any progress.\nYou can switch between profiles.\n\nYou are creating a SOLO profile!\nUse /coop to play with friends!\nClick to confirm new profile! +gui_sbmenu.profiles.create.confirm.lore.1=You are creating a new SkyBlock +gui_sbmenu.profiles.create.confirm.lore.2=profile. +gui_sbmenu.profiles.create.confirm.lore.3= +gui_sbmenu.profiles.create.confirm.lore.4=Profile name: +gui_sbmenu.profiles.create.confirm.lore.5= +gui_sbmenu.profiles.create.confirm.lore.6=You won't lose any progress. +gui_sbmenu.profiles.create.confirm.lore.7=You can switch between profiles. +gui_sbmenu.profiles.create.confirm.lore.8= +gui_sbmenu.profiles.create.confirm.lore.9=You are creating a SOLO profile! +gui_sbmenu.profiles.create.confirm.lore.10=Use /coop to play with friends! +gui_sbmenu.profiles.create.confirm.lore.11=Click to confirm new profile! gui_sbmenu.profiles.create.cancel = Cancel # ============================================================================= @@ -386,31 +646,53 @@ gui_sbmenu.profiles.create.cancel = Cancel # ============================================================================= gui_sbmenu.recipe.book.title = Recipe Book gui_sbmenu.recipe.book.search = Search Recipes -gui_sbmenu.recipe.book.search.lore = /recipe \n\nSearch all recipes in SkyBlock. May\ninclude recipes with aren't in the\nrecipe book.\n\nClick to search! +gui_sbmenu.recipe.book.search.lore.1=/recipe +gui_sbmenu.recipe.book.search.lore.2= +gui_sbmenu.recipe.book.search.lore.3=Search all recipes in SkyBlock. May +gui_sbmenu.recipe.book.search.lore.4=include recipes with aren't in the +gui_sbmenu.recipe.book.search.lore.5=recipe book. +gui_sbmenu.recipe.book.search.lore.6= +gui_sbmenu.recipe.book.search.lore.7=Click to search! gui_sbmenu.recipe.book.info = Recipe Book -gui_sbmenu.recipe.book.info.lore = Through your adventure, you will\nunlock recipes for all kinds of\nspecial items! You can view how to\ncraft these items here.\n \n{mission_display} -gui_sbmenu.recipe.book.category = {category_name} Recipes -gui_sbmenu.recipe.book.category.lore = View all of the {category_name} Recipes\nthat you have unlocked!\n \nRecipes Unlocked: {percent}%\n{progress_bar}\n \nClick to view! -gui_sbmenu.recipe.book.slayer_recipes_unlocked = Slayer Recipes Unlocked: {percent}% +gui_sbmenu.recipe.book.info.lore.1=Through your adventure, you will +gui_sbmenu.recipe.book.info.lore.2=unlock recipes for all kinds of +gui_sbmenu.recipe.book.info.lore.3=special items! You can view how to +gui_sbmenu.recipe.book.info.lore.4=craft these items here. +gui_sbmenu.recipe.book.info.lore.5= +gui_sbmenu.recipe.book.info.lore.6= +gui_sbmenu.recipe.book.category= Recipes +gui_sbmenu.recipe.book.category.lore.1=View all of the Recipes +gui_sbmenu.recipe.book.category.lore.2=that you have unlocked! +gui_sbmenu.recipe.book.category.lore.3= +gui_sbmenu.recipe.book.category.lore.4=Recipes Unlocked: % +gui_sbmenu.recipe.book.category.lore.5= +gui_sbmenu.recipe.book.category.lore.6= +gui_sbmenu.recipe.book.category.lore.7=Click to view! +gui_sbmenu.recipe.book.slayer_recipes_unlocked=Slayer Recipes Unlocked: % # ============================================================================= # Recipe (GUIRecipe) # ============================================================================= -gui_sbmenu.recipe.view.title = {item_name} Recipe +gui_sbmenu.recipe.view.title= Recipe gui_sbmenu.recipe.view.crafting_table = Crafting Table -gui_sbmenu.recipe.view.crafting_table.lore = Craft this recipe by using a\ncrafting table. +gui_sbmenu.recipe.view.crafting_table.lore.1=Craft this recipe by using a +gui_sbmenu.recipe.view.crafting_table.lore.2=crafting table. gui_sbmenu.recipe.view.next = Next Recipe -gui_sbmenu.recipe.view.next.lore = Click to view the next recipe! +gui_sbmenu.recipe.view.next.lore.1=Click to view the next recipe! gui_sbmenu.recipe.view.previous = Previous Recipe -gui_sbmenu.recipe.view.previous.lore = Click to view the previous recipe! +gui_sbmenu.recipe.view.previous.lore.1=Click to view the previous recipe! gui_sbmenu.recipe.view.click_to_view = Click to view recipe! # ============================================================================= # Recipe Category (GUIRecipeCategory) # ============================================================================= -gui_sbmenu.recipe.category.title = ({page}/{max_page}) {category_name} Recipes -gui_sbmenu.recipe.category.info = {category_name} Recipes -gui_sbmenu.recipe.category.info.lore = View all of the {category_name} Recipes\nthat you have unlocked!\n \nRecipes Unlocked: {percent}%\n{progress_bar} +gui_sbmenu.recipe.category.title=(/) Recipes +gui_sbmenu.recipe.category.info= Recipes +gui_sbmenu.recipe.category.info.lore.1=View all of the Recipes +gui_sbmenu.recipe.category.info.lore.2=that you have unlocked! +gui_sbmenu.recipe.category.info.lore.3= +gui_sbmenu.recipe.category.info.lore.4=Recipes Unlocked: % +gui_sbmenu.recipe.category.info.lore.5= gui_sbmenu.recipe.category.click_to_view = Click to view recipe! gui_sbmenu.recipe.category.locked = ??? gui_sbmenu.recipe.category.msg.not_unlocked = You haven't unlocked that recipe! @@ -423,14 +705,15 @@ gui_sbmenu.recipe.slayers.title = Slayer Recipes # ============================================================================= # Minion Recipes (GUIMinionRecipes) # ============================================================================= -gui_sbmenu.recipe.minion.title = {minion_name} Minion Recipes +gui_sbmenu.recipe.minion.title= Minion Recipes # ============================================================================= # Search Recipe (GUISearchRecipe) # ============================================================================= -gui_sbmenu.recipe.search.title = "{query}" Recipes ({page}/{max_page}) +gui_sbmenu.recipe.search.title="" Recipes (/) gui_sbmenu.recipe.search.no_results = No Results -gui_sbmenu.recipe.search.no_results.lore = Could not find any SkyBlock recipes\nmatching the query '{query}'. +gui_sbmenu.recipe.search.no_results.lore.1=Could not find any SkyBlock recipes +gui_sbmenu.recipe.search.no_results.lore.2=matching the query ''. gui_sbmenu.recipe.search.sign_prompt = Enter query # ============================================================================= @@ -438,21 +721,27 @@ gui_sbmenu.recipe.search.sign_prompt = Enter query # ============================================================================= gui_sbmenu.skills.main.title = Your Skills gui_sbmenu.skills.main.info = Your Skills -gui_sbmenu.skills.main.info.lore = View your Skill progression and\nrewards. -gui_sbmenu.skills.main.carpentry_locked.lore = Unlock this skill by talking to the\nCarpenter.\n\nNot unlocked! +gui_sbmenu.skills.main.info.lore.1=View your Skill progression and +gui_sbmenu.skills.main.info.lore.2=rewards. +gui_sbmenu.skills.main.carpentry_locked.lore.1=Unlock this skill by talking to the +gui_sbmenu.skills.main.carpentry_locked.lore.2=Carpenter. +gui_sbmenu.skills.main.carpentry_locked.lore.3= +gui_sbmenu.skills.main.carpentry_locked.lore.4=Not unlocked! gui_sbmenu.skills.main.max_level = Max Level Reached! gui_sbmenu.skills.main.click_to_view = Click to view! # ============================================================================= # Skill Category (GUISkillCategory) # ============================================================================= -gui_sbmenu.skills.category.title = {category_name} Skill +gui_sbmenu.skills.category.title= Skill gui_sbmenu.skills.category.max_level = MAX LEVEL REACHED -gui_sbmenu.skills.category.increase_level = Increase your {category_name} Level to\nunlock Perks, statistic bonuses, and\nmore! +gui_sbmenu.skills.category.increase_level.1=Increase your Level to +gui_sbmenu.skills.category.increase_level.2=unlock Perks, statistic bonuses, and +gui_sbmenu.skills.category.increase_level.3=more! gui_sbmenu.skills.category.next_page = Next Page -gui_sbmenu.skills.category.next_page.lore = Click to view the next page of rewards. +gui_sbmenu.skills.category.next_page.lore.1=Click to view the next page of rewards. gui_sbmenu.skills.category.previous_page = Previous Page -gui_sbmenu.skills.category.previous_page.lore = Click to view the previous page of rewards. +gui_sbmenu.skills.category.previous_page.lore.1=Click to view the previous page of rewards. gui_sbmenu.skills.category.unlocked = UNLOCKED gui_sbmenu.skills.category.bestiary = Bestiary gui_sbmenu.skills.category.bestiary.click = Click to view! @@ -462,33 +751,76 @@ gui_sbmenu.skills.category.bestiary.click = Click to view! # ============================================================================= gui_sbmenu.stats.combat.title = Your Stats Breakdown gui_sbmenu.stats.combat.info = Combat Stats -gui_sbmenu.stats.combat.info.lore = Gives you a better chance at\nfighting strong monsters. \n \n{stats_display} -gui_sbmenu.stats.combat.health.lore = Your Health stat increases your\nmaximum health. -gui_sbmenu.stats.combat.defense.lore = Your Defense stat reduces the\ndamage that you take from enemies.\n \nDamage Reduction: {color}{value}%\nEffective Health: {color}{value}{symbol} -gui_sbmenu.stats.combat.strength.lore = Strength increases the damage you\ndeal.\n \nDamage Multiplier: {color}{value}x -gui_sbmenu.stats.combat.intelligence.lore = Intelligence increases the damage of\nyour magical items and your mana\npool.\n \nMagic Damage: {color}+{value}%\nMana Pool: {color}{value} -gui_sbmenu.stats.combat.crit_chance.lore = Critical Chance is the percent\nchance that you land a Critical Hit\nwhen damaging an enemy. -gui_sbmenu.stats.combat.crit_damage.lore = Critical Damage multiplies the damage \nthat you deal when you land a \nCritical Hit.\n \nDamage Multiplier: {color}{value}x\nCritical Chance: {color}{value}% -gui_sbmenu.stats.combat.attack_speed.lore = Attack Speed decreases the time\nbetween hits on your opponent. +gui_sbmenu.stats.combat.info.lore.1=Gives you a better chance at +gui_sbmenu.stats.combat.info.lore.2=fighting strong monsters. +gui_sbmenu.stats.combat.info.lore.3= +gui_sbmenu.stats.combat.info.lore.4= +gui_sbmenu.stats.combat.health.lore.1=Your Health stat increases your +gui_sbmenu.stats.combat.health.lore.2=maximum health. +gui_sbmenu.stats.combat.defense.lore.1=Your Defense stat reduces the +gui_sbmenu.stats.combat.defense.lore.2=damage that you take from enemies. +gui_sbmenu.stats.combat.defense.lore.3= +gui_sbmenu.stats.combat.defense.lore.4=Damage Reduction: % +gui_sbmenu.stats.combat.defense.lore.5=Effective Health: +gui_sbmenu.stats.combat.strength.lore.1=Strength increases the damage you +gui_sbmenu.stats.combat.strength.lore.2=deal. +gui_sbmenu.stats.combat.strength.lore.3= +gui_sbmenu.stats.combat.strength.lore.4=Damage Multiplier: x +gui_sbmenu.stats.combat.intelligence.lore.1=Intelligence increases the damage of +gui_sbmenu.stats.combat.intelligence.lore.2=your magical items and your mana +gui_sbmenu.stats.combat.intelligence.lore.3=pool. +gui_sbmenu.stats.combat.intelligence.lore.4= +gui_sbmenu.stats.combat.intelligence.lore.5=Magic Damage: +% +gui_sbmenu.stats.combat.intelligence.lore.6=Mana Pool: +gui_sbmenu.stats.combat.crit_chance.lore.1=Critical Chance is the percent +gui_sbmenu.stats.combat.crit_chance.lore.2=chance that you land a Critical Hit +gui_sbmenu.stats.combat.crit_chance.lore.3=when damaging an enemy. +gui_sbmenu.stats.combat.crit_damage.lore.1=Critical Damage multiplies the damage +gui_sbmenu.stats.combat.crit_damage.lore.2=that you deal when you land a +gui_sbmenu.stats.combat.crit_damage.lore.3=Critical Hit. +gui_sbmenu.stats.combat.crit_damage.lore.4= +gui_sbmenu.stats.combat.crit_damage.lore.5=Damage Multiplier: x +gui_sbmenu.stats.combat.crit_damage.lore.6=Critical Chance: % +gui_sbmenu.stats.combat.attack_speed.lore.1=Attack Speed decreases the time +gui_sbmenu.stats.combat.attack_speed.lore.2=between hits on your opponent. gui_sbmenu.stats.combat.attack_speed.normal = You attack at a normal rate. -gui_sbmenu.stats.combat.attack_speed.faster = You now attack {value} faster! -gui_sbmenu.stats.combat.ability_damage.lore = Ability Damage increases the damage\napplied by certain spells and item\nabilities.\n \nDamage Multiplier: {color}{value}x -gui_sbmenu.stats.combat.true_defense.lore = True Defense is defense which\nworks against true damage. -gui_sbmenu.stats.combat.ferocity.lore = Ferocity grants percent chance to\ndouble-strike enemies. Increments of\n100 increases the base number of\nstrikes. -gui_sbmenu.stats.combat.ferocity.extra_strikes = Base extra strikes: {color}{value} -gui_sbmenu.stats.combat.ferocity.chance = Chance for 1 more: {color}{value}% -gui_sbmenu.stats.combat.health_regen.lore = Health Regen increases the amount\nof health that you naturally\nregenerate over time.\n \nBase regen ticks: 1% of Max \u2764 + 1.5\u2764\nRegen interval: Every 2 seconds\nHealth Regen: {value}x\n \nMax Health: {color}{value}{symbol}\nAvg HP/s: {value}\u2764 -gui_sbmenu.stats.combat.vitality.lore = Vitality increases your incoming\nhealing, including health regen. +gui_sbmenu.stats.combat.attack_speed.faster=You now attack faster! +gui_sbmenu.stats.combat.ability_damage.lore.1=Ability Damage increases the damage +gui_sbmenu.stats.combat.ability_damage.lore.2=applied by certain spells and item +gui_sbmenu.stats.combat.ability_damage.lore.3=abilities. +gui_sbmenu.stats.combat.ability_damage.lore.4= +gui_sbmenu.stats.combat.ability_damage.lore.5=Damage Multiplier: x +gui_sbmenu.stats.combat.true_defense.lore.1=True Defense is defense which +gui_sbmenu.stats.combat.true_defense.lore.2=works against true damage. +gui_sbmenu.stats.combat.ferocity.lore.1=Ferocity grants percent chance to +gui_sbmenu.stats.combat.ferocity.lore.2=double-strike enemies. Increments of +gui_sbmenu.stats.combat.ferocity.lore.3=100 increases the base number of +gui_sbmenu.stats.combat.ferocity.lore.4=strikes. +gui_sbmenu.stats.combat.ferocity.extra_strikes=Base extra strikes: +gui_sbmenu.stats.combat.ferocity.chance=Chance for 1 more: % +gui_sbmenu.stats.combat.health_regen.lore.1=Health Regen increases the amount +gui_sbmenu.stats.combat.health_regen.lore.2=of health that you naturally +gui_sbmenu.stats.combat.health_regen.lore.3=regenerate over time. +gui_sbmenu.stats.combat.health_regen.lore.4= +gui_sbmenu.stats.combat.health_regen.lore.5=Base regen ticks: 1% of Max \u2764 + 1.5\u2764 +gui_sbmenu.stats.combat.health_regen.lore.6=Regen interval: Every 2 seconds +gui_sbmenu.stats.combat.health_regen.lore.7=Health Regen: x +gui_sbmenu.stats.combat.health_regen.lore.8= +gui_sbmenu.stats.combat.health_regen.lore.9=Max Health: +gui_sbmenu.stats.combat.health_regen.lore.10=Avg HP/s: \u2764 +gui_sbmenu.stats.combat.vitality.lore.1=Vitality increases your incoming +gui_sbmenu.stats.combat.vitality.lore.2=healing, including health regen. gui_sbmenu.stats.combat.vitality.unmodified = Heals you receive aren't modified. -gui_sbmenu.stats.combat.vitality.modified = All heals applied to you are multiplied by {color}{value}x. -gui_sbmenu.stats.combat.mending.lore = Mending increases your outgoing\nhealing. +gui_sbmenu.stats.combat.vitality.modified=All heals applied to you are multiplied by x. +gui_sbmenu.stats.combat.mending.lore.1=Mending increases your outgoing +gui_sbmenu.stats.combat.mending.lore.2=healing. gui_sbmenu.stats.combat.mending.unmodified = Your heals aren't modified. -gui_sbmenu.stats.combat.mending.modified = All heals applied to you are multiplied by {color}{value}x. +gui_sbmenu.stats.combat.mending.modified=All heals applied to you are multiplied by x. gui_sbmenu.stats.combat.swing_range.lore = Increases your melee hit range. gui_sbmenu.stats.combat.swing_range.unmodified = Your swing range isn't modified. -gui_sbmenu.stats.combat.swing_range.modified = Your swing range is increased to {value} blocks. -gui_sbmenu.stats.combat.stat_flat = Flat: {color}+{value}{symbol} -gui_sbmenu.stats.combat.stat_cap = Stat Cap:{color}{cap}{symbol} {stat_name} +gui_sbmenu.stats.combat.swing_range.modified=Your swing range is increased to blocks. +gui_sbmenu.stats.combat.stat_flat=Flat: + +gui_sbmenu.stats.combat.stat_cap=Stat Cap: gui_sbmenu.stats.combat.no_stat = You have none of this stat! gui_sbmenu.stats.combat.click_to_view = Click to view! gui_sbmenu.stats.combat.msg.under_construction = Under construction! @@ -498,39 +830,221 @@ gui_sbmenu.stats.combat.msg.under_construction = Under construction! # ============================================================================= gui_sbmenu.stats.gathering.title = Your Stats Breakdown gui_sbmenu.stats.gathering.info = Gathering Stats -gui_sbmenu.stats.gathering.info.lore = Lets you collect and harvest better\nitems, or more of them. \n \n{stats_display} -gui_sbmenu.stats.gathering.mining_speed.lore = Increases the speed of breaking\nmining blocks.\n -gui_sbmenu.stats.gathering.mining_spread.lore = Disabled by: Private Island\n \nMining Spread is the chance to\nautomatically mine adjacent blocks\nBlocks, Ores, and\nDwarven Metals.\n -gui_sbmenu.stats.gathering.gemstone_spread.lore = Disabled by: Private Island\n \nGemstone Spread is the chance to\nautomatically mine adjacent blocks\nwhen mining Gemstones.\n -gui_sbmenu.stats.gathering.pristine.lore = Pristine is the chance to increase\nthe quality of a Gemstone when it's\ndropped.\n \nChance: {value}%\n -gui_sbmenu.stats.gathering.mining_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nMining Fortune is the chance to get\nmultiple drops from Blocks, Ores,\nDwarven Metals, and Gemstones.\n -gui_sbmenu.stats.gathering.ore_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nOre Fortune is the chance to get\nmultiple drops from Ores. This\nchance is added on top of your \u2618\nMining Fortune.\n -gui_sbmenu.stats.gathering.block_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nBlock Fortune is the chance to get\nmultiple drops from Blocks. This\nchance is added on top of your \u2618\nMining Fortune.\n -gui_sbmenu.stats.gathering.dwarven_metal_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nDwarven Metal Fortune is the chance\nto get multiple drops from Dwarven\nMetals. This chance is added on top\nof your \u2618 Mining Fortune.\n -gui_sbmenu.stats.gathering.gemstone_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nGemstone Fortune is the chance to\nget multiple drops from Gemstones.\nThis chance is added on top of your\n\u2618 Mining Fortune.\n -gui_sbmenu.stats.gathering.foraging_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nForaging Fortune is the chance to\ngain multiple drops from logs.\n -gui_sbmenu.stats.gathering.farming_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nFarming Fortune is the chance to\ngain multiple drops from crops.\n -gui_sbmenu.stats.gathering.hunter_fortune.lore = Hunting Fortune is the chance to get\nmultiple shards from a Hunt, such as\ncharming a monster, and using\nHunting Tools.\n -gui_sbmenu.stats.gathering.sweep.lore = Disabled by: Not Foraging Island\n(Hub, The Park or Galatea)\n \nSweep is the ability to cut multiple\nlogs at once.\n -gui_sbmenu.stats.gathering.wheat_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nWheat Fortune is the chance to gain\nmultiple drops from Wheat. This\nchance is added on top of your \u2618\nFarming Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.carrot_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nCarrot Fortune is the chance to gain\nmultiple drops from Carrot. This\nchance is added on top of your \u2618\nFarming Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.potato_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nPotato Fortune is the chance to gain\nmultiple drops from Potato. This\nchance is added on top of your \u2618\nFarming Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.pumpkin_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nPumpkin Fortune is the chance to\ngain multiple drops from Pumpkin. This\nchance is added on top of your \u2618\nFarming Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.melon_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nMelon Fortune is the chance to gain\nmultiple drops from Melon. This\nchance is added on top of your \u2618\nFarming Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.mushroom_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nMushroom Fortune is the chance to\ngain multiple drops from Mushroom.\nThis chance is added on top of your\n\u2618 Farming Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.cactus_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nCactus Fortune is the chance to gain\nmultiple drops from Cactus. This\nchance is added on top of your \u2618\nFarming Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.sugar_cane_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nSugar Cane Fortune is the chance to\ngain multiple drops from Sugar Cane.\nThis chance is added on top of your\n\u2618 Farming Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.nether_wart_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nNether Wart Fortune is the chance\nto gain multiple drops from Nether\nWart. This chance is added on top of\nyour \u2618 Farming Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nCocoa Beans Fortune is the chance\nto gain multiple drops from Cocoa\nBeans. This chance is added on top\nof your \u2618 Farming Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.fig_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nFig Fortune is the chance to gain\nmultiple drops from Fig Trees. This\nchance is added on top of your \u2618\nForaging Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.mangrove_fortune.lore = Disabled by: Private Island (Use the\nPublic Islands or The Garden)\n \nMangrove Fortune is the chance to\ngain multiple drops from Mangrove\nTrees. This chance is added on top\nof your \u2618 Foraging Fortune.\n \nTotal Fortune: +{value}\u2618\n -gui_sbmenu.stats.gathering.fortune.flat = Flat: {color}+{value}{symbol} -gui_sbmenu.stats.gathering.fortune.stat_cap = Stat Cap: {color}{cap}{symbol} -gui_sbmenu.stats.gathering.fortune.chance_double = Chance for double {type}: {percent}% -gui_sbmenu.stats.gathering.fortune.chance_triple = Chance for triple {type}: {percent}% -gui_sbmenu.stats.gathering.fortune.chance_quadruple = Chance for quadruple {type}: {percent}% -gui_sbmenu.stats.gathering.fortune.bonus_drops = Bonus drops: {color}+{value}! -gui_sbmenu.stats.gathering.fortune.chance_one_more = Chance for 1 more: {color}{percent}% +gui_sbmenu.stats.gathering.info.lore.1=Lets you collect and harvest better +gui_sbmenu.stats.gathering.info.lore.2=items, or more of them. +gui_sbmenu.stats.gathering.info.lore.3= +gui_sbmenu.stats.gathering.info.lore.4= +gui_sbmenu.stats.gathering.mining_speed.lore.1=Increases the speed of breaking +gui_sbmenu.stats.gathering.mining_speed.lore.2=mining blocks. +gui_sbmenu.stats.gathering.mining_speed.lore.3= +gui_sbmenu.stats.gathering.mining_spread.lore.1=Disabled by: Private Island +gui_sbmenu.stats.gathering.mining_spread.lore.2= +gui_sbmenu.stats.gathering.mining_spread.lore.3=Mining Spread is the chance to +gui_sbmenu.stats.gathering.mining_spread.lore.4=automatically mine adjacent blocks +gui_sbmenu.stats.gathering.mining_spread.lore.5=Blocks, Ores, and +gui_sbmenu.stats.gathering.mining_spread.lore.6=Dwarven Metals. +gui_sbmenu.stats.gathering.mining_spread.lore.7= +gui_sbmenu.stats.gathering.gemstone_spread.lore.1=Disabled by: Private Island +gui_sbmenu.stats.gathering.gemstone_spread.lore.2= +gui_sbmenu.stats.gathering.gemstone_spread.lore.3=Gemstone Spread is the chance to +gui_sbmenu.stats.gathering.gemstone_spread.lore.4=automatically mine adjacent blocks +gui_sbmenu.stats.gathering.gemstone_spread.lore.5=when mining Gemstones. +gui_sbmenu.stats.gathering.gemstone_spread.lore.6= +gui_sbmenu.stats.gathering.pristine.lore.1=Pristine is the chance to increase +gui_sbmenu.stats.gathering.pristine.lore.2=the quality of a Gemstone when it's +gui_sbmenu.stats.gathering.pristine.lore.3=dropped. +gui_sbmenu.stats.gathering.pristine.lore.4= +gui_sbmenu.stats.gathering.pristine.lore.5=Chance: % +gui_sbmenu.stats.gathering.pristine.lore.6= +gui_sbmenu.stats.gathering.mining_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.mining_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.mining_fortune.lore.3= +gui_sbmenu.stats.gathering.mining_fortune.lore.4=Mining Fortune is the chance to get +gui_sbmenu.stats.gathering.mining_fortune.lore.5=multiple drops from Blocks, Ores, +gui_sbmenu.stats.gathering.mining_fortune.lore.6=Dwarven Metals, and Gemstones. +gui_sbmenu.stats.gathering.mining_fortune.lore.7= +gui_sbmenu.stats.gathering.ore_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.ore_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.ore_fortune.lore.3= +gui_sbmenu.stats.gathering.ore_fortune.lore.4=Ore Fortune is the chance to get +gui_sbmenu.stats.gathering.ore_fortune.lore.5=multiple drops from Ores. This +gui_sbmenu.stats.gathering.ore_fortune.lore.6=chance is added on top of your \u2618 +gui_sbmenu.stats.gathering.ore_fortune.lore.7=Mining Fortune. +gui_sbmenu.stats.gathering.ore_fortune.lore.8= +gui_sbmenu.stats.gathering.block_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.block_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.block_fortune.lore.3= +gui_sbmenu.stats.gathering.block_fortune.lore.4=Block Fortune is the chance to get +gui_sbmenu.stats.gathering.block_fortune.lore.5=multiple drops from Blocks. This +gui_sbmenu.stats.gathering.block_fortune.lore.6=chance is added on top of your \u2618 +gui_sbmenu.stats.gathering.block_fortune.lore.7=Mining Fortune. +gui_sbmenu.stats.gathering.block_fortune.lore.8= +gui_sbmenu.stats.gathering.dwarven_metal_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.dwarven_metal_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.dwarven_metal_fortune.lore.3= +gui_sbmenu.stats.gathering.dwarven_metal_fortune.lore.4=Dwarven Metal Fortune is the chance +gui_sbmenu.stats.gathering.dwarven_metal_fortune.lore.5=to get multiple drops from Dwarven +gui_sbmenu.stats.gathering.dwarven_metal_fortune.lore.6=Metals. This chance is added on top +gui_sbmenu.stats.gathering.dwarven_metal_fortune.lore.7=of your \u2618 Mining Fortune. +gui_sbmenu.stats.gathering.dwarven_metal_fortune.lore.8= +gui_sbmenu.stats.gathering.gemstone_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.gemstone_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.gemstone_fortune.lore.3= +gui_sbmenu.stats.gathering.gemstone_fortune.lore.4=Gemstone Fortune is the chance to +gui_sbmenu.stats.gathering.gemstone_fortune.lore.5=get multiple drops from Gemstones. +gui_sbmenu.stats.gathering.gemstone_fortune.lore.6=This chance is added on top of your +gui_sbmenu.stats.gathering.gemstone_fortune.lore.7=\u2618 Mining Fortune. +gui_sbmenu.stats.gathering.gemstone_fortune.lore.8= +gui_sbmenu.stats.gathering.foraging_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.foraging_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.foraging_fortune.lore.3= +gui_sbmenu.stats.gathering.foraging_fortune.lore.4=Foraging Fortune is the chance to +gui_sbmenu.stats.gathering.foraging_fortune.lore.5=gain multiple drops from logs. +gui_sbmenu.stats.gathering.foraging_fortune.lore.6= +gui_sbmenu.stats.gathering.farming_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.farming_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.farming_fortune.lore.3= +gui_sbmenu.stats.gathering.farming_fortune.lore.4=Farming Fortune is the chance to +gui_sbmenu.stats.gathering.farming_fortune.lore.5=gain multiple drops from crops. +gui_sbmenu.stats.gathering.farming_fortune.lore.6= +gui_sbmenu.stats.gathering.hunter_fortune.lore.1=Hunting Fortune is the chance to get +gui_sbmenu.stats.gathering.hunter_fortune.lore.2=multiple shards from a Hunt, such as +gui_sbmenu.stats.gathering.hunter_fortune.lore.3=charming a monster, and using +gui_sbmenu.stats.gathering.hunter_fortune.lore.4=Hunting Tools. +gui_sbmenu.stats.gathering.hunter_fortune.lore.5= +gui_sbmenu.stats.gathering.sweep.lore.1=Disabled by: Not Foraging Island +gui_sbmenu.stats.gathering.sweep.lore.2=(Hub, The Park or Galatea) +gui_sbmenu.stats.gathering.sweep.lore.3= +gui_sbmenu.stats.gathering.sweep.lore.4=Sweep is the ability to cut multiple +gui_sbmenu.stats.gathering.sweep.lore.5=logs at once. +gui_sbmenu.stats.gathering.sweep.lore.6= +gui_sbmenu.stats.gathering.wheat_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.wheat_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.wheat_fortune.lore.3= +gui_sbmenu.stats.gathering.wheat_fortune.lore.4=Wheat Fortune is the chance to gain +gui_sbmenu.stats.gathering.wheat_fortune.lore.5=multiple drops from Wheat. This +gui_sbmenu.stats.gathering.wheat_fortune.lore.6=chance is added on top of your \u2618 +gui_sbmenu.stats.gathering.wheat_fortune.lore.7=Farming Fortune. +gui_sbmenu.stats.gathering.wheat_fortune.lore.8= +gui_sbmenu.stats.gathering.wheat_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.wheat_fortune.lore.10= +gui_sbmenu.stats.gathering.carrot_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.carrot_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.carrot_fortune.lore.3= +gui_sbmenu.stats.gathering.carrot_fortune.lore.4=Carrot Fortune is the chance to gain +gui_sbmenu.stats.gathering.carrot_fortune.lore.5=multiple drops from Carrot. This +gui_sbmenu.stats.gathering.carrot_fortune.lore.6=chance is added on top of your \u2618 +gui_sbmenu.stats.gathering.carrot_fortune.lore.7=Farming Fortune. +gui_sbmenu.stats.gathering.carrot_fortune.lore.8= +gui_sbmenu.stats.gathering.carrot_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.carrot_fortune.lore.10= +gui_sbmenu.stats.gathering.potato_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.potato_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.potato_fortune.lore.3= +gui_sbmenu.stats.gathering.potato_fortune.lore.4=Potato Fortune is the chance to gain +gui_sbmenu.stats.gathering.potato_fortune.lore.5=multiple drops from Potato. This +gui_sbmenu.stats.gathering.potato_fortune.lore.6=chance is added on top of your \u2618 +gui_sbmenu.stats.gathering.potato_fortune.lore.7=Farming Fortune. +gui_sbmenu.stats.gathering.potato_fortune.lore.8= +gui_sbmenu.stats.gathering.potato_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.potato_fortune.lore.10= +gui_sbmenu.stats.gathering.pumpkin_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.pumpkin_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.pumpkin_fortune.lore.3= +gui_sbmenu.stats.gathering.pumpkin_fortune.lore.4=Pumpkin Fortune is the chance to +gui_sbmenu.stats.gathering.pumpkin_fortune.lore.5=gain multiple drops from Pumpkin. This +gui_sbmenu.stats.gathering.pumpkin_fortune.lore.6=chance is added on top of your \u2618 +gui_sbmenu.stats.gathering.pumpkin_fortune.lore.7=Farming Fortune. +gui_sbmenu.stats.gathering.pumpkin_fortune.lore.8= +gui_sbmenu.stats.gathering.pumpkin_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.pumpkin_fortune.lore.10= +gui_sbmenu.stats.gathering.melon_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.melon_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.melon_fortune.lore.3= +gui_sbmenu.stats.gathering.melon_fortune.lore.4=Melon Fortune is the chance to gain +gui_sbmenu.stats.gathering.melon_fortune.lore.5=multiple drops from Melon. This +gui_sbmenu.stats.gathering.melon_fortune.lore.6=chance is added on top of your \u2618 +gui_sbmenu.stats.gathering.melon_fortune.lore.7=Farming Fortune. +gui_sbmenu.stats.gathering.melon_fortune.lore.8= +gui_sbmenu.stats.gathering.melon_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.melon_fortune.lore.10= +gui_sbmenu.stats.gathering.mushroom_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.mushroom_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.mushroom_fortune.lore.3= +gui_sbmenu.stats.gathering.mushroom_fortune.lore.4=Mushroom Fortune is the chance to +gui_sbmenu.stats.gathering.mushroom_fortune.lore.5=gain multiple drops from Mushroom. +gui_sbmenu.stats.gathering.mushroom_fortune.lore.6=This chance is added on top of your +gui_sbmenu.stats.gathering.mushroom_fortune.lore.7=\u2618 Farming Fortune. +gui_sbmenu.stats.gathering.mushroom_fortune.lore.8= +gui_sbmenu.stats.gathering.mushroom_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.mushroom_fortune.lore.10= +gui_sbmenu.stats.gathering.cactus_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.cactus_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.cactus_fortune.lore.3= +gui_sbmenu.stats.gathering.cactus_fortune.lore.4=Cactus Fortune is the chance to gain +gui_sbmenu.stats.gathering.cactus_fortune.lore.5=multiple drops from Cactus. This +gui_sbmenu.stats.gathering.cactus_fortune.lore.6=chance is added on top of your \u2618 +gui_sbmenu.stats.gathering.cactus_fortune.lore.7=Farming Fortune. +gui_sbmenu.stats.gathering.cactus_fortune.lore.8= +gui_sbmenu.stats.gathering.cactus_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.cactus_fortune.lore.10= +gui_sbmenu.stats.gathering.sugar_cane_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.sugar_cane_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.sugar_cane_fortune.lore.3= +gui_sbmenu.stats.gathering.sugar_cane_fortune.lore.4=Sugar Cane Fortune is the chance to +gui_sbmenu.stats.gathering.sugar_cane_fortune.lore.5=gain multiple drops from Sugar Cane. +gui_sbmenu.stats.gathering.sugar_cane_fortune.lore.6=This chance is added on top of your +gui_sbmenu.stats.gathering.sugar_cane_fortune.lore.7=\u2618 Farming Fortune. +gui_sbmenu.stats.gathering.sugar_cane_fortune.lore.8= +gui_sbmenu.stats.gathering.sugar_cane_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.sugar_cane_fortune.lore.10= +gui_sbmenu.stats.gathering.nether_wart_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.nether_wart_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.nether_wart_fortune.lore.3= +gui_sbmenu.stats.gathering.nether_wart_fortune.lore.4=Nether Wart Fortune is the chance +gui_sbmenu.stats.gathering.nether_wart_fortune.lore.5=to gain multiple drops from Nether +gui_sbmenu.stats.gathering.nether_wart_fortune.lore.6=Wart. This chance is added on top of +gui_sbmenu.stats.gathering.nether_wart_fortune.lore.7=your \u2618 Farming Fortune. +gui_sbmenu.stats.gathering.nether_wart_fortune.lore.8= +gui_sbmenu.stats.gathering.nether_wart_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.nether_wart_fortune.lore.10= +gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore.3= +gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore.4=Cocoa Beans Fortune is the chance +gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore.5=to gain multiple drops from Cocoa +gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore.6=Beans. This chance is added on top +gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore.7=of your \u2618 Farming Fortune. +gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore.8= +gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.cocoa_beans_fortune.lore.10= +gui_sbmenu.stats.gathering.fig_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.fig_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.fig_fortune.lore.3= +gui_sbmenu.stats.gathering.fig_fortune.lore.4=Fig Fortune is the chance to gain +gui_sbmenu.stats.gathering.fig_fortune.lore.5=multiple drops from Fig Trees. This +gui_sbmenu.stats.gathering.fig_fortune.lore.6=chance is added on top of your \u2618 +gui_sbmenu.stats.gathering.fig_fortune.lore.7=Foraging Fortune. +gui_sbmenu.stats.gathering.fig_fortune.lore.8= +gui_sbmenu.stats.gathering.fig_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.fig_fortune.lore.10= +gui_sbmenu.stats.gathering.mangrove_fortune.lore.1=Disabled by: Private Island (Use the +gui_sbmenu.stats.gathering.mangrove_fortune.lore.2=Public Islands or The Garden) +gui_sbmenu.stats.gathering.mangrove_fortune.lore.3= +gui_sbmenu.stats.gathering.mangrove_fortune.lore.4=Mangrove Fortune is the chance to +gui_sbmenu.stats.gathering.mangrove_fortune.lore.5=gain multiple drops from Mangrove +gui_sbmenu.stats.gathering.mangrove_fortune.lore.6=Trees. This chance is added on top +gui_sbmenu.stats.gathering.mangrove_fortune.lore.7=of your \u2618 Foraging Fortune. +gui_sbmenu.stats.gathering.mangrove_fortune.lore.8= +gui_sbmenu.stats.gathering.mangrove_fortune.lore.9=Total Fortune: +\u2618 +gui_sbmenu.stats.gathering.mangrove_fortune.lore.10= +gui_sbmenu.stats.gathering.fortune.flat=Flat: + +gui_sbmenu.stats.gathering.fortune.stat_cap=Stat Cap: +gui_sbmenu.stats.gathering.fortune.chance_double=Chance for double : % +gui_sbmenu.stats.gathering.fortune.chance_triple=Chance for triple : % +gui_sbmenu.stats.gathering.fortune.chance_quadruple=Chance for quadruple : % +gui_sbmenu.stats.gathering.fortune.bonus_drops=Bonus drops: +! +gui_sbmenu.stats.gathering.fortune.chance_one_more=Chance for 1 more: % gui_sbmenu.stats.gathering.no_stat = You have none of this stat! gui_sbmenu.stats.gathering.click_to_view = Click to view! gui_sbmenu.stats.gathering.msg.under_construction = Under construction! @@ -540,10 +1054,14 @@ gui_sbmenu.stats.gathering.msg.under_construction = Under construction! # ============================================================================= gui_sbmenu.stats.wisdom.title = Your Stats Breakdown gui_sbmenu.stats.wisdom.info = Wisdom Stats -gui_sbmenu.stats.wisdom.info.lore = Increases the XP you gain on your\nskills \n \n{stats_display} -gui_sbmenu.stats.wisdom.description = {stat_name} increases how much\n{skill_name} Skill XP that you gain. +gui_sbmenu.stats.wisdom.info.lore.1=Increases the XP you gain on your +gui_sbmenu.stats.wisdom.info.lore.2=skills +gui_sbmenu.stats.wisdom.info.lore.3= +gui_sbmenu.stats.wisdom.info.lore.4= +gui_sbmenu.stats.wisdom.description.1= increases how much +gui_sbmenu.stats.wisdom.description.2= Skill XP that you gain. gui_sbmenu.stats.wisdom.not_learning = You aren't learning any faster, yet! -gui_sbmenu.stats.wisdom.xp_multiplier = XP Multiplier: {color}{value}x +gui_sbmenu.stats.wisdom.xp_multiplier=XP Multiplier: x gui_sbmenu.stats.wisdom.no_stat = You have none of this stat! gui_sbmenu.stats.wisdom.click_to_view = Click to view! gui_sbmenu.stats.wisdom.msg.under_construction = Under construction! @@ -553,21 +1071,44 @@ gui_sbmenu.stats.wisdom.msg.under_construction = Under construction! # ============================================================================= gui_sbmenu.stats.misc.title = Your Stats Breakdown gui_sbmenu.stats.misc.info = Misc Stats -gui_sbmenu.stats.misc.info.lore = Augments various aspects of your\ngameplay! \n \n{stats_display} -gui_sbmenu.stats.misc.speed.lore = Your Speed stat increases how fast\nyou can walk. +gui_sbmenu.stats.misc.info.lore.1=Augments various aspects of your +gui_sbmenu.stats.misc.info.lore.2=gameplay! +gui_sbmenu.stats.misc.info.lore.3= +gui_sbmenu.stats.misc.info.lore.4= +gui_sbmenu.stats.misc.speed.lore.1=Your Speed stat increases how fast +gui_sbmenu.stats.misc.speed.lore.2=you can walk. gui_sbmenu.stats.misc.speed.normal = You walk at a regular walking speed. -gui_sbmenu.stats.misc.speed.faster = You are {percent}% faster! -gui_sbmenu.stats.misc.magic_find.lore = Magic Find increases how many rare\nitems you find. -gui_sbmenu.stats.misc.pet_luck.lore = Pet Luck increases how many pets\nyou find and gives you better luck\nwhen crafting pets. -gui_sbmenu.stats.misc.pest_chance.lore = Chance to spawn bonus {color}{symbol} Pests\nwhile on The Garden.\n \nChance for {count} bonus pest: {percent}% -gui_sbmenu.stats.misc.heat_resistance.lore = Heat Resistances increases the\namount of time you can spend in hot\nenvironments. -gui_sbmenu.stats.misc.cold_resistance.lore = Cold Resistance increases the\namount of time you can spend in cold\nenvironments. -gui_sbmenu.stats.misc.fear.lore = Makes Primal Fears spawn more\noften and reduces damage taken\nfrom Primal Fears. -gui_sbmenu.stats.misc.pull.lore = Pull dictates both which fish you're\nable to grab and how long it takes\nusing a fishing net. +gui_sbmenu.stats.misc.speed.faster= You are % faster! +gui_sbmenu.stats.misc.magic_find.lore.1=Magic Find increases how many rare +gui_sbmenu.stats.misc.magic_find.lore.2=items you find. +gui_sbmenu.stats.misc.pet_luck.lore.1=Pet Luck increases how many pets +gui_sbmenu.stats.misc.pet_luck.lore.2=you find and gives you better luck +gui_sbmenu.stats.misc.pet_luck.lore.3=when crafting pets. +gui_sbmenu.stats.misc.pest_chance.lore.1=Chance to spawn bonus Pests +gui_sbmenu.stats.misc.pest_chance.lore.2=while on The Garden. +gui_sbmenu.stats.misc.pest_chance.lore.3= +gui_sbmenu.stats.misc.pest_chance.lore.4=Chance for bonus pest: % +gui_sbmenu.stats.misc.heat_resistance.lore.1=Heat Resistances increases the +gui_sbmenu.stats.misc.heat_resistance.lore.2=amount of time you can spend in hot +gui_sbmenu.stats.misc.heat_resistance.lore.3=environments. +gui_sbmenu.stats.misc.cold_resistance.lore.1=Cold Resistance increases the +gui_sbmenu.stats.misc.cold_resistance.lore.2=amount of time you can spend in cold +gui_sbmenu.stats.misc.cold_resistance.lore.3=environments. +gui_sbmenu.stats.misc.fear.lore.1=Makes Primal Fears spawn more +gui_sbmenu.stats.misc.fear.lore.2=often and reduces damage taken +gui_sbmenu.stats.misc.fear.lore.3=from Primal Fears. +gui_sbmenu.stats.misc.pull.lore.1=Pull dictates both which fish you're +gui_sbmenu.stats.misc.pull.lore.2=able to grab and how long it takes +gui_sbmenu.stats.misc.pull.lore.3=using a fishing net. gui_sbmenu.stats.misc.respiration.lore = Extends underwater breathing time. -gui_sbmenu.stats.misc.pressure_resistance.lore = Pressure Resistance reduces the\neffects of Pressure when diving.\n \nYou will start feeling the effects of\npressure only 0 blocks under water.\nPressure will also build up 0% slower. -gui_sbmenu.stats.misc.stat_flat = Flat: {color}+{value}{symbol} -gui_sbmenu.stats.misc.stat_cap = Stat Cap: {color}{cap}{symbol} {stat_name} +gui_sbmenu.stats.misc.pressure_resistance.lore.1=Pressure Resistance reduces the +gui_sbmenu.stats.misc.pressure_resistance.lore.2=effects of Pressure when diving. +gui_sbmenu.stats.misc.pressure_resistance.lore.3= +gui_sbmenu.stats.misc.pressure_resistance.lore.4=You will start feeling the effects of +gui_sbmenu.stats.misc.pressure_resistance.lore.5=pressure only 0 blocks under water. +gui_sbmenu.stats.misc.pressure_resistance.lore.6=Pressure will also build up 0% slower. +gui_sbmenu.stats.misc.stat_flat=Flat: + +gui_sbmenu.stats.misc.stat_cap=Stat Cap: gui_sbmenu.stats.misc.no_stat = You have none of this stat! gui_sbmenu.stats.misc.click_to_view = Click to view! gui_sbmenu.stats.misc.msg.under_construction = Under construction! @@ -577,30 +1118,44 @@ gui_sbmenu.stats.misc.msg.under_construction = Under construction! # ============================================================================= gui_sbmenu.storage.title = Storage gui_sbmenu.storage.ender_chest = Ender Chest -gui_sbmenu.storage.ender_chest.lore = Store global items you can\naccess anywhere in your ender\nchest. +gui_sbmenu.storage.ender_chest.lore.1=Store global items you can +gui_sbmenu.storage.ender_chest.lore.2=access anywhere in your ender +gui_sbmenu.storage.ender_chest.lore.3=chest. gui_sbmenu.storage.backpacks = Backpacks -gui_sbmenu.storage.backpacks.lore = Place backpack items in these slots\nto use them as additional storage\nthat can be accessed anywhere. +gui_sbmenu.storage.backpacks.lore.1=Place backpack items in these slots +gui_sbmenu.storage.backpacks.lore.2=to use them as additional storage +gui_sbmenu.storage.backpacks.lore.3=that can be accessed anywhere. gui_sbmenu.storage.locked_page = Locked Page -gui_sbmenu.storage.locked_page.lore = Unlock more Ender Chest pages in\nthe community shop! -gui_sbmenu.storage.ender_chest_page = Ender Chest Page {page} -gui_sbmenu.storage.ender_chest_page.lore = \nLeft-click to open!\nRight-click to change icon! -gui_sbmenu.storage.locked_backpack = Locked Backpack Slot {slot} -gui_sbmenu.storage.locked_backpack.lore = Talk to Tia the Fairy to unlock more\nBackpack Slots! -gui_sbmenu.storage.empty_backpack = Empty Backpack Slot {slot} -gui_sbmenu.storage.empty_backpack.lore = \nLeft-click a backpack item on this\nslot to place it! -gui_sbmenu.storage.backpack_slot = Backpack Slot {slot} -gui_sbmenu.storage.backpack_slot.lore = {item_name}\nThis backpack has {slots} slots.\n \nLeft-click to open!\nRight-click to remove! -gui_sbmenu.storage.msg.not_empty = The backpack in slot {slot} is not empty! Please empty it before removing it. -gui_sbmenu.storage.msg.removed = Removed backpack from slot {slot}! -gui_sbmenu.storage.msg.placing = Placing backpack in slot {slot}... +gui_sbmenu.storage.locked_page.lore.1=Unlock more Ender Chest pages in +gui_sbmenu.storage.locked_page.lore.2=the community shop! +gui_sbmenu.storage.ender_chest_page=Ender Chest Page +gui_sbmenu.storage.ender_chest_page.lore.1= +gui_sbmenu.storage.ender_chest_page.lore.2=Left-click to open! +gui_sbmenu.storage.ender_chest_page.lore.3=Right-click to change icon! +gui_sbmenu.storage.locked_backpack=Locked Backpack Slot +gui_sbmenu.storage.locked_backpack.lore.1=Talk to Tia the Fairy to unlock more +gui_sbmenu.storage.locked_backpack.lore.2=Backpack Slots! +gui_sbmenu.storage.empty_backpack=Empty Backpack Slot +gui_sbmenu.storage.empty_backpack.lore.1= +gui_sbmenu.storage.empty_backpack.lore.2=Left-click a backpack item on this +gui_sbmenu.storage.empty_backpack.lore.3=slot to place it! +gui_sbmenu.storage.backpack_slot=Backpack Slot +gui_sbmenu.storage.backpack_slot.lore.1= +gui_sbmenu.storage.backpack_slot.lore.2=This backpack has slots. +gui_sbmenu.storage.backpack_slot.lore.3= +gui_sbmenu.storage.backpack_slot.lore.4=Left-click to open! +gui_sbmenu.storage.backpack_slot.lore.5=Right-click to remove! +gui_sbmenu.storage.msg.not_empty=The backpack in slot is not empty! Please empty it before removing it. +gui_sbmenu.storage.msg.removed=Removed backpack from slot ! +gui_sbmenu.storage.msg.placing=Placing backpack in slot ... gui_sbmenu.storage.msg.success = Success! # ============================================================================= # Storage Page (GUIStoragePage) # ============================================================================= -gui_sbmenu.storage.page.title = Ender Chest ({page}/{max_page}) +gui_sbmenu.storage.page.title=Ender Chest (/) gui_sbmenu.storage.page.go_back = Go Back -gui_sbmenu.storage.page.go_back.lore = To Storage +gui_sbmenu.storage.page.go_back.lore.1=To Storage gui_sbmenu.storage.page.last_page = Last Page >> gui_sbmenu.storage.page.next_page = Next Page >> gui_sbmenu.storage.page.first_page = < First Page @@ -610,7 +1165,7 @@ gui_sbmenu.storage.page.previous_page = < Previous Page # Storage Backpack Page (GUIStorageBackpackPage) # ============================================================================= gui_sbmenu.storage.backpack_page.go_back = Go Back -gui_sbmenu.storage.backpack_page.go_back.lore = To Storage +gui_sbmenu.storage.backpack_page.go_back.lore.1=To Storage gui_sbmenu.storage.backpack_page.last_page = Last Page >> gui_sbmenu.storage.backpack_page.next_page = Next Page >> gui_sbmenu.storage.backpack_page.first_page = < First Page @@ -619,66 +1174,126 @@ gui_sbmenu.storage.backpack_page.previous_page = < Previous Page # ============================================================================= # Storage Icon Selection (GUIStorageIconSelection) # ============================================================================= -gui_sbmenu.storage.icon.title = Choose an Icon ({page}/{max_page}) +gui_sbmenu.storage.icon.title=Choose an Icon (/) gui_sbmenu.storage.icon.reset = Reset -gui_sbmenu.storage.icon.lore = Ender Chest icons replace the glass\npanes in the navigation bar.\n \nClick to select! +gui_sbmenu.storage.icon.lore.1=Ender Chest icons replace the glass +gui_sbmenu.storage.icon.lore.2=panes in the navigation bar. +gui_sbmenu.storage.icon.lore.3= +gui_sbmenu.storage.icon.lore.4=Click to select! # ============================================================================= # SkyBlock Leveling (GUISkyBlockLevels) # ============================================================================= gui_sbmenu.levels.main.title = SkyBlock Leveling gui_sbmenu.levels.main.chat_toggle = SkyBlock Levels in Chat -gui_sbmenu.levels.main.chat_toggle.lore = View other players' SkyBlock Level\nand their selected emblem in their\nchat messages.\n \n{status}\n \nClick to toggle! +gui_sbmenu.levels.main.chat_toggle.lore.1=View other players' SkyBlock Level +gui_sbmenu.levels.main.chat_toggle.lore.2=and their selected emblem in their +gui_sbmenu.levels.main.chat_toggle.lore.3=chat messages. +gui_sbmenu.levels.main.chat_toggle.lore.4= +gui_sbmenu.levels.main.chat_toggle.lore.5= +gui_sbmenu.levels.main.chat_toggle.lore.6= +gui_sbmenu.levels.main.chat_toggle.lore.7=Click to toggle! gui_sbmenu.levels.main.chat_toggle.enabled = ENABLED gui_sbmenu.levels.main.chat_toggle.disabled = DISABLED gui_sbmenu.levels.main.msg.chat_enabled = SkyBlock Levels in Chat is now enabled! gui_sbmenu.levels.main.msg.chat_disabled = SkyBlock Levels in Chat is now disabled! gui_sbmenu.levels.main.level_rewards = Leveling Rewards -gui_sbmenu.levels.main.level_rewards.lore = Unlock rewards for leveling up\nyour SkyBlock Level.\n \n{display}\n \nClick to view rewards! +gui_sbmenu.levels.main.level_rewards.lore.1=Unlock rewards for leveling up +gui_sbmenu.levels.main.level_rewards.lore.2=your SkyBlock Level. +gui_sbmenu.levels.main.level_rewards.lore.3= +gui_sbmenu.levels.main.level_rewards.lore.4= +gui_sbmenu.levels.main.level_rewards.lore.5= +gui_sbmenu.levels.main.level_rewards.lore.6=Click to view rewards! gui_sbmenu.levels.main.ranking = Your SkyBlock Level Ranking -gui_sbmenu.levels.main.ranking.lore = Classic Mode\n \nYour level: {level_display}\nYou have: {xp} XP\n \nYou have completed {percent}% of the total\nSkyBlock XP Tasks. +gui_sbmenu.levels.main.ranking.lore.1=Classic Mode +gui_sbmenu.levels.main.ranking.lore.2= +gui_sbmenu.levels.main.ranking.lore.3=Your level: +gui_sbmenu.levels.main.ranking.lore.4=You have: XP +gui_sbmenu.levels.main.ranking.lore.5= +gui_sbmenu.levels.main.ranking.lore.6=You have completed % of the total +gui_sbmenu.levels.main.ranking.lore.7=SkyBlock XP Tasks. gui_sbmenu.levels.main.guide = SkyBlock Guide -gui_sbmenu.levels.main.guide.lore = Your SkyBlock Guide tracks the\nprogress you have made through\nSkyBlock.\n \nComplete tasks within your current\ngame stage to increase your\nSkyBlock Level and become a Master\nof SkyBlock!\n \nClick to view! +gui_sbmenu.levels.main.guide.lore.1=Your SkyBlock Guide tracks the +gui_sbmenu.levels.main.guide.lore.2=progress you have made through +gui_sbmenu.levels.main.guide.lore.3=SkyBlock. +gui_sbmenu.levels.main.guide.lore.4= +gui_sbmenu.levels.main.guide.lore.5=Complete tasks within your current +gui_sbmenu.levels.main.guide.lore.6=game stage to increase your +gui_sbmenu.levels.main.guide.lore.7=SkyBlock Level and become a Master +gui_sbmenu.levels.main.guide.lore.8=of SkyBlock! +gui_sbmenu.levels.main.guide.lore.9= +gui_sbmenu.levels.main.guide.lore.10=Click to view! gui_sbmenu.levels.main.emblems = Prefix Emblems -gui_sbmenu.levels.main.emblems.lore = Add some spice by having an emblem\nnext to your name in chat and in tab!\n \nEmblems are unlocked through various\nactivities such as leveling up\nor completing achievements!\n \nEmblems also show important data\nassociated with them in chat!\n \nClick to view! +gui_sbmenu.levels.main.emblems.lore.1=Add some spice by having an emblem +gui_sbmenu.levels.main.emblems.lore.2=next to your name in chat and in tab! +gui_sbmenu.levels.main.emblems.lore.3= +gui_sbmenu.levels.main.emblems.lore.4=Emblems are unlocked through various +gui_sbmenu.levels.main.emblems.lore.5=activities such as leveling up +gui_sbmenu.levels.main.emblems.lore.6=or completing achievements! +gui_sbmenu.levels.main.emblems.lore.7= +gui_sbmenu.levels.main.emblems.lore.8=Emblems also show important data +gui_sbmenu.levels.main.emblems.lore.9=associated with them in chat! +gui_sbmenu.levels.main.emblems.lore.10= +gui_sbmenu.levels.main.emblems.lore.11=Click to view! gui_sbmenu.levels.main.your_level = Your Level gui_sbmenu.levels.main.next_level = Next Level gui_sbmenu.levels.main.rewards = Rewards: gui_sbmenu.levels.main.unlocked = UNLOCKED gui_sbmenu.levels.main.click_to_view = Click to view rewards! -gui_sbmenu.levels.main.level = Level {level} +gui_sbmenu.levels.main.level=Level gui_sbmenu.levels.main.milestone = Next Milestone Level -gui_sbmenu.levels.main.xp_left = XP Left to Gain: {xp} XP ({percent}%) +gui_sbmenu.levels.main.xp_left=XP Left to Gain: XP (%) # ============================================================================= # SkyBlock Level (GUISkyBlockLevel) # ============================================================================= -gui_sbmenu.levels.level.title = Level {level} Rewards +gui_sbmenu.levels.level.title=Level Rewards # ============================================================================= # Levels Guide (GUILevelsGuide) # ============================================================================= -gui_sbmenu.levels.guide.title = Guide -> {guide_name} +gui_sbmenu.levels.guide.title=Guide -> gui_sbmenu.levels.guide.info = SkyBlock Guide -gui_sbmenu.levels.guide.info.lore = Your SkyBlock Guide tracks the\nprogress you have made through\nSkyBlock.\n\nComplete tasks within your current\ngame stage to increase your\nSkyBlock Level and become a Master\nof SkyBlock! -gui_sbmenu.levels.guide.tasks = {count} Tasks +gui_sbmenu.levels.guide.info.lore.1=Your SkyBlock Guide tracks the +gui_sbmenu.levels.guide.info.lore.2=progress you have made through +gui_sbmenu.levels.guide.info.lore.3=SkyBlock. +gui_sbmenu.levels.guide.info.lore.4= +gui_sbmenu.levels.guide.info.lore.5=Complete tasks within your current +gui_sbmenu.levels.guide.info.lore.6=game stage to increase your +gui_sbmenu.levels.guide.info.lore.7=SkyBlock Level and become a Master +gui_sbmenu.levels.guide.info.lore.8=of SkyBlock! +gui_sbmenu.levels.guide.tasks= Tasks # ============================================================================= # Level Rewards (GUILevelRewards) # ============================================================================= gui_sbmenu.levels.rewards.title = Leveling Rewards gui_sbmenu.levels.rewards.feature = Feature Rewards -gui_sbmenu.levels.rewards.feature.lore = Specific game features such as the\nBazaar or Community Shop. +gui_sbmenu.levels.rewards.feature.lore.1=Specific game features such as the +gui_sbmenu.levels.rewards.feature.lore.2=Bazaar or Community Shop. gui_sbmenu.levels.rewards.prefix = Prefix Color Rewards -gui_sbmenu.levels.rewards.prefix.lore = New colors for your level prefix\nshown in TAB and in chat! +gui_sbmenu.levels.rewards.prefix.lore.1=New colors for your level prefix +gui_sbmenu.levels.rewards.prefix.lore.2=shown in TAB and in chat! gui_sbmenu.levels.rewards.emblem = Emblem Rewards -gui_sbmenu.levels.rewards.emblem.lore = Emblems to show next to your name\nthat signify special achievements. +gui_sbmenu.levels.rewards.emblem.lore.1=Emblems to show next to your name +gui_sbmenu.levels.rewards.emblem.lore.2=that signify special achievements. gui_sbmenu.levels.rewards.statistic = Statistic Rewards -gui_sbmenu.levels.rewards.statistic.lore = Statistic bonuses that will power you\nup as you level up.\n \nNext Reward:\n+5 Health\nat Level {next_level}\n \nFor every level:\n+5 Health\n \nFor every 5 levels:\n+1 Strength +gui_sbmenu.levels.rewards.statistic.lore.1=Statistic bonuses that will power you +gui_sbmenu.levels.rewards.statistic.lore.2=up as you level up. +gui_sbmenu.levels.rewards.statistic.lore.3= +gui_sbmenu.levels.rewards.statistic.lore.4=Next Reward: +gui_sbmenu.levels.rewards.statistic.lore.5=+5 Health +gui_sbmenu.levels.rewards.statistic.lore.6=at Level +gui_sbmenu.levels.rewards.statistic.lore.7= +gui_sbmenu.levels.rewards.statistic.lore.8=For every level: +gui_sbmenu.levels.rewards.statistic.lore.9=+5 Health +gui_sbmenu.levels.rewards.statistic.lore.10= +gui_sbmenu.levels.rewards.statistic.lore.11=For every 5 levels: +gui_sbmenu.levels.rewards.statistic.lore.12=+1 Strength gui_sbmenu.levels.rewards.next_reward = Next Reward: gui_sbmenu.levels.rewards.no_more = No more rewards! -gui_sbmenu.levels.rewards.at_level = at Level {level} -gui_sbmenu.levels.rewards.unlocked = Rewards Unlocked: {percent}% +gui_sbmenu.levels.rewards.at_level=at Level +gui_sbmenu.levels.rewards.unlocked=Rewards Unlocked: % gui_sbmenu.levels.rewards.click_to_view = Click to view! # ============================================================================= @@ -686,31 +1301,41 @@ gui_sbmenu.levels.rewards.click_to_view = Click to view! # ============================================================================= gui_sbmenu.levels.emblem_rewards.title = Emblem Rewards gui_sbmenu.levels.emblem_rewards.view_emblems = Prefix Emblems -gui_sbmenu.levels.emblem_rewards.view_emblems.lore = Add some spice by having an emblem\nnext to your name in chat and in tab!\n \nEmblems are unlocked through various\nactivities such as leveling up\nor completing achievements!\n \nEmblems also show important data\nassociated with them in chat!\n \nClick to view! +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.1=Add some spice by having an emblem +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.2=next to your name in chat and in tab! +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.3= +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.4=Emblems are unlocked through various +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.5=activities such as leveling up +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.6=or completing achievements! +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.7= +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.8=Emblems also show important data +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.9=associated with them in chat! +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.10= +gui_sbmenu.levels.emblem_rewards.view_emblems.lore.11=Click to view! gui_sbmenu.levels.emblem_rewards.info = Emblem Rewards -gui_sbmenu.levels.emblem_rewards.level = Level {level} -gui_sbmenu.levels.emblem_rewards.preview = Preview: {preview} +gui_sbmenu.levels.emblem_rewards.level=Level +gui_sbmenu.levels.emblem_rewards.preview=Preview: gui_sbmenu.levels.emblem_rewards.unlocked = You have unlocked this reward! -gui_sbmenu.levels.emblem_rewards.levels_left = Levels left to unlock: {levels} +gui_sbmenu.levels.emblem_rewards.levels_left=Levels left to unlock: # ============================================================================= # Level Prefix Rewards (GUILevelPrefixRewards) # ============================================================================= gui_sbmenu.levels.prefix_rewards.title = Prefix Rewards gui_sbmenu.levels.prefix_rewards.info = Prefix Color Rewards -gui_sbmenu.levels.prefix_rewards.level = Level {level} -gui_sbmenu.levels.prefix_rewards.preview = Preview: {preview} +gui_sbmenu.levels.prefix_rewards.level=Level +gui_sbmenu.levels.prefix_rewards.preview=Preview: gui_sbmenu.levels.prefix_rewards.unlocked = You have unlocked this reward! -gui_sbmenu.levels.prefix_rewards.levels_left = Levels left to unlock: {levels} +gui_sbmenu.levels.prefix_rewards.levels_left=Levels left to unlock: # ============================================================================= # Level Feature Rewards (GUILevelFeatureRewards) # ============================================================================= gui_sbmenu.levels.feature_rewards.title = Feature Rewards gui_sbmenu.levels.feature_rewards.info = Feature Rewards -gui_sbmenu.levels.feature_rewards.level = Level {level} +gui_sbmenu.levels.feature_rewards.level=Level gui_sbmenu.levels.feature_rewards.unlocked = You have unlocked this reward! -gui_sbmenu.levels.feature_rewards.levels_left = Levels left to Unlock: {levels} +gui_sbmenu.levels.feature_rewards.levels_left=Levels left to Unlock: # ============================================================================= # Starter - Accessories (GUIStarterAccessories) @@ -726,15 +1351,17 @@ gui_sbmenu.levels.starter.skills.title = Starter -> Skills # Emblems (GUIEmblems) # ============================================================================= gui_sbmenu.levels.emblems.title = Emblems -gui_sbmenu.levels.emblems.category = {category_name} -gui_sbmenu.levels.emblems.unlocked_count = {count} Unlocked +gui_sbmenu.levels.emblems.category= +gui_sbmenu.levels.emblems.unlocked_count= Unlocked gui_sbmenu.levels.emblems.click_to_view = Click to view! # ============================================================================= # Emblem Detail (GUIEmblem) # ============================================================================= -gui_sbmenu.levels.emblem.title = Emblems - {category_name} ({page}/{max_page}) -gui_sbmenu.levels.emblem.unlocked.lore = Preview: {preview}\n \nClick to select! +gui_sbmenu.levels.emblem.title=Emblems - (/) +gui_sbmenu.levels.emblem.unlocked.lore.1=Preview: +gui_sbmenu.levels.emblem.unlocked.lore.2= +gui_sbmenu.levels.emblem.unlocked.lore.3=Click to select! gui_sbmenu.levels.emblem.locked = Locked gui_sbmenu.levels.emblem.msg.not_unlocked = You have not unlocked this emblem yet! -gui_sbmenu.levels.emblem.msg.selected = You have selected the {emblem_name} emblem! +gui_sbmenu.levels.emblem.msg.selected=You have selected the emblem! diff --git a/configuration/i18n/en_US/gui/gui_shop.properties b/configuration/i18n/en_US/gui/gui_shop.properties index 09d972f22..997add3f4 100644 --- a/configuration/i18n/en_US/gui/gui_shop.properties +++ b/configuration/i18n/en_US/gui/gui_shop.properties @@ -1,22 +1,19 @@ -# ============================================================================= -# Shop GUI Translations -# ============================================================================= - # --- TradingOptionsView --- gui_shop.trading_options.title = Shop Trading Options gui_shop.trading_options.cost_label = Cost gui_shop.trading_options.stock_label = Stock -gui_shop.trading_options.stock_remaining = {count} remaining +gui_shop.trading_options.stock_remaining= remaining gui_shop.trading_options.click_to_purchase = Click to purchase! gui_shop.trading_options.max_reached = You have reached the maximum amount of items you can buy! -gui_shop.trading_options.not_enough = You don't have enough {currency}! +gui_shop.trading_options.not_enough=You don't have enough ! # --- ConfirmBuyView --- gui_shop.confirm_buy.title = Confirm gui_shop.confirm_buy.confirm_button = Confirm -gui_shop.confirm_buy.confirm_button.lore = Buying: {item_name}\nCost: {cost} Coins +gui_shop.confirm_buy.confirm_button.lore.1=Buying: +gui_shop.confirm_buy.confirm_button.lore.2=Cost: Coins gui_shop.confirm_buy.cancel_button = Cancel -gui_shop.confirm_buy.bought_message = You bought {item_name} for {cost} Coins! +gui_shop.confirm_buy.bought_message=You bought for Coins! gui_shop.confirm_buy.not_enough_coins = You don't have enough coins! # --- GUIShopAlda --- diff --git a/configuration/i18n/en_US/gui/gui_stash.properties b/configuration/i18n/en_US/gui/gui_stash.properties index 9aba4cdb2..405f17603 100644 --- a/configuration/i18n/en_US/gui/gui_stash.properties +++ b/configuration/i18n/en_US/gui/gui_stash.properties @@ -4,33 +4,45 @@ # --- GUIStashItem --- gui_stash.item.title = Item Stash -gui_stash.item.title_paged = Item Stash ({page}/{max_page}) +gui_stash.item.title_paged=Item Stash (/) gui_stash.item.fill_inventory = Fill Inventory -gui_stash.item.fill_inventory.lore = Pick up as many stashed items\nas can fit in your inventory.\n\nItems in stash: {count}/720\n\nClick to fill inventory! +gui_stash.item.fill_inventory.lore.1=Pick up as many stashed items +gui_stash.item.fill_inventory.lore.2=as can fit in your inventory. +gui_stash.item.fill_inventory.lore.3= +gui_stash.item.fill_inventory.lore.4 = Items in stash: /720 +gui_stash.item.fill_inventory.lore.5= +gui_stash.item.fill_inventory.lore.6 = Click to fill inventory! gui_stash.item.empty_message = Your item stash is already empty! -gui_stash.item.from_stash = From stash: {item_name} +gui_stash.item.from_stash=From stash: gui_stash.item.inventory_full = Couldn't unstash your item stash! Your inventory is full! gui_stash.item.all_picked_up = You picked up all items from your item stash! -gui_stash.item.remaining = You still have {count} items in there! +gui_stash.item.remaining=You still have items in there! # --- GUIStashMaterial --- gui_stash.material.title = Material Stash -gui_stash.material.title_paged = Material Stash ({page}/{max_page}) +gui_stash.material.title_paged=Material Stash (/) gui_stash.material.fill_inventory = Fill Inventory -gui_stash.material.fill_inventory.lore = Pick up as many stashed materials\nas can fit in your inventory.\n\nMaterials stashed: {count}\nMaterial types: {types}\n\nClick to fill inventory! +gui_stash.material.fill_inventory.lore.1=Pick up as many stashed materials +gui_stash.material.fill_inventory.lore.2=as can fit in your inventory. +gui_stash.material.fill_inventory.lore.3= +gui_stash.material.fill_inventory.lore.4 = Materials stashed: +gui_stash.material.fill_inventory.lore.5=Material types: +gui_stash.material.fill_inventory.lore.6= +gui_stash.material.fill_inventory.lore.7 = Click to fill inventory! gui_stash.material.insert_into_sacks = Insert Into Sacks -gui_stash.material.insert_into_sacks.lore = Move materials from your stash\ninto your sacks.\n\nClick to insert! - -gui_stash.material.from_stash = From stash: {item_name} x{amount} +gui_stash.material.insert_into_sacks.lore.1=Move materials from your stash +gui_stash.material.insert_into_sacks.lore.2=into your sacks. +gui_stash.material.insert_into_sacks.lore.3= +gui_stash.material.insert_into_sacks.lore.4 = Click to insert! +gui_stash.material.from_stash=From stash: x gui_stash.material.inventory_full = Couldn't unstash your material stash! Your inventory is full! gui_stash.material.all_picked_up = You picked up all items from your material stash! -gui_stash.material.remaining = You still have {count} materials totalling {types} types of materials in there! +gui_stash.material.remaining=You still have materials totalling types of materials in there! gui_stash.material.transferred_to_sacks = You have successfully transferred your items from this stash to your sacks! gui_stash.material.no_transfer = No items could be transferred to your sacks! - -gui_stash.material.amount_label = Amount: {amount} +gui_stash.material.amount_label=Amount: gui_stash.material.click_to_pickup = Click to pickup! diff --git a/configuration/i18n/en_US/npcs.properties b/configuration/i18n/en_US/npcs.properties deleted file mode 100644 index 71cd2eeef..000000000 --- a/configuration/i18n/en_US/npcs.properties +++ /dev/null @@ -1,107 +0,0 @@ -# Hub NPC hologram strings -# Format: npcs.hub..holograms = line1\nline2\nline3 - -npcs.hub.adventurer.holograms = Adventurer\nCLICK -npcs.hub.alchemist.holograms = Alchemist\nCLICK -npcs.hub.alda.holograms = Alda\nCLICK -npcs.hub.amelia.holograms = Amelia\nCLICK -npcs.hub.angler_angus.holograms = Angler Angus\nCLICK -npcs.hub.anita.holograms = Anita\nCLICK -npcs.hub.arthur.holograms = Arthur\nCLICK -npcs.hub.auction_agent.holograms = Auction Agent\nCLICK -npcs.hub.auction_master.holograms = Auction Master\nCLICK -npcs.hub.baker.holograms = Baker\nCLICK -npcs.hub.banker.holograms = Banker\nCLICK -npcs.hub.bartender.holograms = Bartender\nCLICK -npcs.hub.bazaar_agent.holograms = Auction Agent\nCLICK -npcs.hub.bazaar.holograms = Bazaar\nCLICK -npcs.hub.bea.holograms = Bea\nCLICK -npcs.hub.biblio.holograms = SkyBlock Wiki\nBiblio\nCLICK -npcs.hub.billy_joe.holograms = Billy Joe\nCLICK -npcs.hub.builder.holograms = Builder\nCLICK -npcs.hub.carpenter.holograms = Carpenter\nCLICK -npcs.hub.christopher.holograms = Christopher\nCLICK -npcs.hub.clerk_seraphine.holograms = Clerk Seraphine\nCLICK -npcs.hub.curator.holograms = Curator\nCLICK -npcs.hub.damia.holograms = Damia\nCLICK -npcs.hub.dante_memorial.holograms = -npcs.hub.dusk.holograms = Dusk\nCLICK -npcs.hub.elise.holograms = Elise\nCLICK -npcs.hub.elizabeth.holograms = COMMUNITY SHOP\nElizabeth\nCLICK -npcs.hub.erihann.holograms = Erihann\nCLICK -npcs.hub.fann.holograms = Fann\nCLICK -npcs.hub.farmer_rigby.holograms = Farmer Rigby\nCLICK -npcs.hub.farm_merchant.holograms = Farm Merchant\nCLICK -npcs.hub.fisherman_gerald.holograms = Fisherman Gerald\nCLICK -npcs.hub.fisherwoman_enid.holograms = Fisherwoman Enid\nCLICK -npcs.hub.fishing_merchant.holograms = Fishing Merchant\nCLICK -npcs.hub.gavin.holograms = Gavin\nCLICK -npcs.hub.george.holograms = George\nCLICK -npcs.hub.gladiator.holograms = Gladiator\nCLICK -npcs.hub.grumblefoot.holograms = Grumblefoot\nCLICK -npcs.hub.guy.holograms = Guy\nCLICK -npcs.hub.gwynnie.holograms = Gwynnie\nCLICK -npcs.hub.hub_selector.holograms = Hub Selector\nCLICK -npcs.hub.jacob.holograms = Jacob\nCLICK -npcs.hub.jacobus.holograms = Jacobus\nCLICK -npcs.hub.jax.holograms = Jax\nCLICK -npcs.hub.karis.holograms = Karis\nCLICK -npcs.hub.kat.holograms = Kat\nCLICK -npcs.hub.liz.holograms = Zog\nCLICK -npcs.hub.lonely_philosopher.holograms = Lonely Philosopher\nCLICK -npcs.hub.lucius.holograms = Lucius\nCLICK -npcs.hub.lumber_jack.holograms = Lumber Jack\nCLICK -npcs.hub.lumber_merchant.holograms = Lumber Merchant\nCLICK -npcs.hub.madame_eleanor.holograms = Madame Eleanor Q. Goldsworth III\nCLICK -npcs.hub.maddox_the_slayer.holograms = Maddox the Slayer\nCLICK -npcs.hub.mad_redstone_engineer.holograms = Mad Redstone Engineer\nCLICK -npcs.hub.malik.holograms = Malik\nBLACKSMITH -npcs.hub.marco.holograms = Marco\nCLICK -npcs.hub.maxwell.holograms = Thaumaturgist\nMaxwell\nCLICK -npcs.hub.mining_merchant.holograms = Mining Merchant\nCLICK -npcs.hub.mort.holograms = Mort\nGATE KEEPER -npcs.hub.nicole.holograms = Nicole\nCLICK -npcs.hub.ophelia.holograms = Ophelia\nCLICK -npcs.hub.ozanne.holograms = Ozanne\nCLICK -npcs.hub.pat.holograms = Pat\nCLICK -npcs.hub.richard.holograms = STONKS AUCTION\nRichard\nCLICK -npcs.hub.rosetta.holograms = Starter Gear\nRosetta\nCLICK -npcs.hub.salesman.holograms = Salesman\nCLICK -npcs.hub.scoop.holograms = Scoop\nCLICK -npcs.hub.security_sloth.holograms = STAY SAFE!\nSecurity Sloth\nCLICK -npcs.hub.seymour.holograms = Seymour\nCLICK -npcs.hub.shania.holograms = Shania\nCLICK -npcs.hub.shifty.holograms = Shifty\nCLICK -npcs.hub.sirius.holograms = Sirius\nCLICK -npcs.hub.swofty.holograms = Swofty\nCLICK -npcs.hub.taylor.holograms = Taylor\nCLICK -npcs.hub.the_handler.holograms = The Handler\nCLICK -npcs.hub.tia_the_fairy.holograms = Tia the Fairy\nCLICK -npcs.hub.udium.holograms = Udium\nCLICK -npcs.hub.vincent.holograms = Vincent\nCLICK -npcs.hub.weaponsmith.holograms = Weaponsmith\nCLICK -npcs.hub.wizard.holograms = Wizard\nCLICK -npcs.hub.wool_weaver.holograms = Wool Weaver\nCLICK -npcs.hub.zarina.holograms = Zarina\nCLICK -npcs.hub.zog.holograms = Zog\nCLICK - -# Hub NPC dynamic holograms (contain player-specific data) -npcs.hub.museum_display.holograms = {username}\n{profile_name} - -# Hub Villager NPCs -npcs.hub.villager.apprentice.holograms = Apprentice\nCLICK -npcs.hub.villager.blacksmith.holograms = Blacksmith\nCLICK -npcs.hub.villager.jerry.holograms = Jerry\nCLICK -npcs.hub.villager.librarian.holograms = Librarian\nCLICK -npcs.hub.villager.maths_enjoyer.holograms = Maths Enjoyer\nCLICK -npcs.hub.villager.plumber_joe.holograms = Plumber Joe\nCLICK -npcs.hub.villager.smithmonger.holograms = Smithmonger\nCLICK - -# Hub NPC Dialogue strings -npcs.hub.sirius.dialogue.closed = You shouldn't have of had been able to click me! -npcs.hub.sirius.dialogue.adding_to_auction = Are you here for the Auction? Only the richest players can enter. -npcs.hub.sirius.dialogue.minimum_coins = You need at least {minimum_coins} coins to enter the Dark Auction! -npcs.hub.sirius.dialogue.added_to_auction = You signed up for the Auction!\nYou'll be warped once it starts... -npcs.hub.sirius.signing_up_message = Signing up to the Dark Auction... - -npcs.hub.baker.dialogue.initial_hello = At the end of each year I bake cakes for everyone in town to celebrate the year.\nI made one especially for you, here you go.\nI've recently added a New Year Cake Bag to my inventory. Sadly, it's not free! Click me again to open my shop! diff --git a/configuration/i18n/en_US/npcs/npcs_abiphone.properties b/configuration/i18n/en_US/npcs/npcs_abiphone.properties index 9d371f5a0..bcc41e553 100644 --- a/configuration/i18n/en_US/npcs/npcs_abiphone.properties +++ b/configuration/i18n/en_US/npcs/npcs_abiphone.properties @@ -1,14 +1,28 @@ -# Abiphone NPC Dialogues - # Rusty (Abiphone) -npcs_abiphone.rusty.dialogue.abiphone = Did I find an Abiphone?|Yes, sometimes I do find one lying around.|What?|You?|You want my contact?|Me?|The janitor?|I...|I don't... don't know what to say...|Yes of course you can have it! +npcs_abiphone.rusty.dialogue.abiphone.1=Did I find an Abiphone? +npcs_abiphone.rusty.dialogue.abiphone.2=Yes, sometimes I do find one lying around. +npcs_abiphone.rusty.dialogue.abiphone.3=What? +npcs_abiphone.rusty.dialogue.abiphone.4=You? +npcs_abiphone.rusty.dialogue.abiphone.5=You want my contact? +npcs_abiphone.rusty.dialogue.abiphone.6=Me? +npcs_abiphone.rusty.dialogue.abiphone.7=The janitor? +npcs_abiphone.rusty.dialogue.abiphone.8=I... +npcs_abiphone.rusty.dialogue.abiphone.9=I don't... don't know what to say... +npcs_abiphone.rusty.dialogue.abiphone.10=Yes of course you can have it! # Walter (Abiphone) -npcs_abiphone.walter.dialogue.abiphone = My abiphone is for Platinum-level donors of the Walter cause only.|You know these superbooms don't craft themselves right?|You just need Sulphur Collection 7 and to then donate an Enchanted Sulphur Cube! -npcs_abiphone.walter.dialogue.donate_cube = Welcome to the Platinum club, high roller!|Call me anytime!|And before you ask... yes, I do try to commercialize all of my friendships. -npcs_abiphone.walter.dialogue.donate_cube_no_requirements = Mmh... you're missing something to become a Platinum-level donor... +npcs_abiphone.walter.dialogue.abiphone.1=My abiphone is for Platinum-level donors of the Walter cause only. +npcs_abiphone.walter.dialogue.abiphone.2=You know these superbooms don't craft themselves right? +npcs_abiphone.walter.dialogue.abiphone.3=You just need Sulphur Collection 7 and to then donate an Enchanted Sulphur Cube! +npcs_abiphone.walter.dialogue.donate_cube.1=Welcome to the Platinum club, high roller! +npcs_abiphone.walter.dialogue.donate_cube.2=Call me anytime! +npcs_abiphone.walter.dialogue.donate_cube.3=And before you ask... yes, I do try to commercialize all of my friendships. +npcs_abiphone.walter.dialogue.donate_cube_no_requirements.1=Mmh... you're missing something to become a Platinum-level donor... # Builder (Abiphone) -npcs_abiphone.builder.dialogue.abiphone = Oh?|Yes... I could give you my contact... However, may I ask a favor in return?|For a builder to not have a Builder's Wand is quite uncommon.| If you give me one I'll gladly give you my contact! -npcs_abiphone.builder.dialogue.donate = A Builder's Wand! This is a dream come true! -npcs_abiphone.builder.dialogue.donate_no_requirements = You don't have what I need! Nice try! +npcs_abiphone.builder.dialogue.abiphone.1=Oh? +npcs_abiphone.builder.dialogue.abiphone.2=Yes... I could give you my contact... However, may I ask a favor in return? +npcs_abiphone.builder.dialogue.abiphone.3=For a builder to not have a Builder's Wand is quite uncommon. +npcs_abiphone.builder.dialogue.abiphone.4=If you give me one I'll gladly give you my contact! +npcs_abiphone.builder.dialogue.donate.1=A Builder's Wand! This is a dream come true! +npcs_abiphone.builder.dialogue.donate_no_requirements.1=You don't have what I need! Nice try! diff --git a/configuration/i18n/en_US/npcs/npcs_deepcaverns.properties b/configuration/i18n/en_US/npcs/npcs_deepcaverns.properties index f8238aefb..dcccda699 100644 --- a/configuration/i18n/en_US/npcs/npcs_deepcaverns.properties +++ b/configuration/i18n/en_US/npcs/npcs_deepcaverns.properties @@ -1,7 +1,9 @@ -# Deep Caverns NPC Dialogues - # Lift Operator -npcs_deepcaverns.lift_operator.dialogue.hello = Hey Feller!|I control this lift here behind me.|Once you've explored an area I can give you a safe ride back there.|Be careful not to fall down the shaft though, it's a long fall!|Good luck on your adventures. +npcs_deepcaverns.lift_operator.dialogue.hello.1=Hey Feller! +npcs_deepcaverns.lift_operator.dialogue.hello.2=I control this lift here behind me. +npcs_deepcaverns.lift_operator.dialogue.hello.3=Once you've explored an area I can give you a safe ride back there. +npcs_deepcaverns.lift_operator.dialogue.hello.4=Be careful not to fall down the shaft though, it's a long fall! +npcs_deepcaverns.lift_operator.dialogue.hello.5=Good luck on your adventures. # Walter -npcs_deepcaverns.walter.dialogue.none = With the right tools, you can get through anything! +npcs_deepcaverns.walter.dialogue.none.1=With the right tools, you can get through anything! diff --git a/configuration/i18n/en_US/npcs/npcs_dwarvenmines.properties b/configuration/i18n/en_US/npcs/npcs_dwarvenmines.properties index 214fff0b3..4d34548e7 100644 --- a/configuration/i18n/en_US/npcs/npcs_dwarvenmines.properties +++ b/configuration/i18n/en_US/npcs/npcs_dwarvenmines.properties @@ -1,10 +1,16 @@ -# Dwarven Mines NPC Dialogues - # Geo -npcs_dwarvenmines.geo.dialogue.initial_hello = Gemstones have magical properties and can be applied to some special items.|There are 12 different Gemstones, all of them having their own unique properties!|For example, adding Ruby to armor will increase its ❤ Health, while Jasper increases ❁ Strength.|The more pure the Gemstone - the stronger the effect!|Only some items can have Gemstones applied, and you can remove them any time.|Use the Gemstone Grinder next to me to apply Gemstones to items! -npcs_dwarvenmines.geo.dialogue.idle_1 = The more pure the Gemstone - the stronger the effect!|There are several qualities of Gemstone, including Rough, Flawed, and Fine.|The highest quality of Gemstone - Perfect - will increase your stats the most! -npcs_dwarvenmines.geo.dialogue.idle_2 = Not all items can have Gemstones applied to them.|Check out the Gemstone Grinder menu to check which items work with it! -npcs_dwarvenmines.geo.dialogue.idle_3 = Use the Gemstone Grinder next to me to apply Gemstones to items! +npcs_dwarvenmines.geo.dialogue.initial_hello.1=Gemstones have magical properties and can be applied to some special items. +npcs_dwarvenmines.geo.dialogue.initial_hello.2=There are 12 different Gemstones, all of them having their own unique properties! +npcs_dwarvenmines.geo.dialogue.initial_hello.3=For example, adding Ruby to armor will increase its ❤ Health, while Jasper increases ❁ Strength. +npcs_dwarvenmines.geo.dialogue.initial_hello.4=The more pure the Gemstone - the stronger the effect! +npcs_dwarvenmines.geo.dialogue.initial_hello.5=Only some items can have Gemstones applied, and you can remove them any time. +npcs_dwarvenmines.geo.dialogue.initial_hello.6=Use the Gemstone Grinder next to me to apply Gemstones to items! +npcs_dwarvenmines.geo.dialogue.idle_1.1=The more pure the Gemstone - the stronger the effect! +npcs_dwarvenmines.geo.dialogue.idle_1.2=There are several qualities of Gemstone, including Rough, Flawed, and Fine. +npcs_dwarvenmines.geo.dialogue.idle_1.3=The highest quality of Gemstone - Perfect - will increase your stats the most! +npcs_dwarvenmines.geo.dialogue.idle_2.1=Not all items can have Gemstones applied to them. +npcs_dwarvenmines.geo.dialogue.idle_2.2=Check out the Gemstone Grinder menu to check which items work with it! +npcs_dwarvenmines.geo.dialogue.idle_3.1=Use the Gemstone Grinder next to me to apply Gemstones to items! # Abstract Royal Guard (shared dialogue for NPCRoyalGuardOne & NPCRoyalGuardTwo) npcs_dwarvenmines.royal_guard.dialogue.1 = There are no miners like the dwarves. @@ -14,33 +20,44 @@ npcs_dwarvenmines.royal_guard.dialogue.4 = Behold a fellow holder of Hear npcs_dwarvenmines.royal_guard.dialogue.5 = Watch yourself, traveller. There are creatures about. # Castle Guard One -npcs_dwarvenmines.castle_guard_one.dialogue.idle = Last week they promoted me from guarding the exit to guarding the entrance! Still the same spot but I gladly take that promotion! +npcs_dwarvenmines.castle_guard_one.dialogue.idle.1=Last week they promoted me from guarding the exit to guarding the entrance! Still the same spot but I gladly take that promotion! # Castle Guard Two -npcs_dwarvenmines.castle_guard_two.dialogue.idle = This guy isn't the sharpest hammer in the smithy! +npcs_dwarvenmines.castle_guard_two.dialogue.idle.1=This guy isn't the sharpest hammer in the smithy! # Castle Guard Three -npcs_dwarvenmines.castle_guard_three.dialogue.idle = I'm guarding the whole kingdom. +npcs_dwarvenmines.castle_guard_three.dialogue.idle.1=I'm guarding the whole kingdom. # Castle Guard Four -npcs_dwarvenmines.castle_guard_four.dialogue.idle = I'm guarding the whole kingdom. +npcs_dwarvenmines.castle_guard_four.dialogue.idle.1=I'm guarding the whole kingdom. # Castle Guard Five -npcs_dwarvenmines.castle_guard_five.dialogue.idle = I'm a guard. +npcs_dwarvenmines.castle_guard_five.dialogue.idle.1=I'm a guard. # Castle Guard Six -npcs_dwarvenmines.castle_guard_six.dialogue.idle = I, Murdohr, son of Murdohr the Third, Commander of the Phoenix Forge, and Warden of the Holy Pickaxe, am guarding this wall. +npcs_dwarvenmines.castle_guard_six.dialogue.idle.1=I, Murdohr, son of Murdohr the Third, Commander of the Phoenix Forge, and Warden of the Holy Pickaxe, am guarding this wall. # Castle Guard Seven -npcs_dwarvenmines.castle_guard_seven.dialogue.idle = I am guarding the lava. +npcs_dwarvenmines.castle_guard_seven.dialogue.idle.1=I am guarding the lava. # Castle Guard Eight -npcs_dwarvenmines.castle_guard_eight.dialogue.idle = I am guarding nothing. +npcs_dwarvenmines.castle_guard_eight.dialogue.idle.1=I am guarding nothing. # Emissary Braum -npcs_dwarvenmines.emissary_braum.dialogue.first_interaction = I am the King's favorite Emissary, which is why I'm the furthest away from him!|Commissions inside the Crystal Hollows are different from the ones in the Dwarven Mines.|Click me again to receive your first set of Crystal Hollows commissions.|Once you complete them, come back to me! +npcs_dwarvenmines.emissary_braum.dialogue.first_interaction.1=I am the King's favorite Emissary, which is why I'm the furthest away from him! +npcs_dwarvenmines.emissary_braum.dialogue.first_interaction.2=Commissions inside the Crystal Hollows are different from the ones in the Dwarven Mines. +npcs_dwarvenmines.emissary_braum.dialogue.first_interaction.3=Click me again to receive your first set of Crystal Hollows commissions. +npcs_dwarvenmines.emissary_braum.dialogue.first_interaction.4=Once you complete them, come back to me! # Silnar -npcs_dwarvenmines.silnar.dialogue.idle = See that giant cliff with the giant crystal?|At night, my friends host a secret meeting in a nearby secret cave.|Drop by some time, our secret club is open!|If my friends approve of you, they'll give you a special item.|Come back to me then and show it to me! -npcs_dwarvenmines.silnar.dialogue.wearing_fallen_star_helmet = Hurrah! A fellow member of the Cult of the Fallen Star!|Hey, I've crafted new tech to let us locate Fallen Stars easily.|Check it out! -npcs_dwarvenmines.silnar.dialogue.after_claiming_fallen_star_lozenge = With the Fallen Star Lozenge, you can find Fallen Stars much easier!|Now go find some stars, but don't forget about the next meeting of the Cult!|I expect to see you there! +npcs_dwarvenmines.silnar.dialogue.idle.1=See that giant cliff with the giant crystal? +npcs_dwarvenmines.silnar.dialogue.idle.2=At night, my friends host a secret meeting in a nearby secret cave. +npcs_dwarvenmines.silnar.dialogue.idle.3=Drop by some time, our secret club is open! +npcs_dwarvenmines.silnar.dialogue.idle.4=If my friends approve of you, they'll give you a special item. +npcs_dwarvenmines.silnar.dialogue.idle.5=Come back to me then and show it to me! +npcs_dwarvenmines.silnar.dialogue.wearing_fallen_star_helmet.1=Hurrah! A fellow member of the Cult of the Fallen Star! +npcs_dwarvenmines.silnar.dialogue.wearing_fallen_star_helmet.2=Hey, I've crafted new tech to let us locate Fallen Stars easily. +npcs_dwarvenmines.silnar.dialogue.wearing_fallen_star_helmet.3=Check it out! +npcs_dwarvenmines.silnar.dialogue.after_claiming_fallen_star_lozenge.1=With the Fallen Star Lozenge, you can find Fallen Stars much easier! +npcs_dwarvenmines.silnar.dialogue.after_claiming_fallen_star_lozenge.2=Now go find some stars, but don't forget about the next meeting of the Cult! +npcs_dwarvenmines.silnar.dialogue.after_claiming_fallen_star_lozenge.3=I expect to see you there! diff --git a/configuration/i18n/en_US/npcs/npcs_goldmine.properties b/configuration/i18n/en_US/npcs/npcs_goldmine.properties index b4e7b5649..7163b9ea5 100644 --- a/configuration/i18n/en_US/npcs/npcs_goldmine.properties +++ b/configuration/i18n/en_US/npcs/npcs_goldmine.properties @@ -1,20 +1,40 @@ -# Gold Mine NPC Dialogues - # Lazy Miner -npcs_goldmine.lazy_miner.dialogue.first_interaction = Whoops! I lost my good pickaxe again in the mines! That's why I always come prepared with a backup!|It's probably down in the mine somewhere. Can you go find it? -npcs_goldmine.lazy_miner.dialogue.no_pickaxe_found = Find my pickaxe in the Gold Mines! I'm not going back down there... -npcs_goldmine.lazy_miner.dialogue.found_pick_intro = Oh! You already found my pickaxe! That's amazing!|Keep it, it has a special enchantment. Come talk to me when you're ready! -npcs_goldmine.lazy_miner.dialogue.quest_complete = You found it! Thank you so much!|Keep it as a reward. That pickaxe has Smelting Touch - it automatically smelts ores into ingots!|It'll be very useful for collecting iron and gold. -npcs_goldmine.lazy_miner.dialogue.not_reached_deep_caverns = The Deep Caverns are full of strange creatures and expensive treasures.|Reach Mining Level V to gain access!|Have you spelunked the Deep Caverns?|They are full of bountiful treasures, but watch out for those Lapis Zombies! -npcs_goldmine.lazy_miner.dialogue.idle = {month_name} {day} is my resting day!|I'd go mining but I'm too lazy.|Maybe some day I'll go back down there. +npcs_goldmine.lazy_miner.dialogue.first_interaction.1=Whoops! I lost my good pickaxe again in the mines! That's why I always come prepared with a backup! +npcs_goldmine.lazy_miner.dialogue.first_interaction.2=It's probably down in the mine somewhere. Can you go find it? +npcs_goldmine.lazy_miner.dialogue.no_pickaxe_found.1=Find my pickaxe in the Gold Mines! I'm not going back down there... +npcs_goldmine.lazy_miner.dialogue.found_pick_intro.1=Oh! You already found my pickaxe! That's amazing! +npcs_goldmine.lazy_miner.dialogue.found_pick_intro.2=Keep it, it has a special enchantment. Come talk to me when you're ready! +npcs_goldmine.lazy_miner.dialogue.quest_complete.1=You found it! Thank you so much! +npcs_goldmine.lazy_miner.dialogue.quest_complete.2=Keep it as a reward. That pickaxe has Smelting Touch - it automatically smelts ores into ingots! +npcs_goldmine.lazy_miner.dialogue.quest_complete.3=It'll be very useful for collecting iron and gold. +npcs_goldmine.lazy_miner.dialogue.not_reached_deep_caverns.1=The Deep Caverns are full of strange creatures and expensive treasures. +npcs_goldmine.lazy_miner.dialogue.not_reached_deep_caverns.2=Reach Mining Level V to gain access! +npcs_goldmine.lazy_miner.dialogue.not_reached_deep_caverns.3=Have you spelunked the Deep Caverns? +npcs_goldmine.lazy_miner.dialogue.not_reached_deep_caverns.4=They are full of bountiful treasures, but watch out for those Lapis Zombies! +npcs_goldmine.lazy_miner.dialogue.idle.1={month_name} {day} is my resting day! +npcs_goldmine.lazy_miner.dialogue.idle.2=I'd go mining but I'm too lazy. +npcs_goldmine.lazy_miner.dialogue.idle.3=Maybe some day I'll go back down there. # Gold Forger -npcs_goldmine.gold_forger.dialogue.hello = I love goooold!|Click me again to open the Gold Forger Shop! +npcs_goldmine.gold_forger.dialogue.hello.1=I love goooold! +npcs_goldmine.gold_forger.dialogue.hello.2=Click me again to open the Gold Forger Shop! # Iron Forger -npcs_goldmine.iron_forger.dialogue.hello = For my wares, you'll have to pay the iron price!|Seriously though, I accept Coins.|Click me again to open the Iron Forger Shop! +npcs_goldmine.iron_forger.dialogue.hello.1=For my wares, you'll have to pay the iron price! +npcs_goldmine.iron_forger.dialogue.hello.2=Seriously though, I accept Coins. +npcs_goldmine.iron_forger.dialogue.hello.3=Click me again to open the Iron Forger Shop! # Rusty -npcs_goldmine.rusty.dialogue.found_pickaxe = You found the Lazy Miner's pickaxe!|I'll have to put it in my stores.|Click me again! -npcs_goldmine.rusty.dialogue.first_interaction_over_sb_6 = Hi, I'm the janitor of this mine.|You would not believe how many people leave ingots and stones behind them!|It drives me insane, but at least you unlocked Auto-pickup.|It makes my job a lot easier, but despite that, I still find so many items on the ground.|Maybe some of those items are yours? In which case I'll let you buy them back. -npcs_goldmine.rusty.dialogue.first_interaction_below_sb_6 = Hi, I'm the janitor of this mine.|You would not believe how many people leave ingots and stones behind them!|It drives me insane, but at least you'll unlock Auto-pickup at SkyBlock Level 6.|It makes my job a lot easier, but despite that, I still find so many items on the ground.|Maybe some of those items are yours? In which case I'll let you buy them back. +npcs_goldmine.rusty.dialogue.found_pickaxe.1=You found the Lazy Miner's pickaxe! +npcs_goldmine.rusty.dialogue.found_pickaxe.2=I'll have to put it in my stores. +npcs_goldmine.rusty.dialogue.found_pickaxe.3=Click me again! +npcs_goldmine.rusty.dialogue.first_interaction_over_sb_6.1=Hi, I'm the janitor of this mine. +npcs_goldmine.rusty.dialogue.first_interaction_over_sb_6.2=You would not believe how many people leave ingots and stones behind them! +npcs_goldmine.rusty.dialogue.first_interaction_over_sb_6.3=It drives me insane, but at least you unlocked Auto-pickup. +npcs_goldmine.rusty.dialogue.first_interaction_over_sb_6.4=It makes my job a lot easier, but despite that, I still find so many items on the ground. +npcs_goldmine.rusty.dialogue.first_interaction_over_sb_6.5=Maybe some of those items are yours? In which case I'll let you buy them back. +npcs_goldmine.rusty.dialogue.first_interaction_below_sb_6.1=Hi, I'm the janitor of this mine. +npcs_goldmine.rusty.dialogue.first_interaction_below_sb_6.2=You would not believe how many people leave ingots and stones behind them! +npcs_goldmine.rusty.dialogue.first_interaction_below_sb_6.3=It drives me insane, but at least you'll unlock Auto-pickup at SkyBlock Level 6. +npcs_goldmine.rusty.dialogue.first_interaction_below_sb_6.4=It makes my job a lot easier, but despite that, I still find so many items on the ground. +npcs_goldmine.rusty.dialogue.first_interaction_below_sb_6.5=Maybe some of those items are yours? In which case I'll let you buy them back. diff --git a/configuration/i18n/en_US/npcs/npcs_hub.properties b/configuration/i18n/en_US/npcs/npcs_hub.properties index 354ee65b2..4411f27b3 100644 --- a/configuration/i18n/en_US/npcs/npcs_hub.properties +++ b/configuration/i18n/en_US/npcs/npcs_hub.properties @@ -1,82 +1,115 @@ -# ============================================================================ -# Hub NPC Dialogues -# Format: npcs_hub..dialogue. = line1|line2|line3 -# Lines are separated by | (pipe) and sent as individual messages with delay. -# Uses MiniMessage format for styling. {player} = player name placeholder. -# ============================================================================ - # --- Billy Joe --- -npcs_hub.billy_joe.dialogue.hello = You can hold as many Accessories as you want in your inventory. They will always work.|If you have more then one of the same type of the Accessory in your inventory, only one will work. +npcs_hub.billy_joe.dialogue.hello.1=You can hold as many Accessories as you want in your inventory. They will always work. +npcs_hub.billy_joe.dialogue.hello.2=If you have more then one of the same type of the Accessory in your inventory, only one will work. # --- Sirius --- -npcs_hub.sirius.dialogue.closed = You shouldn't have of had been able to click me! -npcs_hub.sirius.dialogue.adding_to_auction = Are you here for the Auction? Only the richest players can enter. -npcs_hub.sirius.dialogue.minimum_coins = You need at least 400,000 coins to enter the Dark Auction! -npcs_hub.sirius.dialogue.added_to_auction = You signed up for the Auction!|You'll be warped once it starts... +npcs_hub.sirius.dialogue.closed.1=You shouldn't have of had been able to click me! +npcs_hub.sirius.dialogue.adding_to_auction.1=Are you here for the Auction? Only the richest players can enter. +npcs_hub.sirius.dialogue.minimum_coins.1=You need at least 400,000 coins to enter the Dark Auction! +npcs_hub.sirius.dialogue.added_to_auction.1=You signed up for the Auction! +npcs_hub.sirius.dialogue.added_to_auction.2=You'll be warped once it starts... # --- Salesman --- -npcs_hub.salesman.dialogue.hello = Thank you for supporting the server and allowing us maintain SkyBlock!|If you want to support us, head over to the Hypixel Store store.hypixel.net +npcs_hub.salesman.dialogue.hello.1=Thank you for supporting the server and allowing us maintain SkyBlock! +npcs_hub.salesman.dialogue.hello.2=If you want to support us, head over to the Hypixel Store store.hypixel.net # --- Baker --- -npcs_hub.baker.dialogue.initial_hello = At the end of each year I bake cakes for everyone in town to celebrate the year.|I made one especially for you, here you go.|I've recently added a New Year Cake Bag to my inventory. Sadly, it's not free! Click me again to open my shop! +npcs_hub.baker.dialogue.initial_hello.1=At the end of each year I bake cakes for everyone in town to celebrate the year. +npcs_hub.baker.dialogue.initial_hello.2=I made one especially for you, here you go. +npcs_hub.baker.dialogue.initial_hello.3=I've recently added a New Year Cake Bag to my inventory. Sadly, it's not free! Click me again to open my shop! # --- Adventurer --- -npcs_hub.adventurer.dialogue.hello = I've seen it all - every island from here to the edge of the world!|Over the years I've acquired a variety of Talismans and Artifact.|For a price, you can have it all!|Click me again to open the Adventurer Shop! +npcs_hub.adventurer.dialogue.hello.1=I've seen it all - every island from here to the edge of the world! +npcs_hub.adventurer.dialogue.hello.2=Over the years I've acquired a variety of Talismans and Artifact. +npcs_hub.adventurer.dialogue.hello.3=For a price, you can have it all! +npcs_hub.adventurer.dialogue.hello.4=Click me again to open the Adventurer Shop! # --- Alchemist --- -npcs_hub.alchemist.dialogue.hello = There is a darkness in you, {player}.|I've seen it in my flames, you are destined for great things.|For now, you shouldn't let it get to your head. +npcs_hub.alchemist.dialogue.hello.1=There is a darkness in you, . +npcs_hub.alchemist.dialogue.hello.2=I've seen it in my flames, you are destined for great things. +npcs_hub.alchemist.dialogue.hello.3=For now, you shouldn't let it get to your head. # --- Arthur --- -npcs_hub.arthur.dialogue.dialogue_1 = Fuel makes your Minion work harder for a limited time|There are multiple types of Fuel, like Coal, Enchanted Bread and many more! -npcs_hub.arthur.dialogue.dialogue_2 = If you place your Minions poorly, they will complain!|Open their Menu and look for their Perfect Layout! -npcs_hub.arthur.dialogue.dialogue_3 = Once you unlock a Minion, you also unlock all their Level up recipes! -npcs_hub.arthur.dialogue.dialogue_4 = Use a Budget Hopper to make your Minions automatically sell their work once full! -npcs_hub.arthur.dialogue.dialogue_5 = My favorite Minion Upgrade is the Compactor, sooooo useful!|I have one in my Minion, look! -npcs_hub.arthur.dialogue.dialogue_6 = People always empty the storage of my Minion when I'm not looking! -npcs_hub.arthur.dialogue.dialogue_7 = Minions always have 4 Upgrade Slots where you can place Fuel or else +npcs_hub.arthur.dialogue.dialogue_1.1=Fuel makes your Minion work harder for a limited time +npcs_hub.arthur.dialogue.dialogue_1.2=There are multiple types of Fuel, like Coal, Enchanted Bread and many more! +npcs_hub.arthur.dialogue.dialogue_2.1=If you place your Minions poorly, they will complain! +npcs_hub.arthur.dialogue.dialogue_2.2=Open their Menu and look for their Perfect Layout! +npcs_hub.arthur.dialogue.dialogue_3.1=Once you unlock a Minion, you also unlock all their Level up recipes! +npcs_hub.arthur.dialogue.dialogue_4.1=Use a Budget Hopper to make your Minions automatically sell their work once full! +npcs_hub.arthur.dialogue.dialogue_5.1=My favorite Minion Upgrade is the Compactor, sooooo useful! +npcs_hub.arthur.dialogue.dialogue_5.2=I have one in my Minion, look! +npcs_hub.arthur.dialogue.dialogue_6.1=People always empty the storage of my Minion when I'm not looking! +npcs_hub.arthur.dialogue.dialogue_7.1=Minions always have 4 Upgrade Slots where you can place Fuel or else # --- Seymour --- -npcs_hub.seymour.dialogue.hello = Looking to buy something fancy? +npcs_hub.seymour.dialogue.hello.1=Looking to buy something fancy? # --- Lonely Philosopher --- -npcs_hub.lonely_philosopher.dialogue.hello = I'm sorry, I have nothing for you. -npcs_hub.lonely_philosopher.dialogue.open_shop = To fast travel or not to fast travel? +npcs_hub.lonely_philosopher.dialogue.hello.1=I'm sorry, I have nothing for you. +npcs_hub.lonely_philosopher.dialogue.open_shop.1=To fast travel or not to fast travel? # --- Carpenter --- -npcs_hub.carpenter.dialogue.initial_hello = Hi, {player}! Welcome to the Furniture Shop.|Sales are too good right now, I can't keep up with the demand!|Could you bring a stack of White Wool to help replenish my stock?|Sheep over in The Barn drop wool, but you can also purchase it from the Wool Weaver.|She lives in a house not far from here - it's over by the water fountain. -npcs_hub.carpenter.dialogue.completed_quest = Wow, thanks so much for the help!|Carpentry is my passion, I always love to teach others.|Here's the recipe for the Carpentry Table. You can place it in your world and craft furniture that you've unlocked!|You can now gain Carpentry XP by crafting items. Leveling your Carpentry Skill unlocks new furniture recipes!|Some furniture is available exclusively in the Furniture Shop downstairs. Check it out! -npcs_hub.carpenter.dialogue.spoke_again = Check out the Furniture Shop downstairs!|The Furniture Shop is downstairs. Purchase cool furniture down there! +npcs_hub.carpenter.dialogue.initial_hello.1=Hi, {player}! Welcome to the Furniture Shop. +npcs_hub.carpenter.dialogue.initial_hello.2=Sales are too good right now, I can't keep up with the demand! +npcs_hub.carpenter.dialogue.initial_hello.3=Could you bring a stack of White Wool to help replenish my stock? +npcs_hub.carpenter.dialogue.initial_hello.4=Sheep over in The Barn drop wool, but you can also purchase it from the Wool Weaver. +npcs_hub.carpenter.dialogue.initial_hello.5=She lives in a house not far from here - it's over by the water fountain. +npcs_hub.carpenter.dialogue.completed_quest.1=Wow, thanks so much for the help! +npcs_hub.carpenter.dialogue.completed_quest.2=Carpentry is my passion, I always love to teach others. +npcs_hub.carpenter.dialogue.completed_quest.3=Here's the recipe for the Carpentry Table. You can place it in your world and craft furniture that you've unlocked! +npcs_hub.carpenter.dialogue.completed_quest.4=You can now gain Carpentry XP by crafting items. Leveling your Carpentry Skill unlocks new furniture recipes! +npcs_hub.carpenter.dialogue.completed_quest.5=Some furniture is available exclusively in the Furniture Shop downstairs. Check it out! +npcs_hub.carpenter.dialogue.spoke_again.1=Check out the Furniture Shop downstairs! +npcs_hub.carpenter.dialogue.spoke_again.2=The Furniture Shop is downstairs. Purchase cool furniture down there! # --- Mining Merchant --- -npcs_hub.mining_merchant.dialogue.hello = My specialities are ores, stone, and mining equipment.|Click me again to open the Miner Shop! +npcs_hub.mining_merchant.dialogue.hello.1=My specialities are ores, stone, and mining equipment. +npcs_hub.mining_merchant.dialogue.hello.2=Click me again to open the Miner Shop! # --- Zog --- -npcs_hub.zog.dialogue.hello = Hello! Have you heard of pet items?|Pet items give your companions bonuses!|I sell all kinds of them if you'd like to try one out! +npcs_hub.zog.dialogue.hello.1=Hello! Have you heard of pet items? +npcs_hub.zog.dialogue.hello.2=Pet items give your companions bonuses! +npcs_hub.zog.dialogue.hello.3=I sell all kinds of them if you'd like to try one out! # --- Jax --- -npcs_hub.jax.dialogue.introduction = Hello {player}! What brings you to my workshop? I forge the newest and most powerful arrows in all of SkyBlock!|If you can prove to me you're a real archer I'll forge you arrows whenever you need them.|Ready to test your skills? Step on the pressure plate and all the targets will light up, if you can shoot them all in 25 seconds, I'll know you're the real deal. -npcs_hub.jax.dialogue.completed_level_one = Wow, you can really shoot a bow!|Well, a deal's a deal! Come to me any time and I'll forge you whatever arrows you need for adventures.|I only have one condition... These are powerful arrows, they can't fall into the wrong hands so keep them in your quiver and don't share them with anyone. +npcs_hub.jax.dialogue.introduction.1=Hello {player}! What brings you to my workshop? I forge the newest and most powerful arrows in all of SkyBlock! +npcs_hub.jax.dialogue.introduction.2=If you can prove to me you're a real archer I'll forge you arrows whenever you need them. +npcs_hub.jax.dialogue.introduction.3=Ready to test your skills? Step on the pressure plate and all the targets will light up, if you can shoot them all in 25 seconds, I'll know you're the real deal. +npcs_hub.jax.dialogue.completed_level_one.1=Wow, you can really shoot a bow! +npcs_hub.jax.dialogue.completed_level_one.2=Well, a deal's a deal! Come to me any time and I'll forge you whatever arrows you need for adventures. +npcs_hub.jax.dialogue.completed_level_one.3=I only have one condition... These are powerful arrows, they can't fall into the wrong hands so keep them in your quiver and don't share them with anyone. # --- Dusk --- -npcs_hub.dusk.dialogue.hello = You can apply runes to weapons and armor with the Rune Pedestal behind me.|You can also combine two runes for a chance to create a higher level rune with a better effect! +npcs_hub.dusk.dialogue.hello.1=You can apply runes to weapons and armor with the Rune Pedestal behind me. +npcs_hub.dusk.dialogue.hello.2=You can also combine two runes for a chance to create a higher level rune with a better effect! # --- Security Sloth --- -npcs_hub.security_sloth.dialogue.hello = Downloading suspicious mods or visiting untrusted discord servers can put your account at risk. It is upto you to keep your account secure!|Here are some helpful support articles that will help you keep your account more secure and avoid losing valuable progress or items. +npcs_hub.security_sloth.dialogue.hello.1=Downloading suspicious mods or visiting untrusted discord servers can put your account at risk. It is upto you to keep your account secure! +npcs_hub.security_sloth.dialogue.hello.2=Here are some helpful support articles that will help you keep your account more secure and avoid losing valuable progress or items. # --- Lumber Merchant --- -npcs_hub.lumber_merchant.dialogue.hello = Buy and sell wood and axes with me!|Click me again to open the Lumberjack Shop! +npcs_hub.lumber_merchant.dialogue.hello.1=Buy and sell wood and axes with me! +npcs_hub.lumber_merchant.dialogue.hello.2=Click me again to open the Lumberjack Shop! # --- Banker --- -npcs_hub.banker.dialogue.quest_hello = Hello there!|You may want to store your Coins in a safe place while you are off adventuring.|Storing them in your Bank keeps them safe and allows you to earn interest at the start of every season! +npcs_hub.banker.dialogue.quest_hello.1=Hello there! +npcs_hub.banker.dialogue.quest_hello.2=You may want to store your Coins in a safe place while you are off adventuring. +npcs_hub.banker.dialogue.quest_hello.3=Storing them in your Bank keeps them safe and allows you to earn interest at the start of every season! # --- Bea --- -npcs_hub.bea.dialogue.hello = Hello! Do you have a pet?|Pets are little companions for your adventures in SkyBlock!|Personally, I prefer the bee pet! +npcs_hub.bea.dialogue.hello.1=Hello! Do you have a pet? +npcs_hub.bea.dialogue.hello.2=Pets are little companions for your adventures in SkyBlock! +npcs_hub.bea.dialogue.hello.3=Personally, I prefer the bee pet! # --- Elizabeth --- -npcs_hub.elizabeth.dialogue.hello = Hello! Welcome to SkyBlock!|I have powerful items to offer, but only to experienced adventurers!|Until then, I suggest leveling up to SkyBlock Level 3! +npcs_hub.elizabeth.dialogue.hello.1=Hello! Welcome to SkyBlock! +npcs_hub.elizabeth.dialogue.hello.2=I have powerful items to offer, but only to experienced adventurers! +npcs_hub.elizabeth.dialogue.hello.3=Until then, I suggest leveling up to SkyBlock Level 3! # --- Clerk Seraphine --- -npcs_hub.clerk_seraphine.dialogue.hello = Welcome to the Community Center!|Contribute to community projects, upgrade your account, and more by talking to Elizabeth!|You can also vote in the mayor elections by heading through the warp behind me! +npcs_hub.clerk_seraphine.dialogue.hello.1=Welcome to the Community Center! +npcs_hub.clerk_seraphine.dialogue.hello.2=Contribute to community projects, upgrade your account, and more by talking to Elizabeth! +npcs_hub.clerk_seraphine.dialogue.hello.3=You can also vote in the mayor elections by heading through the warp behind me! # --- Election NPCs --- npcs_hub.election.clerk_seraphine = Clerk Seraphine @@ -88,95 +121,173 @@ npcs_hub.election.minister_unknown = Minister ???? npcs_hub.election.hello = Hello!! # --- Gladiator --- -npcs_hub.gladiator.dialogue.hello = Welcome to the Colosseum!|Oh...wait. Nevermind.|Here you can join me in drinking away your sorrows. +npcs_hub.gladiator.dialogue.hello.1=Welcome to the Colosseum! +npcs_hub.gladiator.dialogue.hello.2=Oh...wait. Nevermind. +npcs_hub.gladiator.dialogue.hello.3=Here you can join me in drinking away your sorrows. # --- Weaponsmith --- -npcs_hub.weaponsmith.dialogue.hello = You'll need some strong weapons to survive out in the wild! Lucky for you, I've got some!|Click me again to open the Weaponsmith Shop! +npcs_hub.weaponsmith.dialogue.hello.1=You'll need some strong weapons to survive out in the wild! Lucky for you, I've got some! +npcs_hub.weaponsmith.dialogue.hello.2=Click me again to open the Weaponsmith Shop! # --- Bartender --- -npcs_hub.bartender.dialogue.quest_hello = Welcome to the Bar, friend!|These are trying times, indeed. The Graveyard is overflowing with monsters! Anyone who comes in is spooked off by the grunts of zombies in the distance.|Could you give me a hand? If you help clear out some of these monsters, I'll pay you for it. -npcs_hub.bartender.dialogue.quest_talk = Clear out some more of those Zombies and I'll pay you greatly for it! -npcs_hub.bartender.dialogue.quest_complete = Words cannot describe how thankful I am!|That whole area is very dangerous, but can be quite rewarding for a warrior such as yourself.|If you're up for the challenge, both the Graveyard and the Spider's Den beyond it are great training grounds for improving your Combat Skill.|For now, here's a reward for helping me out! +npcs_hub.bartender.dialogue.quest_hello.1=Welcome to the Bar, friend! +npcs_hub.bartender.dialogue.quest_hello.2=These are trying times, indeed. The Graveyard is overflowing with monsters! Anyone who comes in is spooked off by the grunts of zombies in the distance. +npcs_hub.bartender.dialogue.quest_hello.3=Could you give me a hand? If you help clear out some of these monsters, I'll pay you for it. +npcs_hub.bartender.dialogue.quest_talk.1=Clear out some more of those Zombies and I'll pay you greatly for it! +npcs_hub.bartender.dialogue.quest_complete.1=Words cannot describe how thankful I am! +npcs_hub.bartender.dialogue.quest_complete.2=That whole area is very dangerous, but can be quite rewarding for a warrior such as yourself. +npcs_hub.bartender.dialogue.quest_complete.3=If you're up for the challenge, both the Graveyard and the Spider's Den beyond it are great training grounds for improving your Combat Skill. +npcs_hub.bartender.dialogue.quest_complete.4=For now, here's a reward for helping me out! # --- Madame Eleanor Q. Goldsworth III --- -npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.pre_curator = The Curator has advised me to direct you back to him.|Please hear what he has to say before coming to me -npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.post_curator = Don't trust what the Curator told you, I am in no way his assistant.|I serve someone much more important.|I offer a Museum Appraisal Service, which allows you to determine the value of your Museum.|For a one-time fee, I will appraise your Museum's worth each time you modify your Museum.|You may even find yourself atop the Top Valued Museums in the Museum Browser!|Additionally, reaching certain valuation thresholds will allow you to purchase bank upgrades.|In the future, reaching these thresholds will reward even more! +npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.pre_curator.1=The Curator has advised me to direct you back to him. +npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.pre_curator.2=Please hear what he has to say before coming to me +npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.post_curator.1=Don't trust what the Curator told you, I am in no way his assistant. +npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.post_curator.2=I serve someone much more important. +npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.post_curator.3=I offer a Museum Appraisal Service, which allows you to determine the value of your Museum. +npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.post_curator.4=For a one-time fee, I will appraise your Museum's worth each time you modify your Museum. +npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.post_curator.5=You may even find yourself atop the Top Valued Museums in the Museum Browser! +npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.post_curator.6=Additionally, reaching certain valuation thresholds will allow you to purchase bank upgrades. +npcs_hub.madame_eleanor_q_goldsworth_iii.dialogue.post_curator.7=In the future, reaching these thresholds will reward even more! # --- Mad Redstone Engineer --- -npcs_hub.mad_redstone_engineer.dialogue.hello = Every problem in life can be solved with a little redstone. +npcs_hub.mad_redstone_engineer.dialogue.hello.1=Every problem in life can be solved with a little redstone. # --- Auction Master --- -npcs_hub.auction_master.dialogue.quest_hello = Hey there, I'm the Auction Master.|In the Auction House, you can put your valuable items up for auction!|You may also want to check back here to see what items other players are selling to see if you can get a good deal.|Talk to me or one of the Auction Agents if you would like to start your first auction or if you want to see the items currently being sold. +npcs_hub.auction_master.dialogue.quest_hello.1=Hey there, I'm the Auction Master. +npcs_hub.auction_master.dialogue.quest_hello.2=In the Auction House, you can put your valuable items up for auction! +npcs_hub.auction_master.dialogue.quest_hello.3=You may also want to check back here to see what items other players are selling to see if you can get a good deal. +npcs_hub.auction_master.dialogue.quest_hello.4=Talk to me or one of the Auction Agents if you would like to start your first auction or if you want to see the items currently being sold. # --- Farm Merchant --- -npcs_hub.farm_merchant.dialogue.hello = You can buy and sell harvested crops with me!|Wheat, carrots, potatoes, and melon are my specialties!|Click me again to open the Farmer Shop! +npcs_hub.farm_merchant.dialogue.hello.1=You can buy and sell harvested crops with me! +npcs_hub.farm_merchant.dialogue.hello.2=Wheat, carrots, potatoes, and melon are my specialties! +npcs_hub.farm_merchant.dialogue.hello.3=Click me again to open the Farmer Shop! # --- The Handler --- -npcs_hub.the_handler.dialogue.not_prosperous_1 = The Hex will not see you now. -npcs_hub.the_handler.dialogue.not_prosperous_2 = he Hex is troubled by your presence. -npcs_hub.the_handler.dialogue.not_prosperous_3 = There is an absence of prosperity within you. -npcs_hub.the_handler.dialogue.not_prosperous_4 = The Hex does not wish to be tainted with useless items. -npcs_hub.the_handler.dialogue.not_prosperous_5 = The Hex does not have time for you. +npcs_hub.the_handler.dialogue.not_prosperous_1.1=The Hex will not see you now. +npcs_hub.the_handler.dialogue.not_prosperous_2.1=he Hex is troubled by your presence. +npcs_hub.the_handler.dialogue.not_prosperous_3.1=There is an absence of prosperity within you. +npcs_hub.the_handler.dialogue.not_prosperous_4.1=The Hex does not wish to be tainted with useless items. +npcs_hub.the_handler.dialogue.not_prosperous_5.1=The Hex does not have time for you. # --- Lumber Jack --- -npcs_hub.lumber_jack.dialogue.initial_hello = Timber!|My woodcutting assistant has fallen quite ill! Do you think you could take over for him?|I just need you to chop down some Logs. If you do, I'll even give you his old axe as a reward!|Do you think you could take over for him? -npcs_hub.lumber_jack.dialogue.option_nah = Oh okay... maybe come back later! -npcs_hub.lumber_jack.dialogue.option_accept = Cheers!, Let me tell ya a little about what we're going to be doing.|We will be Foraging! As one of SkyBlock's core skills, Foraging involves cutting down lots of different types of trees!|As you do this, you'll unlock various crafts and useful stat boots that will help in other areas of your adventure.|Here, let me unlock the Foraging skill for you, and then you can get started!|To get you started, please bring me 20 Oak Logs! You can break the trees just off the trail to get 'em|Use your fists for now - I'll give you my previous assistant's axe if you can prove your worth! -npcs_hub.lumber_jack.dialogue.spoke_again = Nice job! In return for those logs, I'll give ya this Promising Axe.|It's far less painful than using your fists to punch trees, I'll tell ya that much!|If you feel like Foraging is the thing for you, continue down the path and head towards The Park.|My friend Charlie can be found there. I'm sure he'll have some work for you! -npcs_hub.lumber_jack.dialogue.idl_1 = My mate Charlie has a Treecapitator! With it, he can break down entire trees in a single swipe! -npcs_hub.lumber_jack.dialogue.idle_2 = Have you spoken to my mate Charlie over in The Park yet? He could probably use your help. -npcs_hub.lumber_jack.dialogue.idle_3 = Have you enchanted your axe with Efficiency V? It'll help ya break stuff a lot faster. +npcs_hub.lumber_jack.dialogue.initial_hello.1=Timber! +npcs_hub.lumber_jack.dialogue.initial_hello.2=My woodcutting assistant has fallen quite ill! Do you think you could take over for him? +npcs_hub.lumber_jack.dialogue.initial_hello.3=I just need you to chop down some Logs. If you do, I'll even give you his old axe as a reward! +npcs_hub.lumber_jack.dialogue.initial_hello.4=Do you think you could take over for him? +npcs_hub.lumber_jack.dialogue.option_nah.1=Oh okay... maybe come back later! +npcs_hub.lumber_jack.dialogue.option_accept.1=Cheers!, Let me tell ya a little about what we're going to be doing. +npcs_hub.lumber_jack.dialogue.option_accept.2=We will be Foraging! As one of SkyBlock's core skills, Foraging involves cutting down lots of different types of trees! +npcs_hub.lumber_jack.dialogue.option_accept.3=As you do this, you'll unlock various crafts and useful stat boots that will help in other areas of your adventure. +npcs_hub.lumber_jack.dialogue.option_accept.4=Here, let me unlock the Foraging skill for you, and then you can get started! +npcs_hub.lumber_jack.dialogue.option_accept.5=To get you started, please bring me 20 Oak Logs! You can break the trees just off the trail to get 'em +npcs_hub.lumber_jack.dialogue.option_accept.6=Use your fists for now - I'll give you my previous assistant's axe if you can prove your worth! +npcs_hub.lumber_jack.dialogue.spoke_again.1=Nice job! In return for those logs, I'll give ya this Promising Axe. +npcs_hub.lumber_jack.dialogue.spoke_again.2=It's far less painful than using your fists to punch trees, I'll tell ya that much! +npcs_hub.lumber_jack.dialogue.spoke_again.3=If you feel like Foraging is the thing for you, continue down the path and head towards The Park. +npcs_hub.lumber_jack.dialogue.spoke_again.4=My friend Charlie can be found there. I'm sure he'll have some work for you! +npcs_hub.lumber_jack.dialogue.idl_1.1=My mate Charlie has a Treecapitator! With it, he can break down entire trees in a single swipe! +npcs_hub.lumber_jack.dialogue.idle_2.1=Have you spoken to my mate Charlie over in The Park yet? He could probably use your help. +npcs_hub.lumber_jack.dialogue.idle_3.1=Have you enchanted your axe with Efficiency V? It'll help ya break stuff a lot faster. # --- Builder --- -npcs_hub.builder.dialogue.hello = If you build, they will come!|Click me again to open the Builder Shop! +npcs_hub.builder.dialogue.hello.1=If you build, they will come! +npcs_hub.builder.dialogue.hello.2=Click me again to open the Builder Shop! # --- Curator --- -npcs_hub.curator.dialogue.initial_hello = Welcome, {player}!|After years of work, I finally opened the Museum!|This world has an incredible amount of interesting gear and rare items, which I would like to showcase.|Would you like to help me fill the Museum? My assistant, Madame Goldsworth, will even reward you!|I'll show you the list of items that I'm currently looking for.|You can donate any item from the list, and you'll still be able to use those items whenever you want!|However - once you donate an item, it will be Co-op Soulbound to you, meaning that you won't be able to trade, auction or sell the item anymore.|Choose carefully! +npcs_hub.curator.dialogue.initial_hello.1=Welcome, {player}! +npcs_hub.curator.dialogue.initial_hello.2=After years of work, I finally opened the Museum! +npcs_hub.curator.dialogue.initial_hello.3=This world has an incredible amount of interesting gear and rare items, which I would like to showcase. +npcs_hub.curator.dialogue.initial_hello.4=Would you like to help me fill the Museum? My assistant, Madame Goldsworth, will even reward you! +npcs_hub.curator.dialogue.initial_hello.5=I'll show you the list of items that I'm currently looking for. +npcs_hub.curator.dialogue.initial_hello.6=You can donate any item from the list, and you'll still be able to use those items whenever you want! +npcs_hub.curator.dialogue.initial_hello.7=However - once you donate an item, it will be Co-op Soulbound to you, meaning that you won't be able to trade, auction or sell the item anymore. +npcs_hub.curator.dialogue.initial_hello.8=Choose carefully! # --- Swofty --- -npcs_hub.swofty.dialogue.hello = Make sure to check out our discord server at discord.gg/paper!|Feel free to create a pull request to help us :) +npcs_hub.swofty.dialogue.hello.1=Make sure to check out our discord server at discord.gg/paper! +npcs_hub.swofty.dialogue.hello.2=Feel free to create a pull request to help us :) # --- Bazaar --- -npcs_hub.bazaar.dialogue.hello = You need SkyBlock Level 7 to access this feature! +npcs_hub.bazaar.dialogue.hello.1=You need SkyBlock Level 7 to access this feature! # --- Bazaar Agent --- -npcs_hub.bazaar_agent.dialogue.hello = You need SkyBlock Level 7 to access this feature! +npcs_hub.bazaar_agent.dialogue.hello.1=You need SkyBlock Level 7 to access this feature! # --- Tia the Fairy --- -npcs_hub.tia_the_fairy.dialogue.hello = Welcome to the Fairy Pond, {player}! I am Tia.|You may have noticed some strange orbs laying around the island.|They are the souls of my fallen sisters.|If you find any more during your travels, please bring them back to me! +npcs_hub.tia_the_fairy.dialogue.hello.1=Welcome to the Fairy Pond, {player}! I am Tia. +npcs_hub.tia_the_fairy.dialogue.hello.2=You may have noticed some strange orbs laying around the island. +npcs_hub.tia_the_fairy.dialogue.hello.3=They are the souls of my fallen sisters. +npcs_hub.tia_the_fairy.dialogue.hello.4=If you find any more during your travels, please bring them back to me! # --- Fisherman Gerald --- -npcs_hub.fisherman_gerald.dialogue.below_fishing_5 = Hmm, you're not quite ready yet.|Go talk to the Fish Merchant in the Fishing Outpost, get geared up, and get fishin'!|Come back once you've reached Fishing Skill V and I'll tell you how you can get to a new island! -npcs_hub.fisherman_gerald.dialogue.first_interaction = Keep the noise down, kid!|If you want to learn about Fishing, go talk to my wife, Fisherwoman Enid.|She's fishing a bit upstream. Once she's shown you the ropes, come back and talk to me! +npcs_hub.fisherman_gerald.dialogue.below_fishing_5.1=Hmm, you're not quite ready yet. +npcs_hub.fisherman_gerald.dialogue.below_fishing_5.2=Go talk to the Fish Merchant in the Fishing Outpost, get geared up, and get fishin'! +npcs_hub.fisherman_gerald.dialogue.below_fishing_5.3=Come back once you've reached Fishing Skill V and I'll tell you how you can get to a new island! +npcs_hub.fisherman_gerald.dialogue.first_interaction.1=Keep the noise down, kid! +npcs_hub.fisherman_gerald.dialogue.first_interaction.2=If you want to learn about Fishing, go talk to my wife, Fisherwoman Enid. +npcs_hub.fisherman_gerald.dialogue.first_interaction.3=She's fishing a bit upstream. Once she's shown you the ropes, come back and talk to me! # --- Farmer Rigby --- -npcs_hub.farmer_rigby.dialogue.initial_hello = Howdy, friend!|My cow is sick, she needs some food to replenish her strength.|Could you gather some Wheat from my farm and bring it back to me so that I can feed her? Poor thing. -npcs_hub.farmer_rigby.dialogue.spoke_again = Thank you so much!|My Farm is yours to harvest! Wheat is a valuable resource to collect, you can unlock many cool things by collecting it. +npcs_hub.farmer_rigby.dialogue.initial_hello.1=Howdy, friend! +npcs_hub.farmer_rigby.dialogue.initial_hello.2=My cow is sick, she needs some food to replenish her strength. +npcs_hub.farmer_rigby.dialogue.initial_hello.3=Could you gather some Wheat from my farm and bring it back to me so that I can feed her? Poor thing. +npcs_hub.farmer_rigby.dialogue.spoke_again.1=Thank you so much! +npcs_hub.farmer_rigby.dialogue.spoke_again.2=My Farm is yours to harvest! Wheat is a valuable resource to collect, you can unlock many cool things by collecting it. # --- Nicole --- -npcs_hub.nicole.dialogue.hello = Books are mesmerizing.|Their words offer permanence.|Permanence is knowledge.|Knowledge transcends time and space.|Space is only a construct...|Whew! I need some coffee! -npcs_hub.nicole.dialogue.coffee_hello = Thank you!|Elise really wanted this but she is shy.|I'm selecting books for her.|Anything to do with the Calamity or the Riftway at the top of the mountain. +npcs_hub.nicole.dialogue.hello.1=Books are mesmerizing. +npcs_hub.nicole.dialogue.hello.2=Their words offer permanence. +npcs_hub.nicole.dialogue.hello.3=Permanence is knowledge. +npcs_hub.nicole.dialogue.hello.4=Knowledge transcends time and space. +npcs_hub.nicole.dialogue.hello.5=Space is only a construct... +npcs_hub.nicole.dialogue.hello.6=Whew! I need some coffee! +npcs_hub.nicole.dialogue.coffee_hello.1=Thank you! +npcs_hub.nicole.dialogue.coffee_hello.2=Elise really wanted this but she is shy. +npcs_hub.nicole.dialogue.coffee_hello.3=I'm selecting books for her. +npcs_hub.nicole.dialogue.coffee_hello.4=Anything to do with the Calamity or the Riftway at the top of the mountain. # --- Karis --- -npcs_hub.karis.dialogue.idle = The Abiphone Basic is the best model for beginners.|Between you and me, if you ever want to upgrade it you should travel to the Crimson Isle.|There's this guy named Udel there - he created the Abiphone. Forgot to patent it, though.|He sells a whole bunch of high-end Abiphones with more features, you should check it out sometime! +npcs_hub.karis.dialogue.idle.1=The Abiphone Basic is the best model for beginners. +npcs_hub.karis.dialogue.idle.2=Between you and me, if you ever want to upgrade it you should travel to the Crimson Isle. +npcs_hub.karis.dialogue.idle.3=There's this guy named Udel there - he created the Abiphone. Forgot to patent it, though. +npcs_hub.karis.dialogue.idle.4=He sells a whole bunch of high-end Abiphones with more features, you should check it out sometime! # --- Fishing Merchant --- -npcs_hub.fishing_merchant.dialogue.hello = Fishing is my trade.|I buy and sell any fish, rod, or treasure you can find!|Click me again to open the Fisherman Shop! +npcs_hub.fishing_merchant.dialogue.hello.1=Fishing is my trade. +npcs_hub.fishing_merchant.dialogue.hello.2=I buy and sell any fish, rod, or treasure you can find! +npcs_hub.fishing_merchant.dialogue.hello.3=Click me again to open the Fisherman Shop! # --- Gavin --- -npcs_hub.gavin.dialogue.first_interaction = At the end of each year I bake cakes for everyone in town to celebrate the year.|I made one especially for you, here you go.|I've recently added a New Year Cake Bag to my inventory. Sadly, it's not free! Click me again to open my shop! -npcs_hub.gavin.dialogue.idle_1 = You can open your Sea Creature Guide through your Fishing Skill menu, or with /scg! -npcs_hub.gavin.dialogue.idle_2 = I'd rather be out there fishing for Treasure.|But mum insists I finish my studies first. +npcs_hub.gavin.dialogue.first_interaction.1=At the end of each year I bake cakes for everyone in town to celebrate the year. +npcs_hub.gavin.dialogue.first_interaction.2=I made one especially for you, here you go. +npcs_hub.gavin.dialogue.first_interaction.3=I've recently added a New Year Cake Bag to my inventory. Sadly, it's not free! Click me again to open my shop! +npcs_hub.gavin.dialogue.idle_1.1=You can open your Sea Creature Guide through your Fishing Skill menu, or with /scg! +npcs_hub.gavin.dialogue.idle_2.1=I'd rather be out there fishing for Treasure. +npcs_hub.gavin.dialogue.idle_2.2=But mum insists I finish my studies first. # --- Wool Weaver --- -npcs_hub.wool_weaver.dialogue.hello = If wool shrinks when you wash it...|...why don't sheep get smaller when it rains? +npcs_hub.wool_weaver.dialogue.hello.1=If wool shrinks when you wash it... +npcs_hub.wool_weaver.dialogue.hello.2=...why don't sheep get smaller when it rains? # --- Villager Blacksmith --- -npcs_hub.villager_blacksmith.dialogue.initial_hello = I'm the town Blacksmith! I can reforge items for you, for a price.|Reforging usually costs Coins, but since I'm feeling friendly I can reforge your first item for Coal x10.|Go into the Mine to collect Coal, then come back to learn how to reforge items! -npcs_hub.villager_blacksmith.dialogue.spoke_again = Ahh, excellent!|Reforging items allows you to get the most out of your weapons, armor, and other items by applying stat modifiers to them!|To reforge an item, place an item in my inventory. Reforging costs Coins - the more prestigious items cost more to reforge!|However, this time I will reforge any item for the low price of Coal x10! +npcs_hub.villager_blacksmith.dialogue.initial_hello.1=I'm the town Blacksmith! I can reforge items for you, for a price. +npcs_hub.villager_blacksmith.dialogue.initial_hello.2=Reforging usually costs Coins, but since I'm feeling friendly I can reforge your first item for Coal x10. +npcs_hub.villager_blacksmith.dialogue.initial_hello.3=Go into the Mine to collect Coal, then come back to learn how to reforge items! +npcs_hub.villager_blacksmith.dialogue.spoke_again.1=Ahh, excellent! +npcs_hub.villager_blacksmith.dialogue.spoke_again.2=Reforging items allows you to get the most out of your weapons, armor, and other items by applying stat modifiers to them! +npcs_hub.villager_blacksmith.dialogue.spoke_again.3=To reforge an item, place an item in my inventory. Reforging costs Coins - the more prestigious items cost more to reforge! +npcs_hub.villager_blacksmith.dialogue.spoke_again.4=However, this time I will reforge any item for the low price of Coal x10! # --- Villager Librarian --- -npcs_hub.villager_librarian.dialogue.quest_hello = Greetings! Welcome to the Library!|The Library is your one-stop shop for all things enchanting. Enchant items, purchase Enchanted Books, and more!|You can enchant items by clicking any Enchanting Table. Enchanting costs experience levels - the more levels you spend, the better enchantments you will receive.|Use the Enchanting Table to enchant an item! +npcs_hub.villager_librarian.dialogue.quest_hello.1=Greetings! Welcome to the Library! +npcs_hub.villager_librarian.dialogue.quest_hello.2=The Library is your one-stop shop for all things enchanting. Enchant items, purchase Enchanted Books, and more! +npcs_hub.villager_librarian.dialogue.quest_hello.3=You can enchant items by clicking any Enchanting Table. Enchanting costs experience levels - the more levels you spend, the better enchantments you will receive. +npcs_hub.villager_librarian.dialogue.quest_hello.4=Use the Enchanting Table to enchant an item! # --- Villager Maths Enjoyer --- -npcs_hub.villager_maths_enjoyer.dialogue.hello = Hey if you really want to know...|The formula to Magical Power is...|Stats Mult. = 29.97(ln(0.0019MP))^1.2|Have fun with that! +npcs_hub.villager_maths_enjoyer.dialogue.hello.1=Hey if you really want to know... +npcs_hub.villager_maths_enjoyer.dialogue.hello.2=The formula to Magical Power is... +npcs_hub.villager_maths_enjoyer.dialogue.hello.3=Stats Mult. = 29.97(ln(0.0019MP))^1.2 +npcs_hub.villager_maths_enjoyer.dialogue.hello.4=Have fun with that! diff --git a/configuration/i18n/en_US/npcs/npcs_spidersden.properties b/configuration/i18n/en_US/npcs/npcs_spidersden.properties index 1a4e758fa..5b5553f12 100644 --- a/configuration/i18n/en_US/npcs/npcs_spidersden.properties +++ b/configuration/i18n/en_US/npcs/npcs_spidersden.properties @@ -1,35 +1,51 @@ -# Spider's Den NPC Dialogues - # Ike -npcs_spidersden.ike.dialogue.initial_hello = You heard what Michael said about Mob Types? -npcs_spidersden.ike.dialogue.answering_no = Then go talk to him, bro. -npcs_spidersden.ike.dialogue.continuation_1 = Not to flex, but I've seen enough films to know about every mob type in existence.|I'm bored, so let's play a game, just us two. -npcs_spidersden.ike.dialogue.continuation_2 = You go out and slay some mobs and, every time you kill a mob with a new mob type, I'll add it to my book!|I'll give you a reward each time you kill a new mob type, so get busy!|Talk to me again if you want to check your progress! -npcs_spidersden.ike.dialogue.idle_1 = 'Sup champ! How's that Mob Type collection coming along? Let's take a look! -npcs_spidersden.ike.dialogue.idle_2 = Dude, I'm so bored out here. Mind showing me what you've been up to? -npcs_spidersden.ike.dialogue.close = Get back out there, there's always more to explore! +npcs_spidersden.ike.dialogue.initial_hello.1=You heard what Michael said about Mob Types? +npcs_spidersden.ike.dialogue.answering_no.1=Then go talk to him, bro. +npcs_spidersden.ike.dialogue.continuation_1.1=Not to flex, but I've seen enough films to know about every mob type in existence. +npcs_spidersden.ike.dialogue.continuation_1.2=I'm bored, so let's play a game, just us two. +npcs_spidersden.ike.dialogue.continuation_2.1=You go out and slay some mobs and, every time you kill a mob with a new mob type, I'll add it to my book! +npcs_spidersden.ike.dialogue.continuation_2.2=I'll give you a reward each time you kill a new mob type, so get busy! +npcs_spidersden.ike.dialogue.continuation_2.3=Talk to me again if you want to check your progress! +npcs_spidersden.ike.dialogue.idle_1.1='Sup champ! How's that Mob Type collection coming along? Let's take a look! +npcs_spidersden.ike.dialogue.idle_2.1=Dude, I'm so bored out here. Mind showing me what you've been up to? +npcs_spidersden.ike.dialogue.close.1=Get back out there, there's always more to explore! # Bramass Beastslayer -npcs_spidersden.bramass_beastslayer.dialogue.initial_hello = Hello, adventurer! I am Bramass Beastslayer! I've slain beasts of all sorts across SkyBlock!|I sure wish there was a record of all of my accomplishments in one place!|Oh wait...there is!|Your Bestiary is a compendium of all of the mobs in SkyBlock!|View your mob stats, unlock rewards, and more!|You can find the Bestiary in your Combat Skill menu! -npcs_spidersden.bramass_beastslayer.dialogue.idle_1 = Killing mobs in a Family enough times rewards you with ✯ Magic Find towards that mob! -npcs_spidersden.bramass_beastslayer.dialogue.idle_2 = This increases your chance to find rare loot when killing this mob! -npcs_spidersden.bramass_beastslayer.dialogue.idle_3 = Killing enough mobs in a given Family unlocks rewards. -npcs_spidersden.bramass_beastslayer.dialogue.idle_4 = You can unlock ✯ Magic Find, ❁ Strength bonuses, and loot drop information for that Family! -npcs_spidersden.bramass_beastslayer.dialogue.idle_5 = You can always view your Bestiary in your Combat Skill menu! -npcs_spidersden.bramass_beastslayer.dialogue.idle_6 = Reach Milestones in your Bestiary by unlocking unique Family tiers. -npcs_spidersden.bramass_beastslayer.dialogue.idle_7 = Reaching Milestones rewards ❤ Health, Combat Exp, and more! +npcs_spidersden.bramass_beastslayer.dialogue.initial_hello.1=Hello, adventurer! I am Bramass Beastslayer! I've slain beasts of all sorts across SkyBlock! +npcs_spidersden.bramass_beastslayer.dialogue.initial_hello.2=I sure wish there was a record of all of my accomplishments in one place! +npcs_spidersden.bramass_beastslayer.dialogue.initial_hello.3=Oh wait...there is! +npcs_spidersden.bramass_beastslayer.dialogue.initial_hello.4=Your Bestiary is a compendium of all of the mobs in SkyBlock! +npcs_spidersden.bramass_beastslayer.dialogue.initial_hello.5=View your mob stats, unlock rewards, and more! +npcs_spidersden.bramass_beastslayer.dialogue.initial_hello.6=You can find the Bestiary in your Combat Skill menu! +npcs_spidersden.bramass_beastslayer.dialogue.idle_1.1=Killing mobs in a Family enough times rewards you with ✯ Magic Find towards that mob! +npcs_spidersden.bramass_beastslayer.dialogue.idle_2.1=This increases your chance to find rare loot when killing this mob! +npcs_spidersden.bramass_beastslayer.dialogue.idle_3.1=Killing enough mobs in a given Family unlocks rewards. +npcs_spidersden.bramass_beastslayer.dialogue.idle_4.1=You can unlock ✯ Magic Find, ❁ Strength bonuses, and loot drop information for that Family! +npcs_spidersden.bramass_beastslayer.dialogue.idle_5.1=You can always view your Bestiary in your Combat Skill menu! +npcs_spidersden.bramass_beastslayer.dialogue.idle_6.1=Reach Milestones in your Bestiary by unlocking unique Family tiers. +npcs_spidersden.bramass_beastslayer.dialogue.idle_7.1=Reaching Milestones rewards ❤ Health, Combat Exp, and more! # Michael -npcs_spidersden.michael.dialogue.talk_to_ike_before_michael = Hey, come talk to me first! -npcs_spidersden.michael.dialogue.initial_hello = Wassup! We're out here on a camping trip!|I don't really know why we chose the Spider's Den, though...|Still, I've been playing lots of games to pass the time.|Quick! Trivia question! Do you know what Mob Types are? -npcs_spidersden.michael.dialogue.selected_know_mob_types = Cool, cool...|Well, I'm going to explain it anyways, otherwise my very existence lacks purpose! -npcs_spidersden.michael.dialogue.selected_dont_know_mob_types = No problem! Allow me to explain. -npcs_spidersden.michael.dialogue.explaining_mob_types = So. Mob Types.|Every Mob has at least one type, which you can see next to its name.|For example, Spiders are classified as Arthropods, which you can tell because of the symbol next to their name.|Most mobs have one type, but some have more.|My mate Ike knows which types all the different symbols represent.|Go talk to him if you want to learn more! +npcs_spidersden.michael.dialogue.talk_to_ike_before_michael.1=Hey, come talk to me first! +npcs_spidersden.michael.dialogue.initial_hello.1=Wassup! We're out here on a camping trip! +npcs_spidersden.michael.dialogue.initial_hello.2=I don't really know why we chose the Spider's Den, though... +npcs_spidersden.michael.dialogue.initial_hello.3=Still, I've been playing lots of games to pass the time. +npcs_spidersden.michael.dialogue.initial_hello.4=Quick! Trivia question! Do you know what Mob Types are? +npcs_spidersden.michael.dialogue.selected_know_mob_types.1=Cool, cool... +npcs_spidersden.michael.dialogue.selected_know_mob_types.2=Well, I'm going to explain it anyways, otherwise my very existence lacks purpose! +npcs_spidersden.michael.dialogue.selected_dont_know_mob_types.1=No problem! Allow me to explain. +npcs_spidersden.michael.dialogue.explaining_mob_types.1=So. Mob Types. +npcs_spidersden.michael.dialogue.explaining_mob_types.2=Every Mob has at least one type, which you can see next to its name. +npcs_spidersden.michael.dialogue.explaining_mob_types.3=For example, Spiders are classified as Arthropods, which you can tell because of the symbol next to their name. +npcs_spidersden.michael.dialogue.explaining_mob_types.4=Most mobs have one type, but some have more. +npcs_spidersden.michael.dialogue.explaining_mob_types.5=My mate Ike knows which types all the different symbols represent. +npcs_spidersden.michael.dialogue.explaining_mob_types.6=Go talk to him if you want to learn more! # Rick -npcs_spidersden.rick.dialogue.initial_hello = Hey, I could use some help! My Promising Shovel just broke, and I don't have the right ingredients to make a new one.|If you could get me a couple iron ingots, I could make one for us both! -npcs_spidersden.rick.dialogue.still_need_iron = Bring me a couple iron ingots and I'll craft us both a Promising Shovel! -npcs_spidersden.rick.dialogue.got_iron = Thanks a lot. Here's your Promising Shovel. -npcs_spidersden.rick.dialogue.idle_1 = Have you met Pat? He's my brother. We're the Flint Bros! -npcs_spidersden.rick.dialogue.idle_2 = Careful when it rains around here, it gets dangerous! -npcs_spidersden.rick.dialogue.idle_3 = Mining gravel is hard work, but the flint is worth it. +npcs_spidersden.rick.dialogue.initial_hello.1=Hey, I could use some help! My Promising Shovel just broke, and I don't have the right ingredients to make a new one. +npcs_spidersden.rick.dialogue.initial_hello.2=If you could get me a couple iron ingots, I could make one for us both! +npcs_spidersden.rick.dialogue.still_need_iron.1=Bring me a couple iron ingots and I'll craft us both a Promising Shovel! +npcs_spidersden.rick.dialogue.got_iron.1=Thanks a lot. Here's your Promising Shovel. +npcs_spidersden.rick.dialogue.idle_1.1=Have you met Pat? He's my brother. We're the Flint Bros! +npcs_spidersden.rick.dialogue.idle_2.1=Careful when it rains around here, it gets dangerous! +npcs_spidersden.rick.dialogue.idle_3.1=Mining gravel is hard work, but the flint is worth it. diff --git a/configuration/i18n/en_US/npcs/npcs_thepark.properties b/configuration/i18n/en_US/npcs/npcs_thepark.properties index 4026e4f30..6463c2df3 100644 --- a/configuration/i18n/en_US/npcs/npcs_thepark.properties +++ b/configuration/i18n/en_US/npcs/npcs_thepark.properties @@ -1,148 +1,354 @@ -# The Park NPC Dialogues - # Gustave -npcs_thepark.gustave.dialogue.first_interaction = There's nothing like island racing!|I've traveled many islands and this is my favorite to race on. Want to try?|To complete the race, you'll need to reach the opposite side of the island AND come all the way back.|Start the race by walking over the pressure plate. If you finish in under 2 minutes, I'll reward you for it! Good luck!|The other end of the race can be found at -407 128 -119 and is also marked by a beacon.|There are also crit-particle trails to follow. -npcs_thepark.gustave.dialogue.not_too_fast = Hey! Come talk to me over here! I'll tell you all about racing! -npcs_thepark.gustave.dialogue.completed_1 = Not bad, {player}!|I hope you can get better than this!|Here's a Polished Pebble. I found it laying around...|Try again, but this time come back in 1 minute or less! -npcs_thepark.gustave.dialogue.completed_2 = You're getting much faster!|Use my Hunter Knife. Holding it somehow makes me go faster.|See if you can beat 32 seconds! -npcs_thepark.gustave.dialogue.completed_3 = Now we're cooking! You're getting close to my record!|Here's an trinket I've found in the caverns behind the waterfall.|Finish the race in under 18 seconds and come talk to me! -npcs_thepark.gustave.dialogue.completed_4 = You did it! Congratulations, {player}. You are now faster than Gustave!|I've been racing this island so fast that some bark from the trees snatched right off!|Here's a rare piece of Silky Lichen. Maybe you can do something with it.|I have this lichen could improve some weapons! -npcs_thepark.gustave.dialogue.idle_1 = You're always welcome to try the race again. Just run over the pressure plate to begin! -npcs_thepark.gustave.dialogue.idle_2 = It's a great day to go for a run! +npcs_thepark.gustave.dialogue.first_interaction.1=There's nothing like island racing! +npcs_thepark.gustave.dialogue.first_interaction.2=I've traveled many islands and this is my favorite to race on. Want to try? +npcs_thepark.gustave.dialogue.first_interaction.3=To complete the race, you'll need to reach the opposite side of the island AND come all the way back. +npcs_thepark.gustave.dialogue.first_interaction.4=Start the race by walking over the pressure plate. If you finish in under 2 minutes, I'll reward you for it! Good luck! +npcs_thepark.gustave.dialogue.first_interaction.5=The other end of the race can be found at -407 128 -119 and is also marked by a beacon. +npcs_thepark.gustave.dialogue.first_interaction.6=There are also crit-particle trails to follow. +npcs_thepark.gustave.dialogue.not_too_fast.1=Hey! Come talk to me over here! I'll tell you all about racing! +npcs_thepark.gustave.dialogue.completed_1.1=Not bad, {player}! +npcs_thepark.gustave.dialogue.completed_1.2=I hope you can get better than this! +npcs_thepark.gustave.dialogue.completed_1.3=Here's a Polished Pebble. I found it laying around... +npcs_thepark.gustave.dialogue.completed_1.4=Try again, but this time come back in 1 minute or less! +npcs_thepark.gustave.dialogue.completed_2.1=You're getting much faster! +npcs_thepark.gustave.dialogue.completed_2.2=Use my Hunter Knife. Holding it somehow makes me go faster. +npcs_thepark.gustave.dialogue.completed_2.3=See if you can beat 32 seconds! +npcs_thepark.gustave.dialogue.completed_3.1=Now we're cooking! You're getting close to my record! +npcs_thepark.gustave.dialogue.completed_3.2=Here's an trinket I've found in the caverns behind the waterfall. +npcs_thepark.gustave.dialogue.completed_3.3=Finish the race in under 18 seconds and come talk to me! +npcs_thepark.gustave.dialogue.completed_4.1=You did it! Congratulations, {player}. You are now faster than Gustave! +npcs_thepark.gustave.dialogue.completed_4.2=I've been racing this island so fast that some bark from the trees snatched right off! +npcs_thepark.gustave.dialogue.completed_4.3=Here's a rare piece of Silky Lichen. Maybe you can do something with it. +npcs_thepark.gustave.dialogue.completed_4.4=I have this lichen could improve some weapons! +npcs_thepark.gustave.dialogue.idle_1.1=You're always welcome to try the race again. Just run over the pressure plate to begin! +npcs_thepark.gustave.dialogue.idle_2.1=It's a great day to go for a run! # Kelly -npcs_thepark.kelly.dialogue.first_interaction = Hey hey! Did Charlie send you? -npcs_thepark.kelly.dialogue.option_yes = Awesome!|Okay, so basically.|I was breaking this tree right here, right.|But then I broke my axe!|And now I don't want to break any more trees, in case I break any more axes!|Anyways, if you can bring me 128 Spruce Logs, I'll give you a reward! -npcs_thepark.kelly.dialogue.option_no = Strange... I could've sworn you'd met.|Anyways, I was breaking this tree right here, right.|But then I broke my axe!|And now I don't want to break any more trees, in case I break any more axes!|If you can bring me 128 Spruce Logs, I'll give you a reward! -npcs_thepark.kelly.dialogue.during_collect = Bring me 128 Spruce Logs!|That's two stacks of them, if you're struggling to do the math! -npcs_thepark.kelly.dialogue.after_collecting = Oh, that's amazing! Thank you so much!|Now I can take this all back to Charlie, and say I did it!|And then, with the coins he gives me, I can get a Spruce Minion!|You should check out the Dark Thicket next. Be careful though!|I've heard some people are holding a Cult Meeting there RIGHT NOW! -npcs_thepark.kelly.dialogue.idle_1 = I talk a lot, so I've learned to just tune myself out -npcs_thepark.kelly.dialogue.idle_2 = I can't control what I say to people. I spend the whole day talking. -npcs_thepark.kelly.dialogue.idle_3 = Did you check out the Cult over in the Dark Thicket yet. +npcs_thepark.kelly.dialogue.first_interaction.1=Hey hey! Did Charlie send you? +npcs_thepark.kelly.dialogue.option_yes.1=Awesome! +npcs_thepark.kelly.dialogue.option_yes.2=Okay, so basically. +npcs_thepark.kelly.dialogue.option_yes.3=I was breaking this tree right here, right. +npcs_thepark.kelly.dialogue.option_yes.4=But then I broke my axe! +npcs_thepark.kelly.dialogue.option_yes.5=And now I don't want to break any more trees, in case I break any more axes! +npcs_thepark.kelly.dialogue.option_yes.6=Anyways, if you can bring me 128 Spruce Logs, I'll give you a reward! +npcs_thepark.kelly.dialogue.option_no.1=Strange... I could've sworn you'd met. +npcs_thepark.kelly.dialogue.option_no.2=Anyways, I was breaking this tree right here, right. +npcs_thepark.kelly.dialogue.option_no.3=But then I broke my axe! +npcs_thepark.kelly.dialogue.option_no.4=And now I don't want to break any more trees, in case I break any more axes! +npcs_thepark.kelly.dialogue.option_no.5=If you can bring me 128 Spruce Logs, I'll give you a reward! +npcs_thepark.kelly.dialogue.during_collect.1=Bring me 128 Spruce Logs! +npcs_thepark.kelly.dialogue.during_collect.2=That's two stacks of them, if you're struggling to do the math! +npcs_thepark.kelly.dialogue.after_collecting.1=Oh, that's amazing! Thank you so much! +npcs_thepark.kelly.dialogue.after_collecting.2=Now I can take this all back to Charlie, and say I did it! +npcs_thepark.kelly.dialogue.after_collecting.3=And then, with the coins he gives me, I can get a Spruce Minion! +npcs_thepark.kelly.dialogue.after_collecting.4=You should check out the Dark Thicket next. Be careful though! +npcs_thepark.kelly.dialogue.after_collecting.5=I've heard some people are holding a Cult Meeting there RIGHT NOW! +npcs_thepark.kelly.dialogue.idle_1.1=I talk a lot, so I've learned to just tune myself out +npcs_thepark.kelly.dialogue.idle_2.1=I can't control what I say to people. I spend the whole day talking. +npcs_thepark.kelly.dialogue.idle_3.1=Did you check out the Cult over in the Dark Thicket yet. # Melody -npcs_thepark.melody.dialogue.intro = Hello! ♫ -npcs_thepark.melody.dialogue.option = Yes, I'm fine, though my beloved Harp was broken to pieces by the storm.|If you would be so willing, could you bring me the materials so that I may make another?|My brother was on his way to help, but you got here first.|If you'd be so kind as to bring me 512 Acacia Logs, I'll be able to do the rest -npcs_thepark.melody.dialogue.thank_you = Thank you so much! ❤|I already have some string, so I can just use this wood to fashion the frame of the harp.|Now, if I'm doing this right, this goes here and...|It worked! This harp looks and sounds even more beautiful than the last! ♪|Thank you for your help - please take this as a reward.|Talk to me again if you ever want to givee my Harp a try! +npcs_thepark.melody.dialogue.intro.1=Hello! ♫ +npcs_thepark.melody.dialogue.option.1=Yes, I'm fine, though my beloved Harp was broken to pieces by the storm. +npcs_thepark.melody.dialogue.option.2=If you would be so willing, could you bring me the materials so that I may make another? +npcs_thepark.melody.dialogue.option.3=My brother was on his way to help, but you got here first. +npcs_thepark.melody.dialogue.option.4=If you'd be so kind as to bring me 512 Acacia Logs, I'll be able to do the rest +npcs_thepark.melody.dialogue.thank_you.1=Thank you so much! ❤ +npcs_thepark.melody.dialogue.thank_you.2=I already have some string, so I can just use this wood to fashion the frame of the harp. +npcs_thepark.melody.dialogue.thank_you.3=Now, if I'm doing this right, this goes here and... +npcs_thepark.melody.dialogue.thank_you.4=It worked! This harp looks and sounds even more beautiful than the last! ♪ +npcs_thepark.melody.dialogue.thank_you.5=Thank you for your help - please take this as a reward. +npcs_thepark.melody.dialogue.thank_you.6=Talk to me again if you ever want to givee my Harp a try! # Romero -npcs_thepark.romero.dialogue.romero_bring_item = Bring the item I gave you to Juliette! -npcs_thepark.romero.dialogue.romero_bring_item_missing = Bring the item I gave you to Juliette!|If you lost the item, we can fix that!|Although, you will have to cover my expenses, considering the sentimental value... -npcs_thepark.romero.dialogue.r_q1_start = I'm... trying to find gold...|but I can only find sand and stone here!|I heard of a gold mine in the Savanna Woodland.|I'd like to craft a gift for my beloved Juliette.|Could you find some gold for me, please? -npcs_thepark.romero.dialogue.r_q1_complete = Thank you so much!|Here, could you do me a favor and bring this gift back to Juliette? -npcs_thepark.romero.dialogue.r_q2_start = Groceries?|Haha!|I'm here to get a flower bouquet for Juliette.|Could you help out and get some flowers? -npcs_thepark.romero.dialogue.r_q2_wrong_material = I was thinking of a bouquet of roses. -npcs_thepark.romero.dialogue.r_q2_1_poppy = Just one? That's not much of a bouquet! -npcs_thepark.romero.dialogue.r_q2_2_7_poppies = Going to need a few more than that! -npcs_thepark.romero.dialogue.r_q2_8_11_poppies = I love roses! Can you get more? -npcs_thepark.romero.dialogue.r_q2_12_14_poppies = That's a lot of flowers! Maybe a few more... -npcs_thepark.romero.dialogue.r_q2_complete = Wow, they're beautiful!|Please bring the bouquet to Juliette! -npcs_thepark.romero.dialogue.r_q3_start = I love emeralds!|There's emerald on everything I like!|This one can't be dislodged!|Could you bring me some emerald? -npcs_thepark.romero.dialogue.r_q3_insufficient = I'm going to need a full stack of those! -npcs_thepark.romero.dialogue.r_q3_enchanted_emerald = Very cool, but regular emeralds will do the trick. -npcs_thepark.romero.dialogue.r_q3_enchanted_block = Although I adore this pristine piece of emerald, I don't need it yet. -npcs_thepark.romero.dialogue.r_q3_block = I don't need a whole block! -npcs_thepark.romero.dialogue.r_q3_complete = Am|-az-|-ing!|Now bring this gift to Juliette! -npcs_thepark.romero.dialogue.r_q4_start = Hey, you again!|I wanted mushrooms to concoct a stew,|but these big red ones won't cut it.|I need some decent mushrooms. -npcs_thepark.romero.dialogue.r_q4_red_mushroom = I can't cook a gourmet stew with tiny mushrooms!|I need bigger ones! -npcs_thepark.romero.dialogue.r_q4_brown_mushroom = That's not the color of mushroom I'm looking for. -npcs_thepark.romero.dialogue.r_q4_red_block = Sweet! Just what I need!|EXCEPT... Could you enchant it?|I need the perfect stew for my beloved Juliette. -npcs_thepark.romero.dialogue.r_q4_brown_block = That's a big mushroom that I don't need.|It's well known that good stews aren't made from brown mushrooms. -npcs_thepark.romero.dialogue.r_q4_enchanted_brown_block = I need red mushrooms. -npcs_thepark.romero.dialogue.r_q4_complete = Fantastic!|There's some stew for Juliette!|Mmh! Tastes great! -npcs_thepark.romero.dialogue.r_q5_start = So cold! I wish I had coffee right now...|I want to reach the moon for Juliette.|Literally!|I wish I could jump like a Rabbit and grab a chunk of it. -npcs_thepark.romero.dialogue.r_q5_wrong_potion = A potion might do the trick, but not quite that one. -npcs_thepark.romero.dialogue.r_q5_rabbit_not_6 = Rabbit potion? Sounds great!|Although... could you bring a more potent one?|I don't want to take any chances! -npcs_thepark.romero.dialogue.r_q5_no_coffee = Awesome potion!|Any chance you could have it taste like coffee?|Come back with a caffeinated beverage, thanks! -npcs_thepark.romero.dialogue.r_q5_complete = Thanks!|See ya later!|Bring the chunk to Juliette! -npcs_thepark.romero.dialogue.r_q6_start = Hi friend!|I want to make a secret gift for Juliette.|I collected tons of gold...|Now I just need enough heat to melt it! -npcs_thepark.romero.dialogue.r_q6_flint = That's not even close to hot! -npcs_thepark.romero.dialogue.r_q6_lava = *tastes it*|This is the kind of lava I need...|Except I need hotter. -npcs_thepark.romero.dialogue.r_q6_magical_lava = This is too magical for my taste. -npcs_thepark.romero.dialogue.r_q6_complete = Perfect!|Thank you so much for helping with all my gift ideas.|Can you bring this one to Juliette? -npcs_thepark.romero.dialogue.r_q7_start = I'm trying to solve this Rubix Prism.|Going to need someone wicked smart to solve it. -npcs_thepark.romero.dialogue.r_q7_low_int = You're pretty smart.|I bet you wish you were smarter, though! -npcs_thepark.romero.dialogue.r_q7_mid_int = While very astute,|you don't have quite what it takes for the Prism! -npcs_thepark.romero.dialogue.r_q7_high_int = Can you somehow get even more intelligence? -npcs_thepark.romero.dialogue.r_q7_almost_genius = I can definitely see it, your brain barely fits your head.|Just not quite genius enough to solve the Prism! -npcs_thepark.romero.dialogue.r_q7_threshold = If I was to quantify it, I'd say you need 1,291 Intelligence. -npcs_thepark.romero.dialogue.r_q7_complete = Incredible!|You solved the Prism!|Please, bring it to Juliette and show her how smart I am. -npcs_thepark.romero.dialogue.r_q8_start = Juliette keeps talking to me about this other person.|I don't know what's going on, they meet over and over!|Our love is stronger than theirs!|I'm waiting for this other person to show up.|I'll need my favorite weapon, can you fetch it for me? -npcs_thepark.romero.dialogue.r_q8_jerry = Go away. -npcs_thepark.romero.dialogue.r_q8_emerald = That's not even a weapon!|I do like it though! -npcs_thepark.romero.dialogue.r_q8_weak_sword = That sword is weak!|Besides, would you really give it to me? -npcs_thepark.romero.dialogue.r_q8_complete = This is exactly what I need!|Now I just have to wait for the pretendent.|Please bring this poem to Juliette.|I hope she'll see the reason. -npcs_thepark.romero.dialogue.r_q9_start = It's you, {player}!|I need your help to win Juliette back.|My plan is to assemble the greatest bouquet ever!|I need a ridiculous amount of flowers. -npcs_thepark.romero.dialogue.r_q9_complete = That's exquisite!!|With this, I can get enough flowers to win Juliette back! -npcs_thepark.romero.dialogue.r_q10_before_suit = {player}! You're the best person to turn the day into something memorable!|But first, you should wear something nice! -npcs_thepark.romero.dialogue.r_q10_after_suit = Looking slick!|You really look stunning!|Thank you so much for reuniting Juliette and I.|Please, one last time, give this to Juliette. -npcs_thepark.romero.dialogue.idle = I love Juliette! +npcs_thepark.romero.dialogue.romero_bring_item.1=Bring the item I gave you to Juliette! +npcs_thepark.romero.dialogue.romero_bring_item_missing.1=Bring the item I gave you to Juliette! +npcs_thepark.romero.dialogue.romero_bring_item_missing.2=If you lost the item, we can fix that! +npcs_thepark.romero.dialogue.romero_bring_item_missing.3=Although, you will have to cover my expenses, considering the sentimental value... +npcs_thepark.romero.dialogue.r_q1_start.1=I'm... trying to find gold... +npcs_thepark.romero.dialogue.r_q1_start.2=but I can only find sand and stone here! +npcs_thepark.romero.dialogue.r_q1_start.3=I heard of a gold mine in the Savanna Woodland. +npcs_thepark.romero.dialogue.r_q1_start.4=I'd like to craft a gift for my beloved Juliette. +npcs_thepark.romero.dialogue.r_q1_start.5=Could you find some gold for me, please? +npcs_thepark.romero.dialogue.r_q1_complete.1=Thank you so much! +npcs_thepark.romero.dialogue.r_q1_complete.2=Here, could you do me a favor and bring this gift back to Juliette? +npcs_thepark.romero.dialogue.r_q2_start.1=Groceries? +npcs_thepark.romero.dialogue.r_q2_start.2=Haha! +npcs_thepark.romero.dialogue.r_q2_start.3=I'm here to get a flower bouquet for Juliette. +npcs_thepark.romero.dialogue.r_q2_start.4=Could you help out and get some flowers? +npcs_thepark.romero.dialogue.r_q2_wrong_material.1=I was thinking of a bouquet of roses. +npcs_thepark.romero.dialogue.r_q2_1_poppy.1=Just one? That's not much of a bouquet! +npcs_thepark.romero.dialogue.r_q2_2_7_poppies.1=Going to need a few more than that! +npcs_thepark.romero.dialogue.r_q2_8_11_poppies.1=I love roses! Can you get more? +npcs_thepark.romero.dialogue.r_q2_12_14_poppies.1=That's a lot of flowers! Maybe a few more... +npcs_thepark.romero.dialogue.r_q2_complete.1=Wow, they're beautiful! +npcs_thepark.romero.dialogue.r_q2_complete.2=Please bring the bouquet to Juliette! +npcs_thepark.romero.dialogue.r_q3_start.1=I love emeralds! +npcs_thepark.romero.dialogue.r_q3_start.2=There's emerald on everything I like! +npcs_thepark.romero.dialogue.r_q3_start.3=This one can't be dislodged! +npcs_thepark.romero.dialogue.r_q3_start.4=Could you bring me some emerald? +npcs_thepark.romero.dialogue.r_q3_insufficient.1=I'm going to need a full stack of those! +npcs_thepark.romero.dialogue.r_q3_enchanted_emerald.1=Very cool, but regular emeralds will do the trick. +npcs_thepark.romero.dialogue.r_q3_enchanted_block.1=Although I adore this pristine piece of emerald, I don't need it yet. +npcs_thepark.romero.dialogue.r_q3_block.1=I don't need a whole block! +npcs_thepark.romero.dialogue.r_q3_complete.1=Am +npcs_thepark.romero.dialogue.r_q3_complete.2=-az- +npcs_thepark.romero.dialogue.r_q3_complete.3=-ing! +npcs_thepark.romero.dialogue.r_q3_complete.4=Now bring this gift to Juliette! +npcs_thepark.romero.dialogue.r_q4_start.1=Hey, you again! +npcs_thepark.romero.dialogue.r_q4_start.2=I wanted mushrooms to concoct a stew, +npcs_thepark.romero.dialogue.r_q4_start.3=but these big red ones won't cut it. +npcs_thepark.romero.dialogue.r_q4_start.4=I need some decent mushrooms. +npcs_thepark.romero.dialogue.r_q4_red_mushroom.1=I can't cook a gourmet stew with tiny mushrooms! +npcs_thepark.romero.dialogue.r_q4_red_mushroom.2=I need bigger ones! +npcs_thepark.romero.dialogue.r_q4_brown_mushroom.1=That's not the color of mushroom I'm looking for. +npcs_thepark.romero.dialogue.r_q4_red_block.1=Sweet! Just what I need! +npcs_thepark.romero.dialogue.r_q4_red_block.2=EXCEPT... Could you enchant it? +npcs_thepark.romero.dialogue.r_q4_red_block.3=I need the perfect stew for my beloved Juliette. +npcs_thepark.romero.dialogue.r_q4_brown_block.1=That's a big mushroom that I don't need. +npcs_thepark.romero.dialogue.r_q4_brown_block.2=It's well known that good stews aren't made from brown mushrooms. +npcs_thepark.romero.dialogue.r_q4_enchanted_brown_block.1=I need red mushrooms. +npcs_thepark.romero.dialogue.r_q4_complete.1=Fantastic! +npcs_thepark.romero.dialogue.r_q4_complete.2=There's some stew for Juliette! +npcs_thepark.romero.dialogue.r_q4_complete.3=Mmh! Tastes great! +npcs_thepark.romero.dialogue.r_q5_start.1=So cold! I wish I had coffee right now... +npcs_thepark.romero.dialogue.r_q5_start.2=I want to reach the moon for Juliette. +npcs_thepark.romero.dialogue.r_q5_start.3=Literally! +npcs_thepark.romero.dialogue.r_q5_start.4=I wish I could jump like a Rabbit and grab a chunk of it. +npcs_thepark.romero.dialogue.r_q5_wrong_potion.1=A potion might do the trick, but not quite that one. +npcs_thepark.romero.dialogue.r_q5_rabbit_not_6.1=Rabbit potion? Sounds great! +npcs_thepark.romero.dialogue.r_q5_rabbit_not_6.2=Although... could you bring a more potent one? +npcs_thepark.romero.dialogue.r_q5_rabbit_not_6.3=I don't want to take any chances! +npcs_thepark.romero.dialogue.r_q5_no_coffee.1=Awesome potion! +npcs_thepark.romero.dialogue.r_q5_no_coffee.2=Any chance you could have it taste like coffee? +npcs_thepark.romero.dialogue.r_q5_no_coffee.3=Come back with a caffeinated beverage, thanks! +npcs_thepark.romero.dialogue.r_q5_complete.1=Thanks! +npcs_thepark.romero.dialogue.r_q5_complete.2=See ya later! +npcs_thepark.romero.dialogue.r_q5_complete.3=Bring the chunk to Juliette! +npcs_thepark.romero.dialogue.r_q6_start.1=Hi friend! +npcs_thepark.romero.dialogue.r_q6_start.2=I want to make a secret gift for Juliette. +npcs_thepark.romero.dialogue.r_q6_start.3=I collected tons of gold... +npcs_thepark.romero.dialogue.r_q6_start.4=Now I just need enough heat to melt it! +npcs_thepark.romero.dialogue.r_q6_flint.1=That's not even close to hot! +npcs_thepark.romero.dialogue.r_q6_lava.1=*tastes it* +npcs_thepark.romero.dialogue.r_q6_lava.2=This is the kind of lava I need... +npcs_thepark.romero.dialogue.r_q6_lava.3=Except I need hotter. +npcs_thepark.romero.dialogue.r_q6_magical_lava.1=This is too magical for my taste. +npcs_thepark.romero.dialogue.r_q6_complete.1=Perfect! +npcs_thepark.romero.dialogue.r_q6_complete.2=Thank you so much for helping with all my gift ideas. +npcs_thepark.romero.dialogue.r_q6_complete.3=Can you bring this one to Juliette? +npcs_thepark.romero.dialogue.r_q7_start.1=I'm trying to solve this Rubix Prism. +npcs_thepark.romero.dialogue.r_q7_start.2=Going to need someone wicked smart to solve it. +npcs_thepark.romero.dialogue.r_q7_low_int.1=You're pretty smart. +npcs_thepark.romero.dialogue.r_q7_low_int.2=I bet you wish you were smarter, though! +npcs_thepark.romero.dialogue.r_q7_mid_int.1=While very astute, +npcs_thepark.romero.dialogue.r_q7_mid_int.2=you don't have quite what it takes for the Prism! +npcs_thepark.romero.dialogue.r_q7_high_int.1=Can you somehow get even more intelligence? +npcs_thepark.romero.dialogue.r_q7_almost_genius.1=I can definitely see it, your brain barely fits your head. +npcs_thepark.romero.dialogue.r_q7_almost_genius.2=Just not quite genius enough to solve the Prism! +npcs_thepark.romero.dialogue.r_q7_threshold.1=If I was to quantify it, I'd say you need 1,291 Intelligence. +npcs_thepark.romero.dialogue.r_q7_complete.1=Incredible! +npcs_thepark.romero.dialogue.r_q7_complete.2=You solved the Prism! +npcs_thepark.romero.dialogue.r_q7_complete.3=Please, bring it to Juliette and show her how smart I am. +npcs_thepark.romero.dialogue.r_q8_start.1=Juliette keeps talking to me about this other person. +npcs_thepark.romero.dialogue.r_q8_start.2=I don't know what's going on, they meet over and over! +npcs_thepark.romero.dialogue.r_q8_start.3=Our love is stronger than theirs! +npcs_thepark.romero.dialogue.r_q8_start.4=I'm waiting for this other person to show up. +npcs_thepark.romero.dialogue.r_q8_start.5=I'll need my favorite weapon, can you fetch it for me? +npcs_thepark.romero.dialogue.r_q8_jerry.1=Go away. +npcs_thepark.romero.dialogue.r_q8_emerald.1=That's not even a weapon! +npcs_thepark.romero.dialogue.r_q8_emerald.2=I do like it though! +npcs_thepark.romero.dialogue.r_q8_weak_sword.1=That sword is weak! +npcs_thepark.romero.dialogue.r_q8_weak_sword.2=Besides, would you really give it to me? +npcs_thepark.romero.dialogue.r_q8_complete.1=This is exactly what I need! +npcs_thepark.romero.dialogue.r_q8_complete.2=Now I just have to wait for the pretendent. +npcs_thepark.romero.dialogue.r_q8_complete.3=Please bring this poem to Juliette. +npcs_thepark.romero.dialogue.r_q8_complete.4=I hope she'll see the reason. +npcs_thepark.romero.dialogue.r_q9_start.1=It's you, {player}! +npcs_thepark.romero.dialogue.r_q9_start.2=I need your help to win Juliette back. +npcs_thepark.romero.dialogue.r_q9_start.3=My plan is to assemble the greatest bouquet ever! +npcs_thepark.romero.dialogue.r_q9_start.4=I need a ridiculous amount of flowers. +npcs_thepark.romero.dialogue.r_q9_complete.1=That's exquisite!! +npcs_thepark.romero.dialogue.r_q9_complete.2=With this, I can get enough flowers to win Juliette back! +npcs_thepark.romero.dialogue.r_q10_before_suit.1={player}! You're the best person to turn the day into something memorable! +npcs_thepark.romero.dialogue.r_q10_before_suit.2=But first, you should wear something nice! +npcs_thepark.romero.dialogue.r_q10_after_suit.1=Looking slick! +npcs_thepark.romero.dialogue.r_q10_after_suit.2=You really look stunning! +npcs_thepark.romero.dialogue.r_q10_after_suit.3=Thank you so much for reuniting Juliette and I. +npcs_thepark.romero.dialogue.r_q10_after_suit.4=Please, one last time, give this to Juliette. +npcs_thepark.romero.dialogue.idle.1=I love Juliette! # Juliette -npcs_thepark.juliette.dialogue.completing_step_not_holding = You found Romero?|Did he have anything for me? -npcs_thepark.juliette.dialogue.q1_start = Nice to meet you!|Could you find my dear Romero?|He's in a cave somewhere under the Savanna Woodland.|...|Oh!|He wears glasses and blends well in a crowd! -npcs_thepark.juliette.dialogue.q1_complete = You found Romero? That's weird, I just saw him!|He wanted me to have this? So sweet!|...|A yellow rock? What's the point of that?|Here, you keep it! -npcs_thepark.juliette.dialogue.q2_start = Since you're here, can you find Romero again?|He said he was getting groceries at the downtown markets. -npcs_thepark.juliette.dialogue.q2_complete = Romero? He just came over with the groceries.|These flowers are for me?|That's so kind of you!|You know I'm with Romero, right? -npcs_thepark.juliette.dialogue.q3_start = Dear, sorry for the inconvenience...|Can you please find Romero again?|He's at some sort of emerald altar... -npcs_thepark.juliette.dialogue.q3_complete = Oof! Why did you bring this all the way here?|How is that a gift?|Just keep it! I don't want this! -npcs_thepark.juliette.dialogue.q4_start = What I want is Romero!|For some reason, he's now looking for...|The largest, most evil patch of fungus ever! -npcs_thepark.juliette.dialogue.q4_complete = Stew? I love stew!|...|!!!|Yuck!!!|Yuck!!!|Yuck!!!|Yuck!!!|Yuck!!!|DISGUSTING!|Is that a stew from hell?|Maybe Romero should give you cooking lessons! -npcs_thepark.juliette.dialogue.q5_start = Oh! I love Romero! He has so many skills.|Did you know he likes photography?|Just now, he went to take pictures of the old castle.|Go find him! -npcs_thepark.juliette.dialogue.q5_complete = You really believe that this is from the Moon?|How? Someone flew up there?|Thanks, I guess.|Actually, I heard Romero flew close to the Sun.|Sounds more like a metaphor, like... -npcs_thepark.juliette.dialogue.q6_start = He went to where gold is smelted.|Please find him, wherever that is! -npcs_thepark.juliette.dialogue.q6_complete = This is a wonderful gift!|I will keep this one for myself.|Sometimes, some things have to remain a mystery. -npcs_thepark.juliette.dialogue.q7_start = About something not so secret, can you get in touch with Romero?|He told me he's in his home. -npcs_thepark.juliette.dialogue.q7_complete = Uh? Romero solved his cube?|That's unbelievable.|No, really, I don't believe it at all. -npcs_thepark.juliette.dialogue.q8_start = I don't know why Romero is trying to be so unlike himself lately.|I like him just the way he is!|He says he's getting equipment for a duel.|Can you find Romero before he hurts himself? -npcs_thepark.juliette.dialogue.q8_complete = This is a wonderful poem.|But, does he really think there's someone else?|I can't possibly imagine why he'd think that. -npcs_thepark.juliette.dialogue.q9_start = Romero went to meditate at his retreat.|It's the smallest house in SkyBlock.|Please find him, I'm worried! -npcs_thepark.juliette.dialogue.q9_complete = Another gift from Romero?|Thank you for delivering it.|I don't know how Romero has such hard a time understanding that I LOVE HIM.|I like him just the way he is!|I don't need tons of gifts to know that. -npcs_thepark.juliette.dialogue.q10_before_suit = It's decided, this is the day!|We're making it official! -npcs_thepark.juliette.dialogue.q10_after_suit = We can't thank you enough for bringing us together!|You're the best, {player}! +npcs_thepark.juliette.dialogue.completing_step_not_holding.1=You found Romero? +npcs_thepark.juliette.dialogue.completing_step_not_holding.2=Did he have anything for me? +npcs_thepark.juliette.dialogue.q1_start.1=Nice to meet you! +npcs_thepark.juliette.dialogue.q1_start.2=Could you find my dear Romero? +npcs_thepark.juliette.dialogue.q1_start.3=He's in a cave somewhere under the Savanna Woodland. +npcs_thepark.juliette.dialogue.q1_start.4=... +npcs_thepark.juliette.dialogue.q1_start.5=Oh! +npcs_thepark.juliette.dialogue.q1_start.6=He wears glasses and blends well in a crowd! +npcs_thepark.juliette.dialogue.q1_complete.1=You found Romero? That's weird, I just saw him! +npcs_thepark.juliette.dialogue.q1_complete.2=He wanted me to have this? So sweet! +npcs_thepark.juliette.dialogue.q1_complete.3=... +npcs_thepark.juliette.dialogue.q1_complete.4=A yellow rock? What's the point of that? +npcs_thepark.juliette.dialogue.q1_complete.5=Here, you keep it! +npcs_thepark.juliette.dialogue.q2_start.1=Since you're here, can you find Romero again? +npcs_thepark.juliette.dialogue.q2_start.2=He said he was getting groceries at the downtown markets. +npcs_thepark.juliette.dialogue.q2_complete.1=Romero? He just came over with the groceries. +npcs_thepark.juliette.dialogue.q2_complete.2=These flowers are for me? +npcs_thepark.juliette.dialogue.q2_complete.3=That's so kind of you! +npcs_thepark.juliette.dialogue.q2_complete.4=You know I'm with Romero, right? +npcs_thepark.juliette.dialogue.q3_start.1=Dear, sorry for the inconvenience... +npcs_thepark.juliette.dialogue.q3_start.2=Can you please find Romero again? +npcs_thepark.juliette.dialogue.q3_start.3=He's at some sort of emerald altar... +npcs_thepark.juliette.dialogue.q3_complete.1=Oof! Why did you bring this all the way here? +npcs_thepark.juliette.dialogue.q3_complete.2=How is that a gift? +npcs_thepark.juliette.dialogue.q3_complete.3=Just keep it! I don't want this! +npcs_thepark.juliette.dialogue.q4_start.1=What I want is Romero! +npcs_thepark.juliette.dialogue.q4_start.2=For some reason, he's now looking for... +npcs_thepark.juliette.dialogue.q4_start.3=The largest, most evil patch of fungus ever! +npcs_thepark.juliette.dialogue.q4_complete.1=Stew? I love stew! +npcs_thepark.juliette.dialogue.q4_complete.2=... +npcs_thepark.juliette.dialogue.q4_complete.3=!!! +npcs_thepark.juliette.dialogue.q4_complete.4=Yuck!!! +npcs_thepark.juliette.dialogue.q4_complete.5=Yuck!!! +npcs_thepark.juliette.dialogue.q4_complete.6=Yuck!!! +npcs_thepark.juliette.dialogue.q4_complete.7=Yuck!!! +npcs_thepark.juliette.dialogue.q4_complete.8=Yuck!!! +npcs_thepark.juliette.dialogue.q4_complete.9=DISGUSTING! +npcs_thepark.juliette.dialogue.q4_complete.10=Is that a stew from hell? +npcs_thepark.juliette.dialogue.q4_complete.11=Maybe Romero should give you cooking lessons! +npcs_thepark.juliette.dialogue.q5_start.1=Oh! I love Romero! He has so many skills. +npcs_thepark.juliette.dialogue.q5_start.2=Did you know he likes photography? +npcs_thepark.juliette.dialogue.q5_start.3=Just now, he went to take pictures of the old castle. +npcs_thepark.juliette.dialogue.q5_start.4=Go find him! +npcs_thepark.juliette.dialogue.q5_complete.1=You really believe that this is from the Moon? +npcs_thepark.juliette.dialogue.q5_complete.2=How? Someone flew up there? +npcs_thepark.juliette.dialogue.q5_complete.3=Thanks, I guess. +npcs_thepark.juliette.dialogue.q5_complete.4=Actually, I heard Romero flew close to the Sun. +npcs_thepark.juliette.dialogue.q5_complete.5=Sounds more like a metaphor, like... +npcs_thepark.juliette.dialogue.q6_start.1=He went to where gold is smelted. +npcs_thepark.juliette.dialogue.q6_start.2=Please find him, wherever that is! +npcs_thepark.juliette.dialogue.q6_complete.1=This is a wonderful gift! +npcs_thepark.juliette.dialogue.q6_complete.2=I will keep this one for myself. +npcs_thepark.juliette.dialogue.q6_complete.3=Sometimes, some things have to remain a mystery. +npcs_thepark.juliette.dialogue.q7_start.1=About something not so secret, can you get in touch with Romero? +npcs_thepark.juliette.dialogue.q7_start.2=He told me he's in his home. +npcs_thepark.juliette.dialogue.q7_complete.1=Uh? Romero solved his cube? +npcs_thepark.juliette.dialogue.q7_complete.2=That's unbelievable. +npcs_thepark.juliette.dialogue.q7_complete.3=No, really, I don't believe it at all. +npcs_thepark.juliette.dialogue.q8_start.1=I don't know why Romero is trying to be so unlike himself lately. +npcs_thepark.juliette.dialogue.q8_start.2=I like him just the way he is! +npcs_thepark.juliette.dialogue.q8_start.3=He says he's getting equipment for a duel. +npcs_thepark.juliette.dialogue.q8_start.4=Can you find Romero before he hurts himself? +npcs_thepark.juliette.dialogue.q8_complete.1=This is a wonderful poem. +npcs_thepark.juliette.dialogue.q8_complete.2=But, does he really think there's someone else? +npcs_thepark.juliette.dialogue.q8_complete.3=I can't possibly imagine why he'd think that. +npcs_thepark.juliette.dialogue.q9_start.1=Romero went to meditate at his retreat. +npcs_thepark.juliette.dialogue.q9_start.2=It's the smallest house in SkyBlock. +npcs_thepark.juliette.dialogue.q9_start.3=Please find him, I'm worried! +npcs_thepark.juliette.dialogue.q9_complete.1=Another gift from Romero? +npcs_thepark.juliette.dialogue.q9_complete.2=Thank you for delivering it. +npcs_thepark.juliette.dialogue.q9_complete.3=I don't know how Romero has such hard a time understanding that I LOVE HIM. +npcs_thepark.juliette.dialogue.q9_complete.4=I like him just the way he is! +npcs_thepark.juliette.dialogue.q9_complete.5=I don't need tons of gifts to know that. +npcs_thepark.juliette.dialogue.q10_before_suit.1=It's decided, this is the day! +npcs_thepark.juliette.dialogue.q10_before_suit.2=We're making it official! +npcs_thepark.juliette.dialogue.q10_after_suit.1=We can't thank you enough for bringing us together! +npcs_thepark.juliette.dialogue.q10_after_suit.2=You're the best, {player}! # Charlie -npcs_thepark.charlie.dialogue.initial_hello = Howdy! Yer a friend of Lumber Jack, are ya?|Well, works for me!|I need 64 Birch Logs. Could you grab 'em for me?|Do that, and then we can talk! -npcs_thepark.charlie.dialogue.talk_again = The Park is home to many different kinds of wood. Each kind has its own collection.|Me and my mates each gather a specific type of wood, and then split it all evenly so we can all increase our different collections!|I wanted Kelly to get some Spruce Logs for us today, but I've not seen her in a while... Can you maybe look for her in the Spruce Woods? -npcs_thepark.charlie.dialogue.idle_1 = So much wood to chop, such little time... -npcs_thepark.charlie.dialogue.idle_2 = So you heard about that weird Cult over in the Dark Thicket? I'm considerin' joining them. -npcs_thepark.charlie.dialogue.idle_3 = What? Lumber Jack said I have a Treecapitator? In my dreams... +npcs_thepark.charlie.dialogue.initial_hello.1=Howdy! Yer a friend of Lumber Jack, are ya? +npcs_thepark.charlie.dialogue.initial_hello.2=Well, works for me! +npcs_thepark.charlie.dialogue.initial_hello.3=I need 64 Birch Logs. Could you grab 'em for me? +npcs_thepark.charlie.dialogue.initial_hello.4=Do that, and then we can talk! +npcs_thepark.charlie.dialogue.talk_again.1=The Park is home to many different kinds of wood. Each kind has its own collection. +npcs_thepark.charlie.dialogue.talk_again.2=Me and my mates each gather a specific type of wood, and then split it all evenly so we can all increase our different collections! +npcs_thepark.charlie.dialogue.talk_again.3=I wanted Kelly to get some Spruce Logs for us today, but I've not seen her in a while... Can you maybe look for her in the Spruce Woods? +npcs_thepark.charlie.dialogue.idle_1.1=So much wood to chop, such little time... +npcs_thepark.charlie.dialogue.idle_2.1=So you heard about that weird Cult over in the Dark Thicket? I'm considerin' joining them. +npcs_thepark.charlie.dialogue.idle_3.1=What? Lumber Jack said I have a Treecapitator? In my dreams... # Molbert -npcs_thepark.molbert.dialogue.intro = Moles, you see. They have been burrowing everywhere, their tunnels are disrupting the landscape, they ruined the beauty of this place. It's gotten hard to ignore.|You need an experienced person to handle the situation.|Those troublesome creatures are ruining everything and must be dealt with. Do you understand?|This park deserves better and I want see it flourish like it used to be.|Let us keep this between us, and I will generously reward you for your efforts.|The moles must be dealt with, and I am sure you will do so quickly and quietly. -npcs_thepark.molbert.dialogue.option_mole = Ridiculous! How could I be a mole if I am wearing human clothes, huh?|Have you seen moles wearing human clothes before?|I don't think so. Now get back to the issue! -npcs_thepark.molbert.dialogue.quick_intro = The moles must be dealt with, and I am sure you will do so quickly and quietly. -npcs_thepark.molbert.dialogue.option_sure = Great. First thing we need is to build some traps.|For that however, I need 512 Jungle Logs, should be enough to get things going.|Moles loooove carrots, they are just too good to resist.|Don't worry, I've got a stash ready.|Just thinking about them makes me... Uhm I mean makes them come out of their hiding space. -npcs_thepark.molbert.dialogue.after_resources = Fantastic, that's all I needed to build the traps.|It will take some time to assemble them, so you should come back later. -npcs_thepark.molbert.dialogue.after_coming_back = The traps are ready for use; All that remains is to set them up in the right place. Once you find the ideal spots, go ahead and deploy them. -npcs_thepark.molbert.dialogue.after_placing_traps = Good job, partner. Now we only need to wait for the right moment for these pests to show up.|This might take some time, so you should come back later. -npcs_thepark.molbert.dialogue.stuck = Hey.. uhm partner! I swear it's not what you think!|Could you lend me a hand here, I can explain everything! -npcs_thepark.molbert.dialogue.explain = Thank you so much, I was stuck there for at least ??? minutes, I was almost gone for good.|I.. I must have slipped by accident and then fell right into the trap! ... Yes, that's what happened!|...and then I ate the carrot because I was almost starving in there! -npcs_thepark.molbert.dialogue.option_iknow = Ok, fine you caught me. But please don't tell the others, they wouldn't want to be my friends anymore if they knew the truth.|Here, take this compensation for all the trouble I made you go through.|I hope you forgive me after this and we can still be friends. -npcs_thepark.molbert.dialogue.idle_1 = I wish I could be in love just like Romero & Juliette. -npcs_thepark.molbert.dialogue.idle_2 = I hope you forgive me after this and we can still be friends. +npcs_thepark.molbert.dialogue.intro.1=Moles, you see. They have been burrowing everywhere, their tunnels are disrupting the landscape, they ruined the beauty of this place. It's gotten hard to ignore. +npcs_thepark.molbert.dialogue.intro.2=You need an experienced person to handle the situation. +npcs_thepark.molbert.dialogue.intro.3=Those troublesome creatures are ruining everything and must be dealt with. Do you understand? +npcs_thepark.molbert.dialogue.intro.4=This park deserves better and I want see it flourish like it used to be. +npcs_thepark.molbert.dialogue.intro.5=Let us keep this between us, and I will generously reward you for your efforts. +npcs_thepark.molbert.dialogue.intro.6=The moles must be dealt with, and I am sure you will do so quickly and quietly. +npcs_thepark.molbert.dialogue.option_mole.1=Ridiculous! How could I be a mole if I am wearing human clothes, huh? +npcs_thepark.molbert.dialogue.option_mole.2=Have you seen moles wearing human clothes before? +npcs_thepark.molbert.dialogue.option_mole.3=I don't think so. Now get back to the issue! +npcs_thepark.molbert.dialogue.quick_intro.1=The moles must be dealt with, and I am sure you will do so quickly and quietly. +npcs_thepark.molbert.dialogue.option_sure.1=Great. First thing we need is to build some traps. +npcs_thepark.molbert.dialogue.option_sure.2=For that however, I need 512 Jungle Logs, should be enough to get things going. +npcs_thepark.molbert.dialogue.option_sure.3=Moles loooove carrots, they are just too good to resist. +npcs_thepark.molbert.dialogue.option_sure.4=Don't worry, I've got a stash ready. +npcs_thepark.molbert.dialogue.option_sure.5=Just thinking about them makes me... Uhm I mean makes them come out of their hiding space. +npcs_thepark.molbert.dialogue.after_resources.1=Fantastic, that's all I needed to build the traps. +npcs_thepark.molbert.dialogue.after_resources.2=It will take some time to assemble them, so you should come back later. +npcs_thepark.molbert.dialogue.after_coming_back.1=The traps are ready for use; All that remains is to set them up in the right place. Once you find the ideal spots, go ahead and deploy them. +npcs_thepark.molbert.dialogue.after_placing_traps.1=Good job, partner. Now we only need to wait for the right moment for these pests to show up. +npcs_thepark.molbert.dialogue.after_placing_traps.2=This might take some time, so you should come back later. +npcs_thepark.molbert.dialogue.stuck.1=Hey.. uhm partner! I swear it's not what you think! +npcs_thepark.molbert.dialogue.stuck.2=Could you lend me a hand here, I can explain everything! +npcs_thepark.molbert.dialogue.explain.1=Thank you so much, I was stuck there for at least ??? minutes, I was almost gone for good. +npcs_thepark.molbert.dialogue.explain.2=I.. I must have slipped by accident and then fell right into the trap! ... Yes, that's what happened! +npcs_thepark.molbert.dialogue.explain.3=...and then I ate the carrot because I was almost starving in there! +npcs_thepark.molbert.dialogue.option_iknow.1=Ok, fine you caught me. But please don't tell the others, they wouldn't want to be my friends anymore if they knew the truth. +npcs_thepark.molbert.dialogue.option_iknow.2=Here, take this compensation for all the trouble I made you go through. +npcs_thepark.molbert.dialogue.option_iknow.3=I hope you forgive me after this and we can still be friends. +npcs_thepark.molbert.dialogue.idle_1.1=I wish I could be in love just like Romero & Juliette. +npcs_thepark.molbert.dialogue.idle_2.1=I hope you forgive me after this and we can still be friends. # Ryan -npcs_thepark.ryan.dialogue.startled = AAAAHHHHH! Don't startle me like that bro!|Y'know, someone as stealthy as you could be a useful member of the Campfire Cult.|What do you say to that? -npcs_thepark.ryan.dialogue.accept = Cool! Anyways, there's just one thing you have to do before you can join.|Stand in the CAMPFIRE! -npcs_thepark.ryan.dialogue.accept_2 = Yeah don't worry, it's not as hot as it looks.|If you can last for 10 seconds while standing in the campfire, I'll give you a reward! -npcs_thepark.ryan.dialogue.talk = Wow, you did it!|Nice job, hotshot! I'd give you the Campfire Initiate Badge I right now, but I'm out of wood to make one with...|Sorry about that...|I need to keep watch and make sure nobody blows out thee Campfire, but if you can grab me 256 Dark Oak Logs, I'll make one for ya! -npcs_thepark.ryan.dialogue.give_logs = Thanks for the wood! Here's your badge, as promised!|A Campfire Initiate Badge I, for our latest initiate, {player}!|I can upgrade that badge for you as you survive more Campfire Trials, you know?|Simply stand in the campfire whenever you think you're ready!|But be careful, though, as each trial burns a little hotter than the last! +npcs_thepark.ryan.dialogue.startled.1=AAAAHHHHH! Don't startle me like that bro! +npcs_thepark.ryan.dialogue.startled.2=Y'know, someone as stealthy as you could be a useful member of the Campfire Cult. +npcs_thepark.ryan.dialogue.startled.3=What do you say to that? +npcs_thepark.ryan.dialogue.accept.1=Cool! Anyways, there's just one thing you have to do before you can join. +npcs_thepark.ryan.dialogue.accept.2=Stand in the CAMPFIRE! +npcs_thepark.ryan.dialogue.accept_2.1=Yeah don't worry, it's not as hot as it looks. +npcs_thepark.ryan.dialogue.accept_2.2=If you can last for 10 seconds while standing in the campfire, I'll give you a reward! +npcs_thepark.ryan.dialogue.talk.1=Wow, you did it! +npcs_thepark.ryan.dialogue.talk.2=Nice job, hotshot! I'd give you the Campfire Initiate Badge I right now, but I'm out of wood to make one with... +npcs_thepark.ryan.dialogue.talk.3=Sorry about that... +npcs_thepark.ryan.dialogue.talk.4=I need to keep watch and make sure nobody blows out thee Campfire, but if you can grab me 256 Dark Oak Logs, I'll make one for ya! +npcs_thepark.ryan.dialogue.give_logs.1=Thanks for the wood! Here's your badge, as promised! +npcs_thepark.ryan.dialogue.give_logs.2=A Campfire Initiate Badge I, for our latest initiate, {player}! +npcs_thepark.ryan.dialogue.give_logs.3=I can upgrade that badge for you as you survive more Campfire Trials, you know? +npcs_thepark.ryan.dialogue.give_logs.4=Simply stand in the campfire whenever you think you're ready! +npcs_thepark.ryan.dialogue.give_logs.5=But be careful, though, as each trial burns a little hotter than the last! # Melancholic Viking -npcs_thepark.melancholic_viking.dialogue.intro = I last saw the sea {years_months} ago.|I wish I could remember what it felt like!|Sadly, my memory is now my worst enemy.|Please, help me remember the sea. -npcs_thepark.melancholic_viking.dialogue.holding_boat = Wow!|A boat!|Throw them at people you hate -npcs_thepark.melancholic_viking.dialogue.starting_to_splash = YES! This totally reminds me of the sea!|Although... there were more fishes back then. -npcs_thepark.melancholic_viking.dialogue.enough_splashes = WOW! This feels just like on my Drakkar!|I suddenly feel so great!|Thanks for bringing joy joy to an old viking!|Take a look at my wares! -npcs_thepark.melancholic_viking.dialogue.splashing_no_requirements = Wow! Nice move! There just isn't the ambience to fully appreciate it. -npcs_thepark.melancholic_viking.dialogue.holding_ice = Don't you have some liquid water? -npcs_thepark.melancholic_viking.dialogue.holding_raw_fish = I prefer when the fishes are lively and go splish-splash in the water! -npcs_thepark.melancholic_viking.dialogue.holding_fishing_rod = It's a nice thought, but I don't feel like fishing right now. -npcs_thepark.melancholic_viking.dialogue.holding_magical_water_bucket = There's as much water here as an ocean.|If only you could pour it somewhere! +npcs_thepark.melancholic_viking.dialogue.intro.1=I last saw the sea {years_months} ago. +npcs_thepark.melancholic_viking.dialogue.intro.2=I wish I could remember what it felt like! +npcs_thepark.melancholic_viking.dialogue.intro.3=Sadly, my memory is now my worst enemy. +npcs_thepark.melancholic_viking.dialogue.intro.4=Please, help me remember the sea. +npcs_thepark.melancholic_viking.dialogue.holding_boat.1=Wow! +npcs_thepark.melancholic_viking.dialogue.holding_boat.2=A boat! +npcs_thepark.melancholic_viking.dialogue.holding_boat.3=Throw them at people you hate +npcs_thepark.melancholic_viking.dialogue.starting_to_splash.1=YES! This totally reminds me of the sea! +npcs_thepark.melancholic_viking.dialogue.starting_to_splash.2=Although... there were more fishes back then. +npcs_thepark.melancholic_viking.dialogue.enough_splashes.1=WOW! This feels just like on my Drakkar! +npcs_thepark.melancholic_viking.dialogue.enough_splashes.2=I suddenly feel so great! +npcs_thepark.melancholic_viking.dialogue.enough_splashes.3=Thanks for bringing joy joy to an old viking! +npcs_thepark.melancholic_viking.dialogue.enough_splashes.4=Take a look at my wares! +npcs_thepark.melancholic_viking.dialogue.splashing_no_requirements.1=Wow! Nice move! There just isn't the ambience to fully appreciate it. +npcs_thepark.melancholic_viking.dialogue.holding_ice.1=Don't you have some liquid water? +npcs_thepark.melancholic_viking.dialogue.holding_raw_fish.1=I prefer when the fishes are lively and go splish-splash in the water! +npcs_thepark.melancholic_viking.dialogue.holding_fishing_rod.1=It's a nice thought, but I don't feel like fishing right now. +npcs_thepark.melancholic_viking.dialogue.holding_magical_water_bucket.1=There's as much water here as an ocean. +npcs_thepark.melancholic_viking.dialogue.holding_magical_water_bucket.2=If only you could pour it somewhere! # Worker Xavier -npcs_thepark.worker_xavier.dialogue.intro = WOAH WOAH! Look out there!|There's been a huge storm! It knocked down a bunch of trees - it's been a safety hazard!|Oh my goodness! I forgot about Melody! She's still over on Melody's Plateau|Can you go and make sure she's okay? -npcs_thepark.worker_xavier.dialogue.idle = Acacia trees are native to the Savanna Woodland.|Don't feel bad about knocking them down - they regrow real fast! +npcs_thepark.worker_xavier.dialogue.intro.1=WOAH WOAH! Look out there! +npcs_thepark.worker_xavier.dialogue.intro.2=There's been a huge storm! It knocked down a bunch of trees - it's been a safety hazard! +npcs_thepark.worker_xavier.dialogue.intro.3=Oh my goodness! I forgot about Melody! She's still over on Melody's Plateau +npcs_thepark.worker_xavier.dialogue.intro.4=Can you go and make sure she's okay? +npcs_thepark.worker_xavier.dialogue.idle.1=Acacia trees are native to the Savanna Woodland. +npcs_thepark.worker_xavier.dialogue.idle.2=Don't feel bad about knocking them down - they regrow real fast! # Master Tactician Funk -npcs_thepark.master_tactician_funk.dialogue.intro = Welcome to the Woodlands!|I use all sorts of wood types to create strong and useful items!|Here. Check theme out! +npcs_thepark.master_tactician_funk.dialogue.intro.1=Welcome to the Woodlands! +npcs_thepark.master_tactician_funk.dialogue.intro.2=I use all sorts of wood types to create strong and useful items! +npcs_thepark.master_tactician_funk.dialogue.intro.3=Here. Check theme out! diff --git a/configuration/i18n/en_US/scoreboard.properties b/configuration/i18n/en_US/scoreboard.properties index 87d2abf5b..1aaf2a405 100644 --- a/configuration/i18n/en_US/scoreboard.properties +++ b/configuration/i18n/en_US/scoreboard.properties @@ -1,113 +1,114 @@ -# Scoreboard strings for all game types - # Common scoreboard.common.date_format = MM/dd/yy +scoreboard.common.date_line= scoreboard.common.footer = www.hypixel.net # SkyBlock Scoreboard -scoreboard.skyblock.title_base = SKYBLOCK -scoreboard.skyblock.coop_suffix = CO-OP -scoreboard.skyblock.purse_label = Purse: -scoreboard.skyblock.bits_label = Bits: +scoreboard.skyblock.title_base=SKYBLOCK +scoreboard.skyblock.calendar_date_line=" " +scoreboard.skyblock.calendar_time_line=" " +scoreboard.skyblock.region_line=" " +scoreboard.skyblock.election_votes_title=Year Votes +scoreboard.skyblock.election_candidate_line= +scoreboard.skyblock.purse_line=Purse: +scoreboard.skyblock.bits_line=Bits: scoreboard.skyblock.region_unknown = Unknown scoreboard.skyblock.objective_label = Objective -scoreboard.skyblock.dark_auction.time_left_label = Time Left: -scoreboard.skyblock.dark_auction.time_left_suffix = s +scoreboard.skyblock.objective_with_arrow=Objective +scoreboard.skyblock.objective_progress=(/) +scoreboard.skyblock.dark_auction.time_left_line=Time Left: s scoreboard.skyblock.dark_auction.current_item_label = Current Item: +scoreboard.skyblock.dark_auction.current_item_line= scoreboard.skyblock.dark_auction.waiting = Waiting... # Bed Wars Game Scoreboard scoreboard.bedwars_game.title_base = BED WARS -scoreboard.bedwars_game.map_label = Map: -scoreboard.bedwars_game.players_label = Players: -scoreboard.bedwars_game.starting_in_label = Starting in -scoreboard.bedwars_game.starting_in_suffix = s -scoreboard.bedwars_game.mode_label = Mode: +scoreboard.bedwars_game.map_line=Map: +scoreboard.bedwars_game.players_line=Players: / +scoreboard.bedwars_game.starting_in_line=Starting in s +scoreboard.bedwars_game.mode_line=Mode: scoreboard.bedwars_game.version_label = Version: v1.9 -scoreboard.bedwars_game.event_in_label = {event_name} in {time_left} +scoreboard.bedwars_game.event_in_line= in +scoreboard.bedwars_game.team_status_line= scoreboard.bedwars_game.bed_alive = \u2714 scoreboard.bedwars_game.bed_dead = \u2716 # Bed Wars Lobby Scoreboard scoreboard.bedwars_lobby.title_base = BED WARS -scoreboard.bedwars_lobby.level_label = Level: -scoreboard.bedwars_lobby.progress_label = Progress: -scoreboard.bedwars_lobby.progress_separator = / -scoreboard.bedwars_lobby.progress_bar_open = [ -scoreboard.bedwars_lobby.progress_bar_close = ] +scoreboard.bedwars_lobby.level_line=Level: +scoreboard.bedwars_lobby.progress_line=Progress: / +scoreboard.bedwars_lobby.progress_bar=[] scoreboard.bedwars_lobby.progress_bar_filled = \u25A0 scoreboard.bedwars_lobby.progress_bar_empty = \u25A0 -scoreboard.bedwars_lobby.tokens_label = Tokens: -scoreboard.bedwars_lobby.tickets_label = Tickets: -scoreboard.bedwars_lobby.tickets_max = /75 +scoreboard.bedwars_lobby.tokens_line=Tokens: +scoreboard.bedwars_lobby.tickets_line=Tickets: /75 scoreboard.bedwars_lobby.total_kills_label = Total Kills: 0 scoreboard.bedwars_lobby.total_wins_label = Total Wins: 0 # Murder Mystery Game Scoreboard scoreboard.murdermystery_game.title_base = MURDER MYSTERY -scoreboard.murdermystery_game.map_label = Map: -scoreboard.murdermystery_game.players_label = Players: -scoreboard.murdermystery_game.starting_in_label = Starting in -scoreboard.murdermystery_game.starting_in_suffix = s +scoreboard.murdermystery_game.map_line=Map: +scoreboard.murdermystery_game.players_line=Players: / +scoreboard.murdermystery_game.starting_in_line=Starting in s scoreboard.murdermystery_game.waiting_for_players = Waiting for players... -scoreboard.murdermystery_game.mode_label = Mode: +scoreboard.murdermystery_game.mode_line=Mode: scoreboard.murdermystery_game.spectating_label = SPECTATING -scoreboard.murdermystery_game.your_role_label = Your Role: -scoreboard.murdermystery_game.role_label = Role: -scoreboard.murdermystery_game.players_alive_label = Players Alive: -scoreboard.murdermystery_game.innocents_left_label = Innocents Left: -scoreboard.murdermystery_game.time_left_label = Time Left: +scoreboard.murdermystery_game.your_role_line=Your Role: +scoreboard.murdermystery_game.role_line=Role: +scoreboard.murdermystery_game.players_alive_line=Players Alive: +scoreboard.murdermystery_game.innocents_left_line=Innocents Left: +scoreboard.murdermystery_game.time_left_line=Time Left: scoreboard.murdermystery_game.time_left_default = 5:00 -scoreboard.murdermystery_game.detective_label = Detective: +scoreboard.murdermystery_game.detective_line=Detective: scoreboard.murdermystery_game.detective_alive = Alive scoreboard.murdermystery_game.detective_dead = Dead scoreboard.murdermystery_game.game_over = GAME OVER! -scoreboard.murdermystery_game.your_kills_label = Your Kills: -scoreboard.murdermystery_game.tokens_earned_label = Tokens Earned: -scoreboard.murdermystery_game.role_color.murderer = -scoreboard.murdermystery_game.role_color.detective = -scoreboard.murdermystery_game.role_color.innocent = -scoreboard.murdermystery_game.role_color.assassin = -scoreboard.murdermystery_game.actionbar.murderer_chance = Murderer Chance: {chance}% -scoreboard.murdermystery_game.actionbar.detective_chance = Detective Chance: {chance}% +scoreboard.murdermystery_game.your_kills_line=Your Kills: +scoreboard.murdermystery_game.tokens_earned_line=Tokens Earned: +scoreboard.murdermystery_game.role_display.murderer=Murderer +scoreboard.murdermystery_game.role_display.detective=Detective +scoreboard.murdermystery_game.role_display.innocent=Innocent +scoreboard.murdermystery_game.role_display.assassin=Assassin +scoreboard.murdermystery_game.actionbar.murderer_chance=Murderer Chance: % +scoreboard.murdermystery_game.actionbar.detective_chance=Detective Chance: % # Murder Mystery Lobby Scoreboard scoreboard.murdermystery_lobby.title_base = MURDER MYSTERY -scoreboard.murdermystery_lobby.total_kills_label = Total Kills: -scoreboard.murdermystery_lobby.total_wins_label = Total Wins: -scoreboard.murdermystery_lobby.wins_as_detective_label = Wins as Detective: -scoreboard.murdermystery_lobby.wins_as_murderer_label = Wins as Murderer: -scoreboard.murdermystery_lobby.tokens_label = Tokens: +scoreboard.murdermystery_lobby.total_kills_line=Total Kills: +scoreboard.murdermystery_lobby.total_wins_line=Total Wins: +scoreboard.murdermystery_lobby.wins_as_detective_line=Wins as Detective: +scoreboard.murdermystery_lobby.wins_as_murderer_line=Wins as Murderer: +scoreboard.murdermystery_lobby.tokens_line=Tokens: # Skywars Game Scoreboard scoreboard.skywars_game.title_base = SKYWARS scoreboard.skywars_game.next_event_label = Next Event: -scoreboard.skywars_game.event_refill = Refill {time} -scoreboard.skywars_game.event_dragon = Dragon {time} -scoreboard.skywars_game.players_left_label = Players Left: -scoreboard.skywars_game.kills_label = Kills: +scoreboard.skywars_game.event_refill=Refill +scoreboard.skywars_game.event_dragon=Dragon +scoreboard.skywars_game.players_left_line=Players Left: +scoreboard.skywars_game.kills_line=Kills: scoreboard.skywars_game.top_killers_label = Top Killers: scoreboard.skywars_game.place_1st = 1st scoreboard.skywars_game.place_2nd = 2nd scoreboard.skywars_game.place_3rd = 3rd -scoreboard.skywars_game.your_kills_label = Your Kills: -scoreboard.skywars_game.players_label = Players: -scoreboard.skywars_game.waiting = Waiting... -scoreboard.skywars_game.starting_in_label = Starting in -scoreboard.skywars_game.starting_in_suffix = s -scoreboard.skywars_game.map_label = Map: -scoreboard.skywars_game.mode_label = Mode: +scoreboard.skywars_game.top_killer_line= - +scoreboard.skywars_game.your_kills_line=Your Kills: +scoreboard.skywars_game.players_line=Players: / +scoreboard.skywars_game.waiting=Waiting... +scoreboard.skywars_game.starting_in_line=Starting in s +scoreboard.skywars_game.map_line=Map: +scoreboard.skywars_game.mode_line=Mode: # Skywars Lobby Scoreboard scoreboard.skywars_lobby.title_base = SKYWARS -scoreboard.skywars_lobby.your_level_label = Your Level: -scoreboard.skywars_lobby.solo_kills_label = Solo Kills: -scoreboard.skywars_lobby.solo_wins_label = Solo Wins: -scoreboard.skywars_lobby.doubles_kills_label = Doubles Kills: -scoreboard.skywars_lobby.doubles_wins_label = Doubles Wins: -scoreboard.skywars_lobby.coins_label = Coins: -scoreboard.skywars_lobby.souls_label = Souls: -scoreboard.skywars_lobby.tokens_label = Tokens: +scoreboard.skywars_lobby.your_level_line=Your Level: +scoreboard.skywars_lobby.solo_kills_line=Solo Kills: +scoreboard.skywars_lobby.solo_wins_line=Solo Wins: +scoreboard.skywars_lobby.doubles_kills_line=Doubles Kills: +scoreboard.skywars_lobby.doubles_wins_line=Doubles Wins: +scoreboard.skywars_lobby.coins_line=Coins: +scoreboard.skywars_lobby.souls_line=Souls: +scoreboard.skywars_lobby.tokens_line=Tokens: # Prototype Lobby Scoreboard scoreboard.prototype_lobby.title_base = PROTOTYPE @@ -116,5 +117,4 @@ scoreboard.prototype_lobby.dev_notice_line2 = under heavy development! scoreboard.prototype_lobby.bug_report_line1 = Report bugs and leave scoreboard.prototype_lobby.bug_report_line2 = feedback at scoreboard.prototype_lobby.bug_report_url = hypixel.net/ptl -scoreboard.prototype_lobby.hype_label = Hype: -scoreboard.prototype_lobby.hype_max = /200 +scoreboard.prototype_lobby.hype=Hype: /200 diff --git a/configuration/i18n/en_US/tablist.properties b/configuration/i18n/en_US/tablist.properties index 0d90ee67c..820ef1f28 100644 --- a/configuration/i18n/en_US/tablist.properties +++ b/configuration/i18n/en_US/tablist.properties @@ -1,5 +1,3 @@ -# Tablist header/footer and module strings - # Generic Header/Footer (non-SkyBlock servers) tablist.generic.header = You are playing on MC.HYPIXEL.NET\nRAM USAGE: {ram_usage} MB\nTPS: {tps} tablist.generic.footer = Ranks, Boosters & MORE! STORE.HYPIXEL.NET @@ -29,12 +27,12 @@ tablist.skywars_game.footer.store = Ranks, Boosters & MORE! ST # Module Headers tablist.module.server_info = Server Info -tablist.module.players = Players ({count}) -tablist.module.players_murder_mystery = Players ({count}) +tablist.module.players=Players ({}) +tablist.module.players_murder_mystery=Players (}) tablist.module.account_info = Account Info -tablist.module.island = Island ({count}) +tablist.module.island=Island () tablist.module.guests = Guests -tablist.module.minions = Minions: ({count}) +tablist.module.minions=Minions: () # Module: Server Info - Area names tablist.server_info.server_label = Server: {server_name} diff --git a/configuration/i18n/fi_FI/scoreboard.properties b/configuration/i18n/fi_FI/scoreboard.properties new file mode 100644 index 000000000..5a9a5a2af --- /dev/null +++ b/configuration/i18n/fi_FI/scoreboard.properties @@ -0,0 +1,7 @@ +scoreboard.prototype_lobby.title_base=PROTOTYPE +scoreboard.prototype_lobby.dev_notice_line1=Tämän lobbyn pelit ovat +scoreboard.prototype_lobby.dev_notice_line2=vasta kehitteillä! +scoreboard.prototype_lobby.bug_report_line1=Ilmoita bugeista ja jätä +scoreboard.prototype_lobby.bug_report_line2=palautetta osoitteessa +scoreboard.prototype_lobby.bug_report_url=hypixel.net/ptl +scoreboard.prototype_lobby.hype=Hype: /200 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 23449a2b5..c61a118f7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/type.backwaterbayou/src/main/java/net/swofty/type/backwaterbayou/tab/BackwaterBayouServerModule.java b/type.backwaterbayou/src/main/java/net/swofty/type/backwaterbayou/tab/BackwaterBayouServerModule.java index 2e8cb45f3..3c7bd7024 100644 --- a/type.backwaterbayou/src/main/java/net/swofty/type/backwaterbayou/tab/BackwaterBayouServerModule.java +++ b/type.backwaterbayou/src/main/java/net/swofty/type/backwaterbayou/tab/BackwaterBayouServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.backwaterbayou.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class BackwaterBayouServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.backwater_bayou", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.bedwarsgame/src/main/java/net/swofty/type/bedwarsgame/BedWarsGameScoreboard.java b/type.bedwarsgame/src/main/java/net/swofty/type/bedwarsgame/BedWarsGameScoreboard.java index c0ac6d288..29f9b93d4 100644 --- a/type.bedwarsgame/src/main/java/net/swofty/type/bedwarsgame/BedWarsGameScoreboard.java +++ b/type.bedwarsgame/src/main/java/net/swofty/type/bedwarsgame/BedWarsGameScoreboard.java @@ -1,12 +1,14 @@ package net.swofty.type.bedwarsgame; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.entity.Player; import net.minestom.server.timer.Scheduler; import net.minestom.server.timer.TaskSchedule; +import net.swofty.commons.bedwars.map.BedWarsMapsConfig; +import net.swofty.commons.bedwars.map.BedWarsMapsConfig.TeamKey; import net.swofty.type.bedwarsgame.game.Game; import net.swofty.type.bedwarsgame.game.GameStatus; -import net.swofty.commons.bedwars.map.BedWarsMapsConfig.TeamKey; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.data.HypixelDataHandler; import net.swofty.type.generic.data.handlers.BedWarsDataHandler; @@ -49,18 +51,23 @@ public static void start(Game game) { continue; } - List lines = new ArrayList<>(); - lines.add("§7" + new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()) + " §8" + HypixelConst.getServerName()); - lines.add("§7 "); + String date = new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()); + + List lines = new ArrayList<>(); + lines.add(I18n.t("scoreboard.common.date_line", Component.text(date), Component.text(HypixelConst.getServerName()))); + lines.add(Component.text("§7 ")); if (game.getGameStatus() == GameStatus.WAITING) { - lines.add(I18n.string("scoreboard.bedwars_game.map_label", l) + game.getMapEntry().getName()); - lines.add(I18n.string("scoreboard.bedwars_game.players_label", l) + game.getPlayers().size() + "/" + game.getMapEntry().getConfiguration().getTeams().size()); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.bedwars_game.starting_in_label", l) + game.getCountdown().getRemainingSeconds() + I18n.string("scoreboard.bedwars_game.starting_in_suffix", l)); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.bedwars_game.mode_label", l) + game.getBedwarsGameType().getDisplayName()); - lines.add(I18n.string("scoreboard.bedwars_game.version_label", l)); + lines.add(I18n.t("scoreboard.bedwars_game.map_line", Component.text(game.getMapEntry().getName()))); + lines.add(I18n.t("scoreboard.bedwars_game.players_line", + Component.text(String.valueOf(game.getPlayers().size())), + Component.text(String.valueOf(game.getMapEntry().getConfiguration().getTeams().size())))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.bedwars_game.starting_in_line", + Component.text(String.valueOf(game.getCountdown().getRemainingSeconds())))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.bedwars_game.mode_line", Component.text(game.getBedwarsGameType().getDisplayName()))); + lines.add(I18n.t("scoreboard.bedwars_game.version_label")); } else { String eventName = game.getEventManager().getNextEvent() != null ? game.getEventManager().getNextEvent().getDisplayName() @@ -69,28 +76,33 @@ public static void start(Game game) { long minutesPart = seconds / 60; long secondsPart = seconds % 60; String timeLeft = String.format("%d:%02d", minutesPart, secondsPart); - lines.add(I18n.string("scoreboard.bedwars_game.event_in_label", l, Map.of("event_name", eventName, "time_left", timeLeft))); - lines.add("§7 "); - for (Map.Entry entry : game.getMapEntry().getConfiguration().getTeams().entrySet()) { + lines.add(I18n.t("scoreboard.bedwars_game.event_in_line", + Component.text(eventName), + Component.text(timeLeft))); + lines.add(Component.text("§7 ")); + for (Map.Entry entry : game.getMapEntry().getConfiguration().getTeams().entrySet()) { TeamKey teamKey = entry.getKey(); String teamName = teamKey.getName(); String teamInitial = teamName.substring(0, 1).toUpperCase(); - String bedStatus = game.getTeamManager().isBedAlive(teamKey) - ? I18n.string("scoreboard.bedwars_game.bed_alive", l) - : I18n.string("scoreboard.bedwars_game.bed_dead", l); - lines.add(String.format("%s%s §f%s %s", teamKey.chatColor(), teamInitial, teamName, bedStatus)); + Component bedStatus = game.getTeamManager().isBedAlive(teamKey) + ? I18n.t("scoreboard.bedwars_game.bed_alive") + : I18n.t("scoreboard.bedwars_game.bed_dead"); + lines.add(I18n.t("scoreboard.bedwars_game.team_status_line", + Component.text(teamKey.chatColor() + teamInitial), + Component.text(teamName), + bedStatus)); } } - lines.add("§7 "); - lines.add(I18n.string("scoreboard.common.footer", l)); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.common.footer")); if (!scoreboard.hasScoreboard(player)) { - scoreboard.createScoreboard(player, getSidebarName(prototypeName, l)); + scoreboard.createScoreboard(player, Component.text(getSidebarName(prototypeName, l))); } scoreboard.updateLines(player, lines); - scoreboard.updateTitle(player, getSidebarName(prototypeName, l)); + scoreboard.updateTitle(player, Component.text(getSidebarName(prototypeName, l))); } return TaskSchedule.tick(4); }); diff --git a/type.bedwarslobby/src/main/java/net/swofty/type/bedwarslobby/BedWarsLobbyScoreboard.java b/type.bedwarslobby/src/main/java/net/swofty/type/bedwarslobby/BedWarsLobbyScoreboard.java index 39e5931fd..dbf0e3455 100644 --- a/type.bedwarslobby/src/main/java/net/swofty/type/bedwarslobby/BedWarsLobbyScoreboard.java +++ b/type.bedwarslobby/src/main/java/net/swofty/type/bedwarslobby/BedWarsLobbyScoreboard.java @@ -1,5 +1,6 @@ package net.swofty.type.bedwarslobby; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.entity.Player; import net.minestom.server.timer.Scheduler; @@ -51,7 +52,8 @@ public static void start() { double percentage = Math.min(1.0, (double) progress / maxExperience); int filledSquares = (int) Math.round(percentage * 10); - StringBuilder progressBar = new StringBuilder(" " + I18n.string("scoreboard.bedwars_lobby.progress_bar_open", l)); + String date = new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()); + StringBuilder progressBar = new StringBuilder(); for (int i = 0; i < 10; i++) { if (i < filledSquares) { progressBar.append(I18n.string("scoreboard.bedwars_lobby.progress_bar_filled", l)); @@ -59,33 +61,36 @@ public static void start() { progressBar.append(I18n.string("scoreboard.bedwars_lobby.progress_bar_empty", l)); } } - progressBar.append(I18n.string("scoreboard.bedwars_lobby.progress_bar_close", l)); long tokens = bwDataHandler.get(BedWarsDataHandler.Data.TOKENS, DatapointLeaderboardLong.class).getValue(); long tickets = bwDataHandler.get(BedWarsDataHandler.Data.SLUMBER_TICKETS, DatapointLeaderboardLong.class).getValue(); - List lines = new ArrayList<>(); - lines.add("§7" + new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()) + " §8" + HypixelConst.getServerName()); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.bedwars_lobby.level_label", l) + BedwarsLevelColor.constructLevelString(BedwarsLevelUtil.calculateLevel(experience))); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.bedwars_lobby.progress_label", l) + suffix(progress) + I18n.string("scoreboard.bedwars_lobby.progress_separator", l) + suffix(maxExperience)); - lines.add(progressBar.toString()); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.bedwars_lobby.tokens_label", l) + tokens); - lines.add(I18n.string("scoreboard.bedwars_lobby.tickets_label", l) + tickets + I18n.string("scoreboard.bedwars_lobby.tickets_max", l)); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.bedwars_lobby.total_kills_label", l)); - lines.add(I18n.string("scoreboard.bedwars_lobby.total_wins_label", l)); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.common.footer", l)); + List lines = new ArrayList<>(); + lines.add(I18n.t("scoreboard.common.date_line", Component.text(date), Component.text(HypixelConst.getServerName()))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.bedwars_lobby.level_line", + Component.text(BedwarsLevelColor.constructLevelString(BedwarsLevelUtil.calculateLevel(experience))))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.bedwars_lobby.progress_line", + Component.text(suffix(progress)), + Component.text(suffix(maxExperience)))); + lines.add(Component.space().append(I18n.t("scoreboard.bedwars_lobby.progress_bar", + Component.text(progressBar.toString())))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.bedwars_lobby.tokens_line", Component.text(String.valueOf(tokens)))); + lines.add(I18n.t("scoreboard.bedwars_lobby.tickets_line", Component.text(String.valueOf(tickets)))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.bedwars_lobby.total_kills_label")); + lines.add(I18n.t("scoreboard.bedwars_lobby.total_wins_label")); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.common.footer")); if (!scoreboard.hasScoreboard(player)) { - scoreboard.createScoreboard(player, getSidebarName(prototypeName, l)); + scoreboard.createScoreboard(player, Component.text(getSidebarName(prototypeName, l))); } scoreboard.updateLines(player, lines); - scoreboard.updateTitle(player, getSidebarName(prototypeName, l)); + scoreboard.updateTitle(player, Component.text(getSidebarName(prototypeName, l))); } return TaskSchedule.tick(4); }); diff --git a/type.bedwarslobby/src/main/java/net/swofty/type/bedwarslobby/tab/BedWarsPlayersOnlineModule.java b/type.bedwarslobby/src/main/java/net/swofty/type/bedwarslobby/tab/BedWarsPlayersOnlineModule.java index 4c7fb2f14..cc2f05899 100644 --- a/type.bedwarslobby/src/main/java/net/swofty/type/bedwarslobby/tab/BedWarsPlayersOnlineModule.java +++ b/type.bedwarslobby/src/main/java/net/swofty/type/bedwarslobby/tab/BedWarsPlayersOnlineModule.java @@ -1,5 +1,6 @@ package net.swofty.type.bedwarslobby.tab; +import net.kyori.adventure.text.Component; import net.swofty.commons.StringUtility; import net.swofty.commons.bedwars.BedwarsLevelColor; import net.swofty.commons.bedwars.BedwarsLevelUtil; @@ -17,7 +18,6 @@ import java.util.Collections; import java.util.List; import java.util.Locale; -import java.util.Map; public class BedWarsPlayersOnlineModule extends TablistModule { public int page; @@ -32,7 +32,7 @@ public List getEntries(HypixelPlayer player) { List players = HypixelGenericLoader.getLoadedPlayers(); ArrayList entries = new ArrayList<>(List.of( - new TablistEntry(getCentered(I18n.string("tablist.module.players", l, Map.of("count", String.valueOf(players.size())))), TablistSkinRegistry.GREEN) + new TablistEntry(getCentered(I18n.string("tablist.module.players", l, Component.text(String.valueOf(players.size())))), TablistSkinRegistry.GREEN) )); List toShow = new ArrayList<>(); diff --git a/type.crimsonisle/src/main/java/net/swofty/type/crimsonisle/tab/CrimsonIsleServerModule.java b/type.crimsonisle/src/main/java/net/swofty/type/crimsonisle/tab/CrimsonIsleServerModule.java index 830842e3d..1f4002568 100644 --- a/type.crimsonisle/src/main/java/net/swofty/type/crimsonisle/tab/CrimsonIsleServerModule.java +++ b/type.crimsonisle/src/main/java/net/swofty/type/crimsonisle/tab/CrimsonIsleServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.crimsonisle.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class CrimsonIsleServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.crimson_isle", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.deepcaverns/src/main/java/net/swofty/type/deepcaverns/tab/DeepCavernsServerModule.java b/type.deepcaverns/src/main/java/net/swofty/type/deepcaverns/tab/DeepCavernsServerModule.java index d5da223e0..5be8972ce 100644 --- a/type.deepcaverns/src/main/java/net/swofty/type/deepcaverns/tab/DeepCavernsServerModule.java +++ b/type.deepcaverns/src/main/java/net/swofty/type/deepcaverns/tab/DeepCavernsServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.deepcaverns.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class DeepCavernsServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.deep_caverns", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.dungeonhub/src/main/java/net/swofty/type/dungeonhub/tab/DungeonServerModule.java b/type.dungeonhub/src/main/java/net/swofty/type/dungeonhub/tab/DungeonServerModule.java index 5a8363e2c..abf6e8034 100644 --- a/type.dungeonhub/src/main/java/net/swofty/type/dungeonhub/tab/DungeonServerModule.java +++ b/type.dungeonhub/src/main/java/net/swofty/type/dungeonhub/tab/DungeonServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.dungeonhub.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class DungeonServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.dungeon_hub", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.dwarvenmines/src/main/java/net/swofty/type/dwarvenmines/tab/DwarvenMinesServerModule.java b/type.dwarvenmines/src/main/java/net/swofty/type/dwarvenmines/tab/DwarvenMinesServerModule.java index c3d571b93..f56bdc9be 100644 --- a/type.dwarvenmines/src/main/java/net/swofty/type/dwarvenmines/tab/DwarvenMinesServerModule.java +++ b/type.dwarvenmines/src/main/java/net/swofty/type/dwarvenmines/tab/DwarvenMinesServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.dwarvenmines.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class DwarvenMinesServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.dwarven_mines", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.galatea/src/main/java/net/swofty/type/galatea/tab/GalateaServerModule.java b/type.galatea/src/main/java/net/swofty/type/galatea/tab/GalateaServerModule.java index 189367eca..0cf7ae892 100644 --- a/type.galatea/src/main/java/net/swofty/type/galatea/tab/GalateaServerModule.java +++ b/type.galatea/src/main/java/net/swofty/type/galatea/tab/GalateaServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.galatea.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GalateaServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.galatea", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.generic/build.gradle.kts b/type.generic/build.gradle.kts index 88c308d34..5db661088 100644 --- a/type.generic/build.gradle.kts +++ b/type.generic/build.gradle.kts @@ -33,7 +33,7 @@ dependencies { compileOnly(libs.minestom) { exclude(group = "org.jboss.shrinkwrap.resolver", module = "shrinkwrap-resolver-depchain") } - implementation(libs.adventure.text.minimessage) + api(libs.adventure.text.minimessage) implementation(libs.caffeine) implementation(libs.polar) implementation(libs.snakeyaml) diff --git a/type.generic/src/main/java/net/swofty/type/generic/HypixelGenericLoader.java b/type.generic/src/main/java/net/swofty/type/generic/HypixelGenericLoader.java index 31a7ee6b3..ed8446fd9 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/HypixelGenericLoader.java +++ b/type.generic/src/main/java/net/swofty/type/generic/HypixelGenericLoader.java @@ -34,7 +34,6 @@ import net.swofty.type.generic.data.handlers.PrototypeLobbyDataHandler; import net.swofty.type.generic.data.handlers.SkywarsDataHandler; import net.swofty.type.generic.data.mongodb.AttributeDatabase; -import net.swofty.type.generic.data.mongodb.AuthenticationDatabase; import net.swofty.type.generic.data.mongodb.BedWarsStatsDatabase; import net.swofty.type.generic.data.mongodb.ProfilesDatabase; import net.swofty.type.generic.data.mongodb.UserDatabase; @@ -188,7 +187,6 @@ public void initialize(MinecraftServer server) { MongoClientSettings settings = MongoClientSettings.builder().applyConnectionString(cs).build(); MongoClient mongoClient = MongoClients.create(settings); - AuthenticationDatabase.connect(mongoClient); ProfilesDatabase.connect(mongoClient); AttributeDatabase.connect(mongoClient); UserDatabase.connect(mongoClient); diff --git a/type.generic/src/main/java/net/swofty/type/generic/command/commands/BanCommand.java b/type.generic/src/main/java/net/swofty/type/generic/command/commands/BanCommand.java index 8ad029924..81b11f8af 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/command/commands/BanCommand.java +++ b/type.generic/src/main/java/net/swofty/type/generic/command/commands/BanCommand.java @@ -1,8 +1,11 @@ package net.swofty.type.generic.command.commands; import net.kyori.adventure.text.Component; -import net.minestom.server.command.builder.arguments.*; +import net.minestom.server.command.builder.arguments.Argument; +import net.minestom.server.command.builder.arguments.ArgumentString; +import net.minestom.server.command.builder.arguments.ArgumentType; import net.minestom.server.command.builder.suggestion.SuggestionEntry; +import net.minestom.server.utils.mojang.MojangUtils; import net.swofty.commons.ServiceType; import net.swofty.commons.StringUtility; import net.swofty.commons.protocol.objects.punishment.PunishPlayerProtocolObject; @@ -21,7 +24,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import java.util.Map; import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; @@ -65,12 +67,12 @@ public void registerUsage(MinestomCommand command) { CompletableFuture.runAsync(() -> { try { - UUID targetUuid = net.minestom.server.utils.mojang.MojangUtils.getUUID(playerName); + UUID targetUuid = MojangUtils.getUUID(playerName); long actualTime = StringUtility.parseDuration(duration); long expiryTime = System.currentTimeMillis() + actualTime; banPlayer(player, targetUuid, type, player.getUuid(), actualTime, expiryTime, playerName, null); } catch (IOException e) { - player.sendTranslated("commands.common.player_not_found_short", Map.of("player", playerName)); + player.sendTranslated("commands.common.player_not_found_short", Component.text(playerName)); } }); }, playerArg, durationArg, reasonArg); @@ -89,10 +91,10 @@ public void registerUsage(MinestomCommand command) { CompletableFuture.runAsync(() -> { try { - banPlayer(player, net.minestom.server.utils.mojang.MojangUtils.getUUID(playerName), reason, + banPlayer(player, MojangUtils.getUUID(playerName), reason, player.getUuid(), 0, -1, playerName, null); } catch (IOException e) { - player.sendTranslated("commands.common.player_not_found_short", Map.of("player", playerName)); + player.sendTranslated("commands.common.player_not_found_short", Component.text(playerName)); } }); }, playerArg, reasonArg); @@ -113,10 +115,10 @@ public void registerUsage(MinestomCommand command) { CompletableFuture.runAsync(() -> { try { - banPlayer(player, net.minestom.server.utils.mojang.MojangUtils.getUUID(playerName), reason, + banPlayer(player, MojangUtils.getUUID(playerName), reason, player.getUuid(), 0, -1, playerName, tags); } catch (IOException e) { - player.sendTranslated("commands.common.player_not_found_short", Map.of("player", playerName)); + player.sendTranslated("commands.common.player_not_found_short", Component.text(playerName)); } }); }, playerArg, reasonArg, extraArg); @@ -153,14 +155,17 @@ private void banPlayer(HypixelPlayer sender, UUID targetUuid, BanType type, UUID ); punishmentService.handleRequest(message).thenAccept(result -> { - if (result instanceof PunishPlayerProtocolObject.PunishPlayerResponse response) { - if (response.success()) { + if (result instanceof PunishPlayerProtocolObject.PunishPlayerResponse( + boolean success, String punishmentId, PunishPlayerProtocolObject.ErrorCode errorCode, + String errorMessage + )) { + if (success) { new ProxyPlayer(targetUuid).transferToLimbo(); - sender.sendTranslated("commands.ban.success", Map.of("player", playerName, "id", response.punishmentId())); - } else if (response.errorCode() == PunishPlayerProtocolObject.ErrorCode.ALREADY_PUNISHED) { - sender.sendTranslated("commands.ban.already_banned", Map.of("id", response.errorMessage())); + sender.sendTranslated("commands.ban.success", Component.text(playerName), Component.text(punishmentId)); + } else if (errorCode == PunishPlayerProtocolObject.ErrorCode.ALREADY_PUNISHED) { + sender.sendTranslated("commands.ban.already_banned", Component.text(errorMessage)); } else { - sender.sendTranslated("commands.ban.failed", Map.of("error", response.errorMessage())); + sender.sendTranslated("commands.ban.failed", Component.text(errorMessage)); } } }).orTimeout(5, TimeUnit.SECONDS).exceptionally(_ -> { diff --git a/type.generic/src/main/java/net/swofty/type/generic/command/commands/DebugViewCommand.java b/type.generic/src/main/java/net/swofty/type/generic/command/commands/DebugViewCommand.java deleted file mode 100644 index f4ecb65d3..000000000 --- a/type.generic/src/main/java/net/swofty/type/generic/command/commands/DebugViewCommand.java +++ /dev/null @@ -1,63 +0,0 @@ -package net.swofty.type.generic.command.commands; - -import net.minestom.server.command.builder.arguments.ArgumentLiteral; -import net.swofty.type.generic.command.CommandParameters; -import net.swofty.type.generic.command.HypixelCommand; -import net.swofty.type.generic.gui.v2.test.*; -import net.swofty.type.generic.user.HypixelPlayer; -import net.swofty.type.generic.user.categories.Rank; - -import java.util.List; -import java.util.stream.IntStream; - -@CommandParameters(aliases = "debugview", usage = "/debugview", description = "opens a debug view", permission = Rank.STAFF, allowsConsole = false) -public class DebugViewCommand extends HypixelCommand { - @Override - public void registerUsage(MinestomCommand command) { - command.setDefaultExecutor((commandSender, commands) -> { - HypixelPlayer player = (HypixelPlayer) commandSender; // safe cast - player.openView(new TestStateView()); - }); - - command.addSyntax(((sender, context) -> { - HypixelPlayer player = (HypixelPlayer) sender; // safe cast - player.openView(new TestContainerView()); - }), new ArgumentLiteral("container")); - - command.addSyntax(((sender, context) -> { - HypixelPlayer player = (HypixelPlayer) sender; // safe cast - player.openView(new TestMixedView()); - }), new ArgumentLiteral("mixedView")); - - // sharedView - command.addSyntax(((sender, context) -> { - HypixelPlayer player = (HypixelPlayer) sender; // safe cast - TestSharedContainerView.open(player, "a", "a"); - }), new ArgumentLiteral("sharedView")); - - // sharedState - command.addSyntax(((sender, context) -> { - HypixelPlayer player = (HypixelPlayer) sender; // safe cast - TestSharedStateView.openNew(player, "b"); - }), new ArgumentLiteral("sharedState")); - - // joinSharedState - command.addSyntax(((sender, context) -> { - HypixelPlayer player = (HypixelPlayer) sender; // safe cast - TestSharedStateView.join(player, "b"); - }), new ArgumentLiteral("joinSharedState")); - - // noState - command.addSyntax(((sender, context) -> { - HypixelPlayer player = (HypixelPlayer) sender; // safe cast - player.openView(new TestNoStateView()); - }), new ArgumentLiteral("noState")); - - // paginated - command.addSyntax(((sender, context) -> { - HypixelPlayer player = (HypixelPlayer) sender; // safe cast - List oneTo100 = IntStream.rangeClosed(1, 100).boxed().toList(); - player.openView(new TestPaginatedView(), new TestPaginatedView.State(oneTo100, 1, "")); - }), new ArgumentLiteral("paginated")); - } -} diff --git a/type.generic/src/main/java/net/swofty/type/generic/command/commands/FriendCommand.java b/type.generic/src/main/java/net/swofty/type/generic/command/commands/FriendCommand.java index 4e12548c7..12256145d 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/command/commands/FriendCommand.java +++ b/type.generic/src/main/java/net/swofty/type/generic/command/commands/FriendCommand.java @@ -1,5 +1,6 @@ package net.swofty.type.generic.command.commands; +import net.kyori.adventure.text.Component; import net.minestom.server.command.builder.arguments.ArgumentString; import net.minestom.server.command.builder.arguments.ArgumentType; import net.swofty.commons.ServiceType; @@ -12,7 +13,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.Map; import java.util.UUID; @CommandParameters(aliases = "f", @@ -105,7 +105,7 @@ public void registerUsage(MinestomCommand command) { int page = parsePageNumber(arg); FriendManager.listRequests(player, page); } - default -> player.sendTranslated("commands.common.unknown_command_use_help", Map.of("command", "friend")); + default -> player.sendTranslated("commands.common.unknown_command_use_help", Component.text("friend")); } pendingCommands.remove(player.getUuid()); @@ -135,7 +135,7 @@ public void registerUsage(MinestomCommand command) { if (sub.equalsIgnoreCase("nickname")) { FriendManager.setNickname(player, target, extra); } else { - player.sendTranslated("commands.common.unknown_command_use_help", Map.of("command", "friend")); + player.sendTranslated("commands.common.unknown_command_use_help", Component.text("friend")); } pendingCommands.remove(player.getUuid()); diff --git a/type.generic/src/main/java/net/swofty/type/generic/command/commands/LobbyCommand.java b/type.generic/src/main/java/net/swofty/type/generic/command/commands/LobbyCommand.java deleted file mode 100644 index 571f773f8..000000000 --- a/type.generic/src/main/java/net/swofty/type/generic/command/commands/LobbyCommand.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.swofty.type.generic.command.commands; - -import net.swofty.commons.ServerType; -import net.swofty.type.generic.command.CommandParameters; -import net.swofty.type.generic.command.HypixelCommand; -import net.swofty.type.generic.user.HypixelPlayer; -import net.swofty.type.generic.user.categories.Rank; - -@CommandParameters(aliases = "l", - description = "Takes the player to the lobby", - usage = "/lobby", - permission = Rank.DEFAULT, - allowsConsole = false) -public class LobbyCommand extends HypixelCommand { - - @Override - public void registerUsage(MinestomCommand command) { - command.addSyntax((sender, context) -> { - if (!permissionCheck(sender)) return; - - HypixelPlayer player = (HypixelPlayer) sender; - player.sendTo(ServerType.PROTOTYPE_LOBBY); - }); - } - -} diff --git a/type.generic/src/main/java/net/swofty/type/generic/command/commands/MessageCommand.java b/type.generic/src/main/java/net/swofty/type/generic/command/commands/MessageCommand.java index eb0fc980d..2d9a8836c 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/command/commands/MessageCommand.java +++ b/type.generic/src/main/java/net/swofty/type/generic/command/commands/MessageCommand.java @@ -1,5 +1,6 @@ package net.swofty.type.generic.command.commands; +import net.kyori.adventure.text.Component; import net.minestom.server.command.builder.arguments.ArgumentString; import net.minestom.server.command.builder.arguments.ArgumentStringArray; import net.minestom.server.command.builder.arguments.ArgumentType; @@ -12,7 +13,6 @@ import net.swofty.type.generic.user.categories.Rank; import org.jetbrains.annotations.Nullable; -import java.util.Map; import java.util.UUID; @CommandParameters(aliases = "msg message whipser", @@ -35,20 +35,21 @@ public void registerUsage(MinestomCommand command) { @Nullable UUID targetUUID = HypixelDataHandler.getPotentialUUIDFromName(playerName); if (targetUUID == null) { - player.sendTranslated("commands.message.player_not_found", Map.of("player", playerName)); + player.sendTranslated("commands.message.player_not_found", Component.text(playerName)); return; } ProxyPlayer target = new ProxyPlayer(targetUUID); if (!target.isOnline().join()) { - player.sendTranslated("commands.message.player_not_online", Map.of("player", playerName)); + player.sendTranslated("commands.message.player_not_online", Component.text(playerName)); return; } String targetName = HypixelPlayer.getDisplayName(targetUUID); String ourName = player.getFullDisplayName(); - player.sendTranslated("commands.message.outgoing", Map.of("target", targetName, "message", String.join(" ", message))); - target.sendMessage(I18n.string("commands.message.incoming", Map.of("sender", ourName, "message", String.join(" ", message)))); + String joinedMessage = String.join(" ", message); + player.sendTranslated("commands.message.outgoing", Component.text(targetName), Component.text(joinedMessage)); + target.sendMessage(I18n.t("commands.message.incoming", Component.text(ourName), Component.text(joinedMessage))); }, playerArgument, messageArgument); } } diff --git a/type.generic/src/main/java/net/swofty/type/generic/command/commands/MuteCommand.java b/type.generic/src/main/java/net/swofty/type/generic/command/commands/MuteCommand.java index f8ecc3054..a88983781 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/command/commands/MuteCommand.java +++ b/type.generic/src/main/java/net/swofty/type/generic/command/commands/MuteCommand.java @@ -19,7 +19,6 @@ import java.io.IOException; import java.util.List; -import java.util.Map; import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; @@ -63,7 +62,7 @@ public void registerUsage(MinestomCommand command) { long expiryTime = System.currentTimeMillis() + actualTime; mutePlayer(player, targetUuid, type, player.getUuid(), actualTime, expiryTime, playerName); } catch (IOException e) { - player.sendTranslated("commands.common.player_not_found_short", Map.of("player", playerName)); + player.sendTranslated("commands.common.player_not_found_short", Component.text(playerName)); } }); }, playerArg, durationArg, reasonArg); @@ -85,7 +84,7 @@ public void registerUsage(MinestomCommand command) { mutePlayer(player, net.minestom.server.utils.mojang.MojangUtils.getUUID(playerName), reason, player.getUuid(), 0, -1, playerName); } catch (IOException e) { - player.sendTranslated("commands.common.player_not_found_short", Map.of("player", playerName)); + player.sendTranslated("commands.common.player_not_found_short", Component.text(playerName)); } }); }, playerArg, reasonArg); @@ -107,11 +106,11 @@ private void mutePlayer(HypixelPlayer sender, UUID targetUuid, MuteType type, UU punishmentService.handleRequest(message).thenAccept(result -> { if (result instanceof PunishPlayerProtocolObject.PunishPlayerResponse response) { if (response.success()) { - sender.sendTranslated("commands.mute.success", Map.of("player", playerName, "id", response.punishmentId())); + sender.sendTranslated("commands.mute.success", Component.text(playerName), Component.text(response.punishmentId())); } else if (response.errorCode() == PunishPlayerProtocolObject.ErrorCode.ALREADY_PUNISHED) { - sender.sendTranslated("commands.mute.already_muted", Map.of("id", response.errorMessage())); + sender.sendTranslated("commands.mute.already_muted", Component.text(response.errorMessage())); } else { - sender.sendTranslated("commands.mute.failed", Map.of("error", response.errorMessage())); + sender.sendTranslated("commands.mute.failed", Component.text(response.errorMessage())); } } }).orTimeout(5, TimeUnit.SECONDS).exceptionally(_ -> { diff --git a/type.generic/src/main/java/net/swofty/type/generic/command/commands/PartyCommand.java b/type.generic/src/main/java/net/swofty/type/generic/command/commands/PartyCommand.java index 23ddd84ab..98d9b1374 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/command/commands/PartyCommand.java +++ b/type.generic/src/main/java/net/swofty/type/generic/command/commands/PartyCommand.java @@ -1,5 +1,6 @@ package net.swofty.type.generic.command.commands; +import net.kyori.adventure.text.Component; import net.minestom.server.command.builder.arguments.ArgumentString; import net.minestom.server.command.builder.arguments.ArgumentStringArray; import net.minestom.server.command.builder.arguments.ArgumentType; @@ -15,7 +16,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.Map; import java.util.UUID; import java.util.stream.Collectors; @@ -67,11 +67,11 @@ public void registerUsage(MinestomCommand command) { int partySize = party.getMembers().size(); player.sendTranslated("commands.common.separator"); - player.sendTranslated("commands.party.list_header", Map.of("count", String.valueOf(partySize))); + player.sendTranslated("commands.party.list_header", Component.text(String.valueOf(partySize))); player.sendTranslated("commands.common.empty_line"); FullParty.Member leader = party.getLeader(); - player.sendTranslated("commands.party.list_leader", Map.of("leader", HypixelPlayer.getDisplayName(leader.getUuid()))); + player.sendTranslated("commands.party.list_leader", Component.text(HypixelPlayer.getDisplayName(leader.getUuid()))); boolean hasMods = false; for (FullParty.Member member : party.getMembers()) { @@ -87,7 +87,7 @@ public void registerUsage(MinestomCommand command) { .filter(member -> member.getRole() == FullParty.Role.MODERATOR) .map(member -> HypixelPlayer.getDisplayName(member.getUuid())) .collect(Collectors.joining(", ")); - player.sendTranslated("commands.party.list_moderators", Map.of("moderators", modList)); + player.sendTranslated("commands.party.list_moderators", Component.text(modList)); } boolean hasMembers = false; @@ -104,7 +104,7 @@ public void registerUsage(MinestomCommand command) { .collect(Collectors.joining(", ")); if (hasMembers) { player.sendTranslated("commands.common.empty_line"); - player.sendTranslated("commands.party.list_members", Map.of("members", memberList)); + player.sendTranslated("commands.party.list_members", Component.text(memberList)); } player.sendTranslated("commands.common.separator"); } @@ -149,7 +149,7 @@ public void registerUsage(MinestomCommand command) { UUID targetServer = UUID.fromString(target); player.asProxyPlayer().transferToWithIndication(targetServer); } - default -> player.sendTranslated("commands.common.unknown_command_use_help", Map.of("command", "party")); + default -> player.sendTranslated("commands.common.unknown_command_use_help", Component.text("party")); } pendingCommands.remove(player.getUuid()); @@ -176,7 +176,7 @@ public void registerUsage(MinestomCommand command) { switch (sub.toLowerCase()) { case "chat" -> PartyManager.sendChat(player, message); - default -> player.sendTranslated("commands.common.unknown_command_use_help", Map.of("command", "party")); + default -> player.sendTranslated("commands.common.unknown_command_use_help", Component.text("party")); } pendingCommands.remove(player.getUuid()); @@ -202,4 +202,4 @@ private void showHelp(HypixelPlayer player) { } player.sendTranslated("commands.common.separator"); } -} \ No newline at end of file +} diff --git a/type.generic/src/main/java/net/swofty/type/generic/command/commands/RankCommand.java b/type.generic/src/main/java/net/swofty/type/generic/command/commands/RankCommand.java index 1f93045e4..b7fb01fb3 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/command/commands/RankCommand.java +++ b/type.generic/src/main/java/net/swofty/type/generic/command/commands/RankCommand.java @@ -1,5 +1,6 @@ package net.swofty.type.generic.command.commands; +import net.kyori.adventure.text.Component; import net.minestom.server.command.builder.arguments.ArgumentEnum; import net.minestom.server.command.builder.arguments.ArgumentType; import net.minestom.server.command.builder.arguments.minecraft.ArgumentEntity; @@ -11,10 +12,9 @@ import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.user.categories.Rank; -import java.util.Map; - @CommandParameters(aliases = "setrank", description = "Rank command", usage = "/rank ", permission = Rank.STAFF, allowsConsole = true) public class RankCommand extends HypixelCommand { + @Override public void registerUsage(MinestomCommand command) { ArgumentEntity entityArgument = ArgumentType.Entity("player").onlyPlayers(true).singleEntity(true); @@ -27,7 +27,7 @@ public void registerUsage(MinestomCommand command) { final Rank rank = context.get(rankArgument); if (player == null) { - sender.sendMessage(I18n.string("commands.rank.player_not_found", Map.of("player", context.getRaw(entityArgument)))); + sender.sendMessage(I18n.t("commands.rank.player_not_found", Component.text(context.getRaw(entityArgument)))); return; } @@ -35,7 +35,7 @@ public void registerUsage(MinestomCommand command) { HypixelDataHandler.getUser(player.getUuid()).get(HypixelDataHandler.Data.RANK, DatapointRank.class).setValue(rank); - sender.sendMessage(I18n.string("commands.rank.success", Map.of("player", playerName, "rank", rank.name()))); + sender.sendMessage(I18n.t("commands.rank.success", Component.text(playerName), Component.text(rank.name()))); }, entityArgument, rankArgument); } } diff --git a/type.generic/src/main/java/net/swofty/type/generic/command/commands/TranslatableComponentCommand.java b/type.generic/src/main/java/net/swofty/type/generic/command/commands/TranslatableComponentCommand.java new file mode 100644 index 000000000..a09c37456 --- /dev/null +++ b/type.generic/src/main/java/net/swofty/type/generic/command/commands/TranslatableComponentCommand.java @@ -0,0 +1,32 @@ +package net.swofty.type.generic.command.commands; + +import net.kyori.adventure.text.Component; +import net.minestom.server.command.builder.arguments.ArgumentString; +import net.minestom.server.command.builder.arguments.ArgumentType; +import net.swofty.type.generic.command.CommandParameters; +import net.swofty.type.generic.command.HypixelCommand; +import net.swofty.type.generic.user.HypixelPlayer; +import net.swofty.type.generic.user.categories.Rank; + +@SuppressWarnings("unused") +@CommandParameters(aliases = "translatablecomponent", + description = "Preview a TranslatableComponent", + usage = "/translatablecomponent ", + permission = Rank.STAFF, + allowsConsole = false) +public class TranslatableComponentCommand extends HypixelCommand { + + @Override + public void registerUsage(HypixelCommand.MinestomCommand command) { + ArgumentString arg = ArgumentType.String("translatable"); + + command.addSyntax((sender, context) -> { + if (!permissionCheck(sender)) return; + String key = context.get(arg); + + HypixelPlayer player = (HypixelPlayer) sender; + player.sendMessage(Component.translatable(key)); + }, arg); + } + +} diff --git a/type.generic/src/main/java/net/swofty/type/generic/data/HypixelDataHandler.java b/type.generic/src/main/java/net/swofty/type/generic/data/HypixelDataHandler.java index 11f53e111..4b4740c26 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/data/HypixelDataHandler.java +++ b/type.generic/src/main/java/net/swofty/type/generic/data/HypixelDataHandler.java @@ -207,6 +207,8 @@ public enum Data { CHAT_TYPE("chat_type", DatapointChatType.class, new DatapointChatType("chat_type", new DatapointChatType.ChatType(DatapointChatType.Chats.ALL))), + LOCALE("locale", DatapointLocale.class, new DatapointLocale("locale", new DatapointLocale.LocaleType(DatapointLocale.SupportedLocale.ENGLISH))), + TOGGLES("toggles", DatapointToggles.class, new DatapointToggles("toggles")), GAMEMODE("gamemode", DatapointGamemode.class, new DatapointGamemode("gamemode", GameMode.SURVIVAL), @@ -233,6 +235,7 @@ public enum Data { return null; // Don't update gamemode for non-SkyBlock servers }), + // combine these for a HypixelSkin? could use the same in tab then and other places SKIN_SIGNATURE("skin_signature", DatapointString.class, new DatapointString("skin_signature", "null"), (player, datapoint) -> {}, diff --git a/type.generic/src/main/java/net/swofty/type/generic/data/datapoints/DatapointLocale.java b/type.generic/src/main/java/net/swofty/type/generic/data/datapoints/DatapointLocale.java new file mode 100644 index 000000000..9616844ff --- /dev/null +++ b/type.generic/src/main/java/net/swofty/type/generic/data/datapoints/DatapointLocale.java @@ -0,0 +1,72 @@ +package net.swofty.type.generic.data.datapoints; + +import lombok.Getter; +import net.swofty.commons.protocol.Serializer; +import net.swofty.type.generic.data.Datapoint; + +import java.util.Locale; + +public class DatapointLocale extends Datapoint { + private static final Serializer serializer = new Serializer<>() { + @Override + public String serialize(LocaleType value) { + return value.currentLocale.name(); + } + + @Override + public LocaleType deserialize(String json) { + return new LocaleType(SupportedLocale.valueOf(json)); + } + + @Override + public LocaleType clone(LocaleType value) { + return new LocaleType(value.currentLocale); + } + }; + + public DatapointLocale(String key, LocaleType value) { + super(key, value, serializer); + } + + public DatapointLocale(String key) { + super(key, null, serializer); + } + + @Getter + public static class LocaleType { + private SupportedLocale currentLocale; + + public LocaleType(SupportedLocale currentLocale) { + this.currentLocale = currentLocale; + } + + public void switchTo(SupportedLocale locale) { + this.currentLocale = locale; + } + } + + @Getter + public enum SupportedLocale { + ENGLISH("English", Locale.US, "4cac9774da1217248532ce147f7831f67a12fdcca1cf0cb4b3848de6bc94b4"), + FINNISH("Suomi", Locale.forLanguageTag("fi-FI"), "59f2349729a7ec8d4b1478adfe5ca8af96479e983fbad238ccbd81409b4ed"); + + private final String name; + private final Locale locale; + private final String icon; + + SupportedLocale(String name, Locale locale, String icon) { + this.name = name; + this.locale = locale; + this.icon = icon; + } + + public static SupportedLocale fromLocale(Locale locale) { + for (SupportedLocale sl : values()) { + if (sl.locale.equals(locale)) { + return sl; + } + } + throw new IllegalArgumentException("Unsupported locale: " + locale); + } + } +} diff --git a/type.generic/src/main/java/net/swofty/type/generic/entity/npc/DialogueController.java b/type.generic/src/main/java/net/swofty/type/generic/entity/npc/DialogueController.java index d72d37909..2b017034f 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/entity/npc/DialogueController.java +++ b/type.generic/src/main/java/net/swofty/type/generic/entity/npc/DialogueController.java @@ -1,5 +1,6 @@ package net.swofty.type.generic.entity.npc; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.timer.Scheduler; import net.minestom.server.timer.TaskSchedule; @@ -70,7 +71,7 @@ private void handleLineSendingLoop(HypixelPlayer player, HypixelNPC.DialogueSet npc.sendNPCMessage(player, dialogueSet.lines()[0]); } - String[] newLines = new String[dialogueSet.lines().length - 1]; + Component[] newLines = new Component[dialogueSet.lines().length - 1]; System.arraycopy(dialogueSet.lines(), 1, newLines, 0, dialogueSet.lines().length - 1); if (newLines.length == 0) { diff --git a/type.generic/src/main/java/net/swofty/type/generic/entity/npc/HypixelNPC.java b/type.generic/src/main/java/net/swofty/type/generic/entity/npc/HypixelNPC.java index b4fdea495..559e634a5 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/entity/npc/HypixelNPC.java +++ b/type.generic/src/main/java/net/swofty/type/generic/entity/npc/HypixelNPC.java @@ -4,6 +4,8 @@ import lombok.Getter; import net.kyori.adventure.key.Key; import net.kyori.adventure.sound.Sound; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; import net.minestom.server.coordinate.Pos; import net.minestom.server.entity.Entity; import net.minestom.server.entity.GameMode; @@ -18,12 +20,10 @@ import net.swofty.type.generic.event.custom.NPCInteractEvent; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.user.HypixelPlayer; -import org.jetbrains.annotations.Nullable; import org.tinylog.Logger; import java.util.ArrayList; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Random; import java.util.UUID; @@ -42,6 +42,7 @@ public abstract class HypixelNPC { @Getter private final NPCConfiguration parameters; private final DialogueController dialogueController; + public HypixelNPC(NPCConfiguration configuration) { this.parameters = configuration; this.dialogueController = new DialogueController(this); @@ -192,6 +193,10 @@ public void unregister() { } public void sendNPCMessage(HypixelPlayer player, String message) { + sendNPCMessage(player, Component.text(message)); + } + + public void sendNPCMessage(HypixelPlayer player, Component message) { sendNPCMessage(player, message, Sound.sound().type(Key.key("entity.villager.celebrate")).volume(1.0f).pitch(0.8f + new Random().nextFloat() * 0.4f).build()); } @@ -201,7 +206,16 @@ public String getName() { } public void sendNPCMessage(HypixelPlayer player, String message, Sound sound) { - player.sendMessage("§e[NPC] " + getName() + "§f: " + message); + sendNPCMessage(player, Component.text(message), sound); + } + + public void sendNPCMessage(HypixelPlayer player, Component message, Sound sound) { + player.sendMessage(Component.text() + .append(Component.text("[NPC] ", NamedTextColor.YELLOW)) + .append(Component.text(getName(), NamedTextColor.YELLOW)) + .append(Component.text(": ", NamedTextColor.WHITE)) + .append(message) + .build()); player.playSound(sound); } @@ -269,43 +283,45 @@ public Entity get(HypixelNPC npc) { } @Builder - public record DialogueSet(String key, String[] lines, Sound sound) { + public record DialogueSet(String key, Component[] lines, Sound sound) { public static final DialogueSet[] EMPTY = new DialogueSet[0]; - public static DialogueSet ofTranslation(String key, String translationKey) { - return new DialogueSet(key, I18n.dialogueLines(translationKey), null); - } + public static class DialogueSetBuilder { + public DialogueSetBuilder lines(Component[] lines) { + this.lines = lines; + return this; + } - public static DialogueSet ofTranslation(String key, String translationKey, Sound sound) { - return new DialogueSet(key, I18n.dialogueLines(translationKey), sound); - } + public DialogueSetBuilder lines(String[] lines) { + if (lines == null) { + this.lines = null; + return this; + } - public static DialogueSet ofTranslation(String key, String translationKey, Map placeholders) { - return new DialogueSet(key, I18n.dialogueLines(translationKey, placeholders), null); + Component[] components = new Component[lines.length]; + for (int i = 0; i < lines.length; i++) { + components[i] = Component.text(lines[i]); + } + this.lines = components; + return this; + } } - public static DialogueSet ofTranslation(String key, String translationKey, Map placeholders, Sound sound) { - return new DialogueSet(key, I18n.dialogueLines(translationKey, placeholders), sound); + public static DialogueSet ofTranslation(String key, String translationKey) { + return new DialogueSet(key, I18n.iterable(translationKey), null); } - public static DialogueSet ofTranslation(String key, String translationKey, @Nullable HypixelPlayer player) { - Locale locale = player != null ? player.getLocale() : Locale.US; - return new DialogueSet(key, I18n.dialogueLines(translationKey, locale), null); + public static DialogueSet ofTranslation(String key, String translationKey, Component... args) { + return new DialogueSet(key, I18n.iterable(translationKey, args), null); } - public static DialogueSet ofTranslation(String key, String translationKey, @Nullable HypixelPlayer player, Sound sound) { - Locale locale = player != null ? player.getLocale() : Locale.US; - return new DialogueSet(key, I18n.dialogueLines(translationKey, locale), sound); + public static DialogueSet ofTranslation(String key, String translationKey, Sound sound) { + return new DialogueSet(key, I18n.iterable(translationKey), sound); } - public static DialogueSet ofTranslation(String key, String translationKey, @Nullable HypixelPlayer player, Map placeholders) { - Locale locale = player != null ? player.getLocale() : Locale.US; - return new DialogueSet(key, I18n.dialogueLines(translationKey, locale, placeholders), null); + public static DialogueSet ofTranslation(String key, String translationKey, Sound sound, Component... args) { + return new DialogueSet(key, I18n.iterable(translationKey, args), sound); } - public static DialogueSet ofTranslation(String key, String translationKey, @Nullable HypixelPlayer player, Map placeholders, Sound sound) { - Locale locale = player != null ? player.getLocale() : Locale.US; - return new DialogueSet(key, I18n.dialogueLines(translationKey, locale, placeholders), sound); - } } } diff --git a/type.generic/src/main/java/net/swofty/type/generic/event/actions/ActionPlayerMute.java b/type.generic/src/main/java/net/swofty/type/generic/event/actions/ActionPlayerMute.java index fcf9e9387..a52bbb093 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/event/actions/ActionPlayerMute.java +++ b/type.generic/src/main/java/net/swofty/type/generic/event/actions/ActionPlayerMute.java @@ -6,12 +6,15 @@ import net.swofty.commons.protocol.objects.punishment.GetActivePunishmentProtocolObject; import net.swofty.commons.punishment.ActivePunishment; import net.swofty.commons.punishment.PunishmentMessages; +import net.swofty.commons.punishment.PunishmentReason; +import net.swofty.commons.punishment.PunishmentTag; import net.swofty.commons.punishment.PunishmentType; import net.swofty.proxyapi.ProxyService; import net.swofty.type.generic.event.EventNodes; import net.swofty.type.generic.event.HypixelEvent; import net.swofty.type.generic.event.HypixelEventClass; +import java.util.List; import java.util.concurrent.TimeUnit; public class ActionPlayerMute implements HypixelEventClass { @@ -27,12 +30,11 @@ public void onPlayerChat(PlayerChatEvent event) { .join(); if (response instanceof GetActivePunishmentProtocolObject.GetActivePunishmentResponse( - boolean found, String type, String banId, net.swofty.commons.punishment.PunishmentReason reason, - long expiresAt, java.util.List tags + boolean found, String type, String banId, PunishmentReason reason, + long expiresAt, List tags ) && found) { event.setCancelled(true); - ActivePunishment punishment = new ActivePunishment( - type, banId, reason, expiresAt, tags); + ActivePunishment punishment = new ActivePunishment(type, banId, reason, expiresAt, tags); player.sendMessage(PunishmentMessages.muteMessage(punishment)); } } catch (Exception ignored) { diff --git a/type.generic/src/main/java/net/swofty/type/generic/event/actions/data/ActionPlayerDataLoad.java b/type.generic/src/main/java/net/swofty/type/generic/event/actions/data/ActionPlayerDataLoad.java index 2bfccd957..e4e051ee3 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/event/actions/data/ActionPlayerDataLoad.java +++ b/type.generic/src/main/java/net/swofty/type/generic/event/actions/data/ActionPlayerDataLoad.java @@ -7,6 +7,7 @@ import net.swofty.type.generic.data.GameDataHandler; import net.swofty.type.generic.data.GameDataHandlerRegistry; import net.swofty.type.generic.data.HypixelDataHandler; +import net.swofty.type.generic.data.datapoints.DatapointLocale; import net.swofty.type.generic.data.mongodb.UserDatabase; import net.swofty.type.generic.event.EventNodes; import net.swofty.type.generic.event.HypixelEvent; @@ -16,6 +17,7 @@ import org.tinylog.Logger; import java.util.List; +import java.util.Locale; import java.util.UUID; public class ActionPlayerDataLoad implements HypixelEventClass { @@ -42,6 +44,9 @@ public void run(AsyncPlayerConfigurationEvent event) { userDatabase.saveData(handler); } + Locale loc = handler.get(HypixelDataHandler.Data.LOCALE, DatapointLocale.class).getValue().getCurrentLocale().getLocale(); + player.setLocale(loc); + // Load additional game handlers based on TypeLoader configuration List> additionalHandlers = HypixelConst.getTypeLoader().getAdditionalDataHandlers(); diff --git a/type.generic/src/main/java/net/swofty/type/generic/event/actions/gui/ActionPlayerInventoryClick.java b/type.generic/src/main/java/net/swofty/type/generic/event/actions/gui/ActionPlayerInventoryClick.java index d58153bc7..89af1717e 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/event/actions/gui/ActionPlayerInventoryClick.java +++ b/type.generic/src/main/java/net/swofty/type/generic/event/actions/gui/ActionPlayerInventoryClick.java @@ -21,86 +21,96 @@ public class ActionPlayerInventoryClick implements HypixelEventClass { - @HypixelEvent(node = EventNodes.PLAYER, requireDataLoaded = false) - public void run(InventoryPreClickEvent event) { - final HypixelPlayer player = (HypixelPlayer) event.getPlayer(); - ItemStack clickedItem = event.getClickedItem(); - ItemStack cursorItem = player.getInventory().getCursorItem(); - - // Check for offhand - if (event.getSlot() == 45) { - event.setCancelled(true); - return; - } - - Component displayNameCursor = cursorItem.get(DataComponents.CUSTOM_NAME); - Component displayNameClicked = clickedItem.get(DataComponents.CUSTOM_NAME); - if ((displayNameCursor != null && StringUtility.getTextFromComponent(displayNameCursor).contains("Switch your held")) - || (displayNameClicked != null && StringUtility.getTextFromComponent(displayNameClicked).contains("Switch your held"))) { - event.setCancelled(true); - return; - } - - if (HypixelInventoryGUI.GUI_MAP.containsKey(player.getUuid())) { - HypixelInventoryGUI gui = HypixelInventoryGUI.GUI_MAP.get(player.getUuid()); - if (gui == null) return; - - if (event.getClick() instanceof Click.Double) { - event.setCancelled(true); - return; - } - - if (!gui.allowHotkeying() && isHotKey(event)) { - event.setCancelled(true); - return; - } - - if (event.getInventory() instanceof PlayerInventory) { - gui.onBottomClick(event); - } else { - int slot = event.getSlot(); - GUIItem item = gui.get(slot); - - if (item == null) { - return; - } - - if (!item.canPickup()) { - event.setCancelled(true); - } else if (!gui.allowHotkeying() && isHotKey(event)) { - event.setCancelled(true); - return; - } - - if (item instanceof GUIClickableItem clickable) { - clickable.run(event, player); - if (!(cursorItem.material() == Material.AIR) && player.getOpenInventory() != event.getInventory() - && player.getOpenInventory() != null && !(event.getClick() instanceof Click.HotbarSwap)) { - player.getInventory().addItemStack(cursorItem); - } - } - - if (item instanceof GUIQueryItem query) { - gui.onClose(new InventoryCloseEvent( - player.getOpenInventory(), - player, - false - ), HypixelInventoryGUI.CloseReason.SIGN_OPENED); - - new HypixelSignGUI(player).open(query.lines()).thenAccept(string -> { - HypixelInventoryGUI nextGui = query.onQueryFinish(string, player); - if (nextGui != null && string != null) - nextGui.open(player); - }); - } - } - } - } - - public boolean isHotKey(InventoryPreClickEvent inventoryClick) { - return inventoryClick.getClick() instanceof Click.Drag || - inventoryClick.getClick() instanceof Click.HotbarSwap || - inventoryClick.getClick() instanceof Click.LeftShift || - inventoryClick.getClick() instanceof Click.RightShift; - } + @HypixelEvent(node = EventNodes.PLAYER, requireDataLoaded = false) + public void run(InventoryPreClickEvent event) { + final HypixelPlayer player = (HypixelPlayer) event.getPlayer(); + try { + handle(event, player); + } catch (Exception e) { + event.setCancelled(true); + player.closeInventory(); + player.sendMessage("§cSomething went wrong while handling your click!"); + } + } + + public void handle(InventoryPreClickEvent event, final HypixelPlayer player) { + ItemStack clickedItem = event.getClickedItem(); + ItemStack cursorItem = player.getInventory().getCursorItem(); + + // Check for offhand + if (event.getSlot() == 45) { + event.setCancelled(true); + return; + } + + Component displayNameCursor = cursorItem.get(DataComponents.CUSTOM_NAME); + Component displayNameClicked = clickedItem.get(DataComponents.CUSTOM_NAME); + if ((displayNameCursor != null && StringUtility.getTextFromComponent(displayNameCursor).contains("Switch your held")) + || (displayNameClicked != null && StringUtility.getTextFromComponent(displayNameClicked).contains("Switch your held"))) { + event.setCancelled(true); + return; + } + + if (HypixelInventoryGUI.GUI_MAP.containsKey(player.getUuid())) { + HypixelInventoryGUI gui = HypixelInventoryGUI.GUI_MAP.get(player.getUuid()); + if (gui == null) return; + + if (event.getClick() instanceof Click.Double) { + event.setCancelled(true); + return; + } + + if (!gui.allowHotkeying() && isHotKey(event)) { + event.setCancelled(true); + return; + } + + if (event.getInventory() instanceof PlayerInventory) { + gui.onBottomClick(event); + } else { + int slot = event.getSlot(); + GUIItem item = gui.get(slot); + + if (item == null) { + return; + } + + if (!item.canPickup()) { + event.setCancelled(true); + } else if (!gui.allowHotkeying() && isHotKey(event)) { + event.setCancelled(true); + return; + } + + if (item instanceof GUIClickableItem clickable) { + clickable.run(event, player); + if (!(cursorItem.material() == Material.AIR) && player.getOpenInventory() != event.getInventory() + && player.getOpenInventory() != null && !(event.getClick() instanceof Click.HotbarSwap)) { + player.getInventory().addItemStack(cursorItem); + } + } + + if (item instanceof GUIQueryItem query) { + gui.onClose(new InventoryCloseEvent( + player.getOpenInventory(), + player, + false + ), HypixelInventoryGUI.CloseReason.SIGN_OPENED); + + new HypixelSignGUI(player).open(query.lines()).thenAccept(string -> { + HypixelInventoryGUI nextGui = query.onQueryFinish(string, player); + if (nextGui != null && string != null) + nextGui.open(player); + }); + } + } + } + } + + public boolean isHotKey(InventoryPreClickEvent inventoryClick) { + return inventoryClick.getClick() instanceof Click.Drag || + inventoryClick.getClick() instanceof Click.HotbarSwap || + inventoryClick.getClick() instanceof Click.LeftShift || + inventoryClick.getClick() instanceof Click.RightShift; + } } diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/HypixelInventoryGUI.java b/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/HypixelInventoryGUI.java index 164ada17e..378b86d71 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/HypixelInventoryGUI.java +++ b/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/HypixelInventoryGUI.java @@ -16,7 +16,13 @@ import net.swofty.type.generic.user.HypixelPlayer; import org.tinylog.Logger; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; @Getter @@ -27,7 +33,7 @@ public abstract class HypixelInventoryGUI { .set(DataComponents.CUSTOM_NAME, Component.space()) .set(DataComponents.TOOLTIP_DISPLAY, TooltipDisplay.EMPTY); - protected String title; + protected Component title; protected InventoryType size; protected final List items; private Inventory inventory; @@ -36,6 +42,12 @@ public abstract class HypixelInventoryGUI { private int itemInHand = 0; public HypixelInventoryGUI(String title, InventoryType size) { + this.title = Component.text(title); + this.size = size; + this.items = Collections.synchronizedList(new ArrayList<>()); + } + + public HypixelInventoryGUI(Component title, InventoryType size) { this.title = title; this.size = size; this.items = Collections.synchronizedList(new ArrayList<>()); @@ -296,7 +308,7 @@ public int firstEmpty() { public void open(HypixelPlayer player) { this.player = player; this.itemInHand = player.getHeldSlot(); - this.inventory = new Inventory(size, getTitle()); + this.inventory = new Inventory(size, title); HypixelInventoryGUI previouslyOpen = GUI_MAP.get(player.getUuid()); if (previouslyOpen != null) { @@ -312,7 +324,7 @@ public void open(HypixelPlayer player) { if (previouslyOpen.getInventory().getInventoryType() == size) { inventory = previouslyOpen.getInventory(); - inventory.setTitle(Component.text(getTitle())); + inventory.setTitle(title); for (int slot = 0; slot < inventory.getSize(); slot++) { inventory.setItemStack(slot, ItemStack.AIR); } @@ -362,7 +374,13 @@ public void open(HypixelPlayer player) { } protected void setTitle(String title) { - inventory.setTitle(Component.text(title)); + this.title = Component.text(title); + inventory.setTitle(this.title); + } + + protected void setTitle(Component title) { + this.title = title; + inventory.setTitle(this.title); } /** diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/HypixelPaginatedGUI.java b/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/HypixelPaginatedGUI.java index 1d949f624..862b5ee52 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/HypixelPaginatedGUI.java +++ b/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/HypixelPaginatedGUI.java @@ -1,5 +1,6 @@ package net.swofty.type.generic.gui.inventory; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; @@ -50,7 +51,7 @@ public void open(HypixelPlayer player, String query, int page) { paged.removeIf(type -> shouldFilterFromSearch(query, type)); } - this.title = getTitle(player, query, page, paged); + this.title = Component.text(getTitle(player, query, page, paged)); latestPaged = paged; try { diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/ItemStackCreator.java b/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/ItemStackCreator.java index 033346163..51203b2be 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/ItemStackCreator.java +++ b/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/ItemStackCreator.java @@ -2,6 +2,7 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.TextDecoration; +import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import net.minestom.server.component.DataComponents; import net.minestom.server.entity.PlayerSkin; import net.minestom.server.item.ItemStack; @@ -14,7 +15,11 @@ import net.swofty.type.generic.gui.inventory.item.GUIMaterial; import org.json.JSONObject; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Base64; +import java.util.List; +import java.util.Set; import java.util.stream.Collectors; /** @@ -25,6 +30,7 @@ public class ItemStackCreator { private static final TooltipDisplay DEFAULT_TOOLTIP_DISPLAY = new TooltipDisplay(false, Set.of( DataComponents.UNBREAKABLE )); + private static final LegacyComponentSerializer LEGACY_SERIALIZER = LegacyComponentSerializer.legacySection(); /** * Creates an {@link ItemStack.Builder} with a specified material and custom name. @@ -39,6 +45,19 @@ public static ItemStack.Builder createNamedItemStack(Material material, String n .set(DataComponents.TOOLTIP_DISPLAY, DEFAULT_TOOLTIP_DISPLAY)); } + /** + * Creates an {@link ItemStack.Builder} with a specified material and custom name. + * + * @param material the material of the item stack + * @param name the custom name of the item stack + * @return an {@link ItemStack.Builder} with the specified properties + */ + public static ItemStack.Builder createNamedItemStack(Material material, Component name) { + return clearAttributes(ItemStack.builder(material) + .set(DataComponents.CUSTOM_NAME, name.decoration(TextDecoration.ITALIC, false)) + .set(DataComponents.TOOLTIP_DISPLAY, DEFAULT_TOOLTIP_DISPLAY)); + } + /** * Clears attribute modifiers from the given {@link ItemStack.Builder}. * @@ -110,6 +129,27 @@ public static ItemStack.Builder getStack(String name, Material material, int amo return getStack(name, material, amount, Arrays.asList(lore)); } + public static ItemStack.Builder getStack(String name, Material material, int amount) { + return getStack(name, material, amount, new String[0]); + } + + public static ItemStack.Builder getStack(String name, Material material, int amount, Component... lore) { + return getStack(Component.text(name), material, amount, Arrays.asList(lore)); + } + + /** + * Creates an {@link ItemStack.Builder} with specified name, material, amount, and lore. + * + * @param name the name of the item stack + * @param material the material of the item stack + * @param amount the amount of items in the stack + * @param lore the lore of the item stack + * @return an {@link ItemStack.Builder} with the specified properties + */ + public static ItemStack.Builder getStack(Component name, Material material, int amount, Component... lore) { + return getStack(name, material, amount, Arrays.asList(lore)); + } + /** * Updates the lore of the given {@link ItemStack.Builder} with the specified lore lines. * @@ -120,7 +160,7 @@ public static ItemStack.Builder getStack(String name, Material material, int amo public static ItemStack.Builder updateLore(ItemStack.Builder builder, List lore) { List copiedLore = new ArrayList<>(); for (String s : lore) { - copiedLore.add(color(s)); + copiedLore.add(replaceColorCodes(s)); } return clearAttributes(builder.set(DataComponents.LORE, copiedLore.stream() @@ -139,7 +179,7 @@ public static ItemStack.Builder updateLore(ItemStack.Builder builder, List lore) { List existingLore = new ArrayList<>(builder.build().get(DataComponents.LORE)); for (String s : lore) { - existingLore.add(Component.text(color(s)).decoration(TextDecoration.ITALIC, false)); + existingLore.add(Component.text(replaceColorCodes(s)).decoration(TextDecoration.ITALIC, false)); } return clearAttributes(builder.set(DataComponents.LORE, existingLore) @@ -191,17 +231,27 @@ public static ItemStack.Builder getFromStack(ItemStack stack) { * @param lore the list of lore lines for the item stack * @return an {@link ItemStack.Builder} with the specified properties */ - public static ItemStack.Builder getStack(String name, Material material, int amount, List lore) { - List copiedLore = new ArrayList<>(); - for (String s : lore) { - copiedLore.add(color(s)); - } + public static ItemStack.Builder getStack(String name, Material material, int amount, List lore) { + return getStack(Component.text(name), material, amount, literalLoreComponents(lore)); + } + + /** + * Creates an {@link ItemStack.Builder} with the specified name, material, amount, and lore list. + * + * @param name the name of the item stack + * @param material the material of the item stack + * @param amount the amount of items in the stack + * @param lore the list of lore lines for the item stack + * @return an {@link ItemStack.Builder} with the specified properties + */ + public static ItemStack.Builder getStack(Component name, Material material, int amount, List lore) { + List copiedLore = new ArrayList<>(lore); return clearAttributes(ItemStack.builder(material).amount(amount).set(DataComponents.LORE, copiedLore.stream() - .map(line -> Component.text(line).decoration(TextDecoration.ITALIC, false)) - .collect(Collectors.toList())) - .set(DataComponents.CUSTOM_NAME, Component.text(name).decoration(TextDecoration.ITALIC, false)) - .set(DataComponents.TOOLTIP_DISPLAY, DEFAULT_TOOLTIP_DISPLAY)); + .map(line -> line.decoration(TextDecoration.ITALIC, false)) + .collect(Collectors.toList())) + .set(DataComponents.CUSTOM_NAME, name.decoration(TextDecoration.ITALIC, false)) + .set(DataComponents.TOOLTIP_DISPLAY, DEFAULT_TOOLTIP_DISPLAY)); } /** @@ -217,6 +267,18 @@ public static ItemStack.Builder getStackHead(String name, String texture, int am return getStackHead(name, texture, amount, Arrays.asList(lore)); } + public static ItemStack.Builder getStackHead(String name, String texture, int amount) { + return getStackHead(name, texture, amount, new String[0]); + } + + public static ItemStack.Builder getStackHead(String name, String texture, int amount, Component... lore) { + return getStackHead(Component.text(name), texture, amount, Arrays.asList(lore)); + } + + public static ItemStack.Builder getStackHead(Component name, String texture, int amount, Component... lore) { + return getStackHead(name, texture, amount, Arrays.asList(lore)); + } + /** * Creates an {@link ItemStack.Builder} for a player head with the specified name and texture. * @@ -251,6 +313,18 @@ public static ItemStack.Builder getStackHead(String name, PlayerSkin skin, int a return getStackHead(name, skin, amount, Arrays.asList(lore)); } + public static ItemStack.Builder getStackHead(String name, PlayerSkin skin, int amount) { + return getStackHead(name, skin, amount, new String[0]); + } + + public static ItemStack.Builder getStackHead(String name, PlayerSkin skin, int amount, Component... lore) { + return getStackHead(Component.text(name), skin, amount, Arrays.asList(lore)); + } + + public static ItemStack.Builder getStackHead(Component name, PlayerSkin skin, int amount, Component... lore) { + return getStackHead(name, skin, amount, Arrays.asList(lore)); + } + /** * Creates an {@link ItemStack.Builder} for a player head with a specified name, texture, amount, and lore list. * @@ -260,12 +334,7 @@ public static ItemStack.Builder getStackHead(String name, PlayerSkin skin, int a * @param lore the list of lore lines for the item stack * @return an {@link ItemStack.Builder} for a player head with the specified properties */ - public static ItemStack.Builder getStackHead(String name, String texture, int amount, List lore) { - List copiedLore = new ArrayList<>(); - for (String s : lore) { - copiedLore.add(color(s)); - } - + public static ItemStack.Builder getStackHead(String name, String texture, int amount, List lore) { JSONObject json = new JSONObject(); json.put("isPublic", true); json.put("signatureRequired", false); @@ -275,12 +344,31 @@ public static ItemStack.Builder getStackHead(String name, String texture, int am String texturesEncoded = Base64.getEncoder().encodeToString(json.toString().getBytes()); return ItemStack.builder(Material.PLAYER_HEAD) - .set(DataComponents.LORE, copiedLore.stream() - .map(line -> Component.text(line).decoration(TextDecoration.ITALIC, false)) + .set(DataComponents.LORE, literalLoreComponents(lore).stream() + .map(line -> line.decoration(TextDecoration.ITALIC, false)) .collect(Collectors.toList())) .set(DataComponents.CUSTOM_NAME, Component.text(name).decoration(TextDecoration.ITALIC, false)) .set(DataComponents.TOOLTIP_DISPLAY, DEFAULT_TOOLTIP_DISPLAY) .set(DataComponents.PROFILE, new ResolvableProfile(new PlayerSkin(texturesEncoded, null))) + .amount(amount); + } + + public static ItemStack.Builder getStackHead(Component name, String texture, int amount, List lore) { + JSONObject json = new JSONObject(); + json.put("isPublic", true); + json.put("signatureRequired", false); + json.put("textures", new JSONObject().put("SKIN", + new JSONObject().put("url", "http://textures.minecraft.net/texture/" + texture).put("metadata", new JSONObject().put("model", "slim")))); + + String texturesEncoded = Base64.getEncoder().encodeToString(json.toString().getBytes()); + + return ItemStack.builder(Material.PLAYER_HEAD) + .set(DataComponents.LORE, new ArrayList<>(lore).stream() + .map(line -> line.decoration(TextDecoration.ITALIC, false)) + .collect(Collectors.toList())) + .set(DataComponents.CUSTOM_NAME, name.decoration(TextDecoration.ITALIC, false)) + .set(DataComponents.TOOLTIP_DISPLAY, DEFAULT_TOOLTIP_DISPLAY) + .set(DataComponents.PROFILE, new ResolvableProfile(new PlayerSkin(texturesEncoded, null))) .amount(amount); } @@ -293,15 +381,10 @@ public static ItemStack.Builder getStackHead(String name, String texture, int am * @param lore the list of lore lines for the item stack * @return an {@link ItemStack.Builder} for a player head with the specified properties */ - public static ItemStack.Builder getStackHead(String name, PlayerSkin skin, int amount, List lore) { - List copiedLore = new ArrayList<>(); - for (String s : lore) { - copiedLore.add(color(s)); - } - + public static ItemStack.Builder getStackHead(String name, PlayerSkin skin, int amount, List lore) { return clearAttributes(ItemStack.builder(Material.PLAYER_HEAD) - .set(DataComponents.LORE, copiedLore.stream() - .map(line -> Component.text(line).decoration(TextDecoration.ITALIC, false)) + .set(DataComponents.LORE, literalLoreComponents(lore).stream() + .map(line -> line.decoration(TextDecoration.ITALIC, false)) .collect(Collectors.toList())) .set(DataComponents.CUSTOM_NAME, Component.text(name).decoration(TextDecoration.ITALIC, false)) .set(DataComponents.TOOLTIP_DISPLAY, new TooltipDisplay(true, Set.of( @@ -311,10 +394,26 @@ public static ItemStack.Builder getStackHead(String name, PlayerSkin skin, int a DataComponents.UNBREAKABLE ))) .set(DataComponents.PROFILE, new ResolvableProfile(skin)) + .amount(amount)); + } + + public static ItemStack.Builder getStackHead(Component name, PlayerSkin skin, int amount, List lore) { + return clearAttributes(ItemStack.builder(Material.PLAYER_HEAD) + .set(DataComponents.LORE, new ArrayList<>(lore).stream() + .map(line -> line.decoration(TextDecoration.ITALIC, false)) + .collect(Collectors.toList())) + .set(DataComponents.CUSTOM_NAME, name.decoration(TextDecoration.ITALIC, false)) + .set(DataComponents.TOOLTIP_DISPLAY, new TooltipDisplay(true, Set.of( + DataComponents.CONSUMABLE, + DataComponents.DAMAGE, + DataComponents.BASE_COLOR, + DataComponents.UNBREAKABLE + ))) + .set(DataComponents.PROFILE, new ResolvableProfile(skin)) .amount(amount)); } - public static ItemStack.Builder getUsingGUIMaterial(String name, GUIMaterial material, int amount, List lore) { + public static ItemStack.Builder getUsingGUIMaterial(String name, GUIMaterial material, int amount, List lore) { if (material.hasTexture()) { return ItemStackCreator.getStackHead(name, material.texture(), amount, lore); } else { @@ -332,8 +431,24 @@ public static ItemStack.Builder getUsingGUIMaterial(String name, GUIMaterial mat * @param string the input string with color codes * @return the string with color codes replaced */ - public static String color(String string) { + public static String replaceColorCodes(String string) { return string.replace("&", "§"); } -} + public static List literalLoreComponents(List lore) { + List loreComponents = new ArrayList<>(); + for (Object line : lore) { + if (line == null) { + continue; + } + + if (line instanceof Component component) { + loreComponents.add(component); + continue; + } + + loreComponents.add(LEGACY_SERIALIZER.deserialize(replaceColorCodes(String.valueOf(line)))); + } + return loreComponents; + } +} diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/TranslatableItemStackCreator.java b/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/TranslatableItemStackCreator.java index b70cb6669..c81e5d502 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/TranslatableItemStackCreator.java +++ b/type.generic/src/main/java/net/swofty/type/generic/gui/inventory/TranslatableItemStackCreator.java @@ -1,54 +1,72 @@ package net.swofty.type.generic.gui.inventory; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.ComponentLike; import net.minestom.server.entity.PlayerSkin; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.type.generic.i18n.I18n; -import net.swofty.type.generic.user.HypixelPlayer; import java.util.List; -import java.util.Locale; -import java.util.Map; public class TranslatableItemStackCreator { - public static ItemStack.Builder getStack(HypixelPlayer p, String nameKey, Material mat, int amt, String loreKey) { - Locale l = p.getLocale(); - return ItemStackCreator.getStack(I18n.string(nameKey, l), mat, amt, I18n.lore(loreKey, l)); + private static Component[] resolveLore(String loreKey, ComponentLike... loreArgs) { + try { + return loreArgs.length == 0 + ? I18n.iterable(loreKey) + : I18n.iterable(loreKey, loreArgs); + } catch (IllegalStateException exception) { + if (!isMissingIterableKey(exception)) { + throw exception; + } + + return new Component[]{ + loreArgs.length == 0 + ? I18n.t(loreKey) + : I18n.t(loreKey, loreArgs) + }; + } + } + + private static boolean isMissingIterableKey(IllegalStateException exception) { + String message = exception.getMessage(); + return message != null && message.startsWith("Missing dialogue translation key in en_US:"); + } + + public static ItemStack.Builder getStack(String nameKey, Material mat, int amt, String loreKey) { + return ItemStackCreator.getStack(I18n.t(nameKey), mat, amt, resolveLore(loreKey)); + } + + public static ItemStack.Builder getStack(String nameKey, Material mat, int amt, String loreKey, ComponentLike... loreArgs) { + return ItemStackCreator.getStack(I18n.t(nameKey), mat, amt, resolveLore(loreKey, loreArgs)); } - public static ItemStack.Builder getStack(HypixelPlayer p, String nameKey, Material mat, int amt, String loreKey, Map ph) { - Locale l = p.getLocale(); - return ItemStackCreator.getStack(I18n.string(nameKey, l), mat, amt, I18n.lore(loreKey, l, ph)); + public static ItemStack.Builder getStack(String nameKey, Material mat, int amt, List lore) { + return ItemStackCreator.getStack(I18n.t(nameKey), mat, amt, ItemStackCreator.literalLoreComponents(lore)); } - public static ItemStack.Builder getStack(HypixelPlayer p, String nameKey, Material mat, int amt, List lore) { - Locale l = p.getLocale(); - return ItemStackCreator.getStack(I18n.string(nameKey, l), mat, amt, lore); + public static ItemStack.Builder getStack(String nameKey, Material mat, int amt) { + return ItemStackCreator.getStack(I18n.t(nameKey), mat, amt, List.of()); } - public static ItemStack.Builder getStack(HypixelPlayer p, String nameKey, Material mat, int amt) { - Locale l = p.getLocale(); - return ItemStackCreator.getStack(I18n.string(nameKey, l), mat, amt); + public static ItemStack.Builder getStackHead(String nameKey, String texture, int amt, String loreKey) { + return ItemStackCreator.getStackHead(I18n.t(nameKey), texture, amt, resolveLore(loreKey)); } - public static ItemStack.Builder getStackHead(HypixelPlayer p, String nameKey, String texture, int amt, String loreKey) { - Locale l = p.getLocale(); - return ItemStackCreator.getStackHead(I18n.string(nameKey, l), texture, amt, I18n.lore(loreKey, l)); + public static ItemStack.Builder getStackHead(String nameKey, String texture, int amt, String loreKey, Component... loreArgs) { + return ItemStackCreator.getStackHead(I18n.t(nameKey), texture, amt, resolveLore(loreKey, loreArgs)); } - public static ItemStack.Builder getStackHead(HypixelPlayer p, String nameKey, String texture, int amt, String loreKey, Map ph) { - Locale l = p.getLocale(); - return ItemStackCreator.getStackHead(I18n.string(nameKey, l), texture, amt, I18n.lore(loreKey, l, ph)); + public static ItemStack.Builder getStackHead(String nameKey, String texture, int amt, List lore) { + return ItemStackCreator.getStackHead(I18n.t(nameKey), texture, amt, ItemStackCreator.literalLoreComponents(lore)); } - public static ItemStack.Builder getStackHead(HypixelPlayer p, String nameKey, String texture, int amt, List lore) { - Locale l = p.getLocale(); - return ItemStackCreator.getStackHead(I18n.string(nameKey, l), texture, amt, lore); + public static ItemStack.Builder getStackHead(String nameKey, PlayerSkin skin, int amt, List lore) { + return ItemStackCreator.getStackHead(I18n.t(nameKey), skin, amt, ItemStackCreator.literalLoreComponents(lore)); } - public static ItemStack.Builder getStackHead(HypixelPlayer p, String nameKey, PlayerSkin skin, int amt, List lore) { - Locale l = p.getLocale(); - return ItemStackCreator.getStackHead(I18n.string(nameKey, l), skin, amt, lore); + public static ItemStack.Builder getStackHead(String nameKey, PlayerSkin skin, int amt, Component... lore) { + return ItemStackCreator.getStackHead(I18n.t(nameKey), skin, amt, lore); } } diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/ViewConfiguration.java b/type.generic/src/main/java/net/swofty/type/generic/gui/v2/ViewConfiguration.java index dd5b50959..fed374201 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/ViewConfiguration.java +++ b/type.generic/src/main/java/net/swofty/type/generic/gui/v2/ViewConfiguration.java @@ -43,7 +43,7 @@ public static ViewConfiguration withString(StringTitle title, Inventor } public static ViewConfiguration translatable(String titleKey, InventoryType type) { - return new ViewConfiguration<>((StringTitle) (s, ctx) -> I18n.string(titleKey, ctx.player().getLocale()), type); + return new ViewConfiguration<>((Title) (_, _) -> I18n.t(titleKey), type); } @FunctionalInterface diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestContainerView.java b/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestContainerView.java deleted file mode 100644 index 165695ae1..000000000 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestContainerView.java +++ /dev/null @@ -1,72 +0,0 @@ -package net.swofty.type.generic.gui.v2.test; - -import net.minestom.server.inventory.InventoryType; -import net.minestom.server.item.ItemStack; -import net.minestom.server.item.Material; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; -import net.swofty.type.generic.gui.v2.context.ClickContext; -import net.swofty.type.generic.gui.v2.context.ViewContext; - -import java.util.HashMap; -import java.util.Map; - -public final class TestContainerView implements StatefulView { - - private static final int[] STORAGE_SLOTS = {10, 11, 12, 13, 14, 15, 16}; - - public record State(Map items) { - public State withItem(int slot, ItemStack item) { - Map newItems = new HashMap<>(items); - if (item.isAir()) { - newItems.remove(slot); - } else { - newItems.put(slot, item); - } - return new State(newItems); - } - - public int itemCount() { - return (int) items.values().stream().filter(i -> !i.isAir()).count(); - } - } - - @Override - public State initialState() { - return new State(new HashMap<>()); - } - - @Override - public ViewConfiguration configuration() { - return new ViewConfiguration<>("§8Personal Storage", InventoryType.CHEST_3_ROW); - } - - @Override - public void layout(ViewLayout layout, State state, ViewContext ctx) { - layout.filler(Layouts.border(0, 26), Components.FILLER); - - for (int slot : STORAGE_SLOTS) { - layout.editable(slot, (s, c) -> s.items().getOrDefault(slot, ItemStack.AIR).builder(), - (changedSlot, oldItem, newItem, s) -> - ctx.session(State.class).updateQuiet(current -> current.withItem(changedSlot, newItem)) - ); - } - - layout.slot(4, (s, c) -> ItemStackCreator.getStack( - "§eStorage Info", - Material.CHEST, - 1, - "§7Items stored: §f" + s.itemCount(), - "", - "§7Place or remove items below!" - )); - - Components.close(layout, 22); - layout.allowHotkey(true); - } - - @Override - public boolean onBottomClick(ClickContext click, ViewContext ctx) { - return true; - } -} diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestMixedView.java b/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestMixedView.java deleted file mode 100644 index e4258e4c5..000000000 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestMixedView.java +++ /dev/null @@ -1,125 +0,0 @@ -package net.swofty.type.generic.gui.v2.test; - -import net.minestom.server.inventory.InventoryType; -import net.minestom.server.item.ItemStack; -import net.minestom.server.item.Material; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; -import net.swofty.type.generic.gui.v2.context.ClickContext; -import net.swofty.type.generic.gui.v2.context.ViewContext; -import net.swofty.type.generic.user.HypixelPlayer; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public final class TestMixedView implements StatefulView { - - private static final List INPUT_SLOTS = List.of(10, 11, 12, 19, 20, 21, 28, 29, 30); - private static final int OUTPUT_SLOT = 24; - - public record State(Map inputs) { - public State withInput(int slot, ItemStack item) { - Map newInputs = new HashMap<>(inputs); - if (item.isAir()) { - newInputs.remove(slot); - } else { - newInputs.put(slot, item); - } - return new State(newInputs); - } - - public State clearInputs() { - return new State(new HashMap<>()); - } - - public int inputCount() { - return (int) inputs.values().stream().filter(i -> !i.isAir()).count(); - } - - public boolean hasOutput() { - return inputs.containsKey(20) && !inputs.get(20).isAir(); - } - } - - @Override - public State initialState() { - return new State(new HashMap<>()); - } - - @Override - public ViewConfiguration configuration() { - return new ViewConfiguration<>("§5Crafting Station", InventoryType.CHEST_5_ROW); - } - - @Override - public void layout(ViewLayout layout, State state, ViewContext ctx) { - layout.filler(Components.FILLER); - - layout.slot(4, ItemStackCreator.getStack( - "§5Crafting Station", - Material.CRAFTING_TABLE, - 1, - "§7Place items in the grid", - "§7to create new items!", - "", - "§7Input items: §e" + state.inputCount() - )); - - for (int slot : INPUT_SLOTS) { - layout.editable(slot, (s, c) -> s.inputs().getOrDefault(slot, ItemStack.AIR).builder(), - (changedSlot, oldItem, newItem, s) -> - ctx.session(State.class).updateQuiet(current -> current.withInput(changedSlot, newItem)) - ); - } - - layout.slot(22, (s, c) -> ItemStackCreator.getStack( - s.hasOutput() ? "§a→ Ready!" : "§7→", - Material.ARROW, - 1, - s.hasOutput() ? "§aClick output to craft!" : "§7Place an item in the center" - )); - - layout.slot(OUTPUT_SLOT, (s, c) -> { - if (s.hasOutput()) { - return ItemStackCreator.getStack("§bCrafted Item", Material.DIAMOND, 1, "§7Click to take!"); - } - return ItemStack.AIR.builder(); - }, (click, context) -> { - State s = click.state(); - if (s.hasOutput()) { - click.player().getInventory().addItemStack(ItemStack.of(Material.DIAMOND, 1)); - click.player().sendMessage("§aYou crafted a Diamond!"); - context.session(State.class).setState(s.clearInputs()); - for (int slot : INPUT_SLOTS) { - context.inventory().setItemStack(slot, ItemStack.AIR); - } - } - }); - - layout.slot(40, (s, c) -> ItemStackCreator.getStack( - "§cClear Grid", - Material.BARRIER, - 1, - "§7Clears all input slots" - ), (click, context) -> { - context.session(State.class).setState(state.clearInputs()); - for (int slot : INPUT_SLOTS) { - context.inventory().setItemStack(slot, ItemStack.AIR); - } - click.player().sendMessage("§cGrid cleared!"); - }); - - Components.close(layout, 44); - layout.allowHotkey(true); - } - - @Override - public boolean onBottomClick(ClickContext click, ViewContext ctx) { - return true; - } - - public static void open(HypixelPlayer player) { - ViewNavigator.get(player).push(new TestMixedView(), new State(new HashMap<>())); - } -} diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestNoStateView.java b/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestNoStateView.java deleted file mode 100644 index 7106775f5..000000000 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestNoStateView.java +++ /dev/null @@ -1,19 +0,0 @@ -package net.swofty.type.generic.gui.v2.test; - -import net.minestom.server.inventory.InventoryType; -import net.swofty.type.generic.gui.v2.*; -import net.swofty.type.generic.gui.v2.context.ViewContext; - -public class TestNoStateView extends StatelessView { - - @Override - public ViewConfiguration configuration() { - return new ViewConfiguration<>("Stateless", InventoryType.CHEST_3_ROW); - } - - @Override - public void layout(ViewLayout layout, DefaultState state, ViewContext ctx) { - Components.fill(layout); - Components.close(layout, 22); - } -} diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestPaginatedView.java b/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestPaginatedView.java deleted file mode 100644 index dd129e993..000000000 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestPaginatedView.java +++ /dev/null @@ -1,96 +0,0 @@ -package net.swofty.type.generic.gui.v2.test; - -import net.kyori.adventure.text.Component; -import net.minestom.server.component.DataComponents; -import net.minestom.server.inventory.InventoryType; -import net.minestom.server.item.ItemStack; -import net.minestom.server.item.Material; -import net.swofty.type.generic.gui.v2.Components; -import net.swofty.type.generic.gui.v2.PaginatedView; -import net.swofty.type.generic.gui.v2.ViewConfiguration; -import net.swofty.type.generic.gui.v2.ViewLayout; -import net.swofty.type.generic.gui.v2.context.ClickContext; -import net.swofty.type.generic.gui.v2.context.ViewContext; -import net.swofty.type.generic.user.HypixelPlayer; - -import java.util.List; - -public final class TestPaginatedView extends PaginatedView { - - private static final int[] PAGINATED_SLOTS = { - 10, 11, 12, 13, 14, 15, 16, - 19, 20, 21, 22, 23, 24, 25, - 28, 29, 30, 31, 32, 33, 34, - 37, 38, 39, 40, 41, 42, 43 - }; - - @Override - public ViewConfiguration configuration() { - return ViewConfiguration.withString( - (state, _) -> "Test Paginated View - Page " + (state.page() + 1), - InventoryType.CHEST_6_ROW - ); - } - - @Override - protected int[] getPaginatedSlots() { - return PAGINATED_SLOTS; - } - - @Override - protected ItemStack.Builder renderItem(Integer item, int index, HypixelPlayer player) { - return ItemStack.builder(Material.PAPER) - .set(DataComponents.CUSTOM_NAME, Component.text("§eItem #" + item)) - .set(DataComponents.LORE, List.of( - Component.text("§7Index: §a" + index), - Component.text(""), - Component.text("§eClick to select!") - )); - } - - @Override - protected void onItemClick(ClickContext click, ViewContext ctx, Integer item, int index) { - ctx.player().sendMessage(Component.text("§aYou clicked item #" + item + " at index " + index)); - } - - @Override - protected boolean shouldFilterFromSearch(State state, Integer item) { - return !String.valueOf(item).contains(state.query); - } - - @Override - protected void layoutCustom(ViewLayout layout, State state, ViewContext ctx) { - Components.close(layout, 49); - if (!Components.back(layout, 48, ctx)) { - layout.slot(48, FILLER); - } - } - - @Override - protected int getPreviousPageSlot() { - return 45; - } - - @Override - protected int getNextPageSlot() { - return 53; - } - - public record State(List items, int page, String query) implements PaginatedState { - public State(List items) { - this(items, 0, ""); - } - - @Override - public PaginatedState withPage(int page) { - return new State(items, page, query); - } - - @Override - public PaginatedState withItems(List items) { - return new State(items, page, query); - } - } - -} - diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestSharedContainerView.java b/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestSharedContainerView.java deleted file mode 100644 index afee8ba8d..000000000 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestSharedContainerView.java +++ /dev/null @@ -1,91 +0,0 @@ -package net.swofty.type.generic.gui.v2.test; - -import net.minestom.server.inventory.InventoryType; -import net.minestom.server.inventory.click.Click; -import net.minestom.server.item.Material; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; -import net.swofty.type.generic.gui.v2.context.ClickContext; -import net.swofty.type.generic.gui.v2.context.ViewContext; -import net.swofty.type.generic.user.HypixelPlayer; - -public final class TestSharedContainerView implements View { - - public record State(String teamName) { - } - - @Override - public ViewConfiguration configuration() { - - return ViewConfiguration.withString((state, ctx) -> { - SharedContext shared = ctx.session(State.class).sharedContext(); - int viewers = shared != null ? shared.sessionCount() : 1; - return "§6" + state.teamName() + " §7(§e" + viewers + " viewing§7)"; - }, InventoryType.CHEST_6_ROW); - } - - @Override - public void layout(ViewLayout layout, State state, ViewContext ctx) { - layout.filler(Components.FILLER); - - layout.slot(4, (s, c) -> { - SharedContext shared = ctx.session(State.class).sharedContext(); - int itemCount = shared != null - ? (int) shared.getAllSlotItems().values().stream().filter(i -> !i.isAir()).count() - : 0; - - return ItemStackCreator.getStack( - "§6" + s.teamName(), - Material.CHEST, - 1, - "§7Shared team storage", - "", - "§7Items stored: §e" + itemCount, - "§7Players viewing: §e" + (shared != null ? shared.sessionCount() : 1) - ); - }); - - Components.sharedContainerGrid(layout, 10, 43); - - layout.slot(49, (s, c) -> ItemStackCreator.getStack( - "§cClear All", - Material.TNT, - 1, - "§7Clears all items from storage", - "", - "§eShift Left Click to confirm!" - ), (click, context) -> { - if (click.click() instanceof Click.LeftShift) { - SharedContext shared = context.session(State.class).sharedContext(); - if (shared != null) { - shared.clearSlotItems(); - shared.broadcastMessage("§c" + click.player().getUsername() + " cleared the team chest!"); - } - } - }); - - Components.close(layout, 53); - layout.allowHotkey(true); - } - - public static ViewSession open(HypixelPlayer player, String teamId, String teamName) { - String contextId = "team-chest-" + teamId; - ViewNavigator navigator = ViewNavigator.get(player); - - if (SharedContext.exists(contextId)) { - return navigator.joinShared(new TestSharedContainerView(), contextId); - } - - SharedContext ctx = SharedContext.create(contextId, new State(teamName)); - ctx.onSlotChange(change -> - System.out.println("Slot " + change.slot() + " changed: " + change.oldItem().material() + " -> " + change.newItem().material()) - ); - - return navigator.pushShared(new TestSharedContainerView(), ctx); - } - - @Override - public boolean onBottomClick(ClickContext click, ViewContext ctx) { - return true; - } -} diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestSharedStateView.java b/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestSharedStateView.java deleted file mode 100644 index cf5716193..000000000 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestSharedStateView.java +++ /dev/null @@ -1,95 +0,0 @@ -package net.swofty.type.generic.gui.v2.test; - -import net.minestom.server.inventory.InventoryType; -import net.minestom.server.item.Material; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.Components; -import net.swofty.type.generic.gui.v2.StatefulView; -import net.swofty.type.generic.gui.v2.ViewConfiguration; -import net.swofty.type.generic.gui.v2.ViewLayout; -import net.swofty.type.generic.gui.v2.ViewNavigator; -import net.swofty.type.generic.gui.v2.context.ViewContext; -import net.swofty.type.generic.user.HypixelPlayer; - -public final class TestSharedStateView implements StatefulView { - - public record State(int counter, String lastModifiedBy) { - public State increment(String playerName) { - return new State(counter + 1, playerName); - } - - public State decrement(String playerName) { - return new State(counter - 1, playerName); - } - - public State reset(String playerName) { - return new State(0, playerName); - } - } - - @Override - public State initialState() { - return new State(0, "None"); - } - - @Override - public ViewConfiguration configuration() { - return ViewConfiguration.withString((state, ctx) -> "§9Shared Counter: §e" + state.counter(), InventoryType.CHEST_3_ROW); - } - - @Override - public void layout(ViewLayout layout, State state, ViewContext ctx) { - layout.filler(Components.FILLER); - - layout.slot(11, (s, c) -> ItemStackCreator.getStack( - "§c-1", - Material.RED_WOOL, - 1, - "§7Click to decrement", - "", - "§7Current: §f" + s.counter() - ), (click, context) -> - context.session(State.class).update(s -> s.decrement(click.player().getUsername())) - ); - - layout.slot(13, (s, c) -> ItemStackCreator.getStack( - "§eCounter: " + s.counter(), - Material.PAPER, - Math.max(1, Math.min(64, Math.abs(s.counter()))), - "§7Last modified by: §f" + s.lastModifiedBy(), - "", - "§7This view is shared!", - "§7All players see the same counter." - )); - - layout.slot(15, (s, c) -> ItemStackCreator.getStack( - "§a+1", - Material.GREEN_WOOL, - 1, - "§7Click to increment", - "", - "§7Current: §f" + s.counter() - ), (click, context) -> - context.session(State.class).update(s -> s.increment(click.player().getUsername())) - ); - - layout.slot(22, (s, c) -> ItemStackCreator.getStack( - "§6Reset", - Material.SUNFLOWER, - 1, - "§7Reset counter to 0" - ), (click, context) -> - context.session(State.class).update(s -> s.reset(click.player().getUsername())) - ); - - Components.close(layout, 26); - } - - public static void openNew(HypixelPlayer player, String contextId) { - ViewNavigator.get(player).pushShared(new TestSharedStateView(), contextId, new State(0, player.getUsername())); - } - - public static void join(HypixelPlayer player, String contextId) { - ViewNavigator.get(player).joinShared(new TestSharedStateView(), contextId); - } -} diff --git a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestStateView.java b/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestStateView.java deleted file mode 100644 index 17586b6e2..000000000 --- a/type.generic/src/main/java/net/swofty/type/generic/gui/v2/test/TestStateView.java +++ /dev/null @@ -1,39 +0,0 @@ -package net.swofty.type.generic.gui.v2.test; - -import net.minestom.server.inventory.InventoryType; -import net.minestom.server.item.Material; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.Components; -import net.swofty.type.generic.gui.v2.Layouts; -import net.swofty.type.generic.gui.v2.StatefulView; -import net.swofty.type.generic.gui.v2.ViewConfiguration; -import net.swofty.type.generic.gui.v2.ViewLayout; -import net.swofty.type.generic.gui.v2.context.ViewContext; - -public final class TestStateView implements StatefulView { - - @Override - public State initialState() { - return new State(0); - } - - public record State(int counter) { - public State increment() { return new State(counter + 1); } - public State decrement() { return new State(counter - 1); } - } - - @Override - public ViewConfiguration configuration() { - return ViewConfiguration.withString((view, ctx) -> "Counter: " + view.counter(), InventoryType.CHEST_3_ROW); - } - - @Override - public void layout(ViewLayout layout, State state, ViewContext ctx) { - layout.filler(Layouts.border(0, 26), Components.FILLER); - layout.slot(11, ItemStackCreator.createNamedItemStack(Material.RED_WOOL, "§c-1"), State::decrement); - layout.slot(13, (s, _) -> ItemStackCreator.createNamedItemStack(Material.PAPER, "§eCounter: " + s.counter())); - layout.slot(15, ItemStackCreator.createNamedItemStack(Material.GREEN_WOOL, "§a+1"), State::increment); - Components.close(layout, 22); - } - -} diff --git a/type.generic/src/main/java/net/swofty/type/generic/i18n/HypixelTranslator.java b/type.generic/src/main/java/net/swofty/type/generic/i18n/HypixelTranslator.java index c4f471b52..6bbcdfc2f 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/i18n/HypixelTranslator.java +++ b/type.generic/src/main/java/net/swofty/type/generic/i18n/HypixelTranslator.java @@ -164,12 +164,12 @@ private static Map> buildFileIndex(Path root) { return Map.copyOf(index); } - private static Map loadPropertiesFileFlat(Path file) { + private Map loadPropertiesFileFlat(Path file) { int initialCapacity = 1024; try { long size = Files.size(file); if (size > 0) { - long approxEntries = Math.min(250_000L, Math.max(128L, size / 40L)); + long approxEntries = Math.clamp(size / 40L, 128L, 250_000L); initialCapacity = (int) Math.min(Integer.MAX_VALUE - 8L, (approxEntries / 0.75d) + 1); } } catch (IOException ignored) { diff --git a/type.generic/src/main/java/net/swofty/type/generic/i18n/I18n.java b/type.generic/src/main/java/net/swofty/type/generic/i18n/I18n.java index aa30d3b7e..51bce0a97 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/i18n/I18n.java +++ b/type.generic/src/main/java/net/swofty/type/generic/i18n/I18n.java @@ -1,21 +1,18 @@ package net.swofty.type.generic.i18n; import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.ComponentLike; import net.kyori.adventure.text.TranslatableComponent; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import net.kyori.adventure.translation.GlobalTranslator; +import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class I18n { - private static final LegacyComponentSerializer LEGACY = - LegacyComponentSerializer.legacySection(); - - private static final String DIALOGUE_SEPARATOR = "\\|"; - + private static final LegacyComponentSerializer LEGACY = LegacyComponentSerializer.legacySection(); private static HypixelTranslator translator; public static void init(HypixelTranslator instance) { @@ -33,69 +30,73 @@ public static TranslatableComponent t(String key) { return Component.translatable(key); } - public static TranslatableComponent t(String key, Component... args) { + public static TranslatableComponent t(String key, ComponentLike... args) { requireKey(key); return Component.translatable(key, args); } + /** + * Fetches a translation with a key and a locale + * + * @param key string representing the locale key + * @param locale locale for player + * @return the translation for the locale + * @apiNote

Please do your best to trying not to use this.

+ */ public static String string(String key, Locale locale) { requireKey(key); Component rendered = GlobalTranslator.render(Component.translatable(key), locale); return LEGACY.serialize(rendered); } - public static String string(String key) { - return string(key, HypixelTranslator.defaultLocale); - } - - public static String string(String key, Map placeholders) { - String result = string(key); - for (Map.Entry entry : placeholders.entrySet()) { - result = result.replace("{" + entry.getKey() + "}", entry.getValue()); - } - return result; - } - - public static String string(String key, Locale locale, Map placeholders) { - String result = string(key, locale); - for (Map.Entry entry : placeholders.entrySet()) { - result = result.replace("{" + entry.getKey() + "}", entry.getValue()); - } - return result; - } - - public static List lore(String key) { - return List.of(string(key).split("\n")); + /** + * Fetches a translation with a key and a locale with optional Components + * + * @param key string representing the locale key + * @param locale locale for player + * @param args arguments + * @return the translation for the locale + * @apiNote

Please do your best to trying not to use this.

+ */ + public static String string(String key, Locale locale, Component... args) { + requireKey(key); + Component rendered = GlobalTranslator.render(Component.translatable(key, args), locale); + return LEGACY.serialize(rendered); } - public static List lore(String key, Locale locale) { - return List.of(string(key, locale).split("\n")); + @Deprecated + public static String string(String key, Component... args) { + return string(key, HypixelTranslator.defaultLocale, args); } - public static List lore(String key, Map placeholders) { - return List.of(string(key, placeholders).split("\n")); + public static Component[] iterable(String key) { + return iterable(key, new Component[0]); } - public static List lore(String key, Locale locale, Map placeholders) { - return List.of(string(key, locale, placeholders).split("\n")); - } + public static Component[] iterable(String key, ComponentLike... args) { + if (translator == null) { + throw new IllegalStateException("Translator not initialized"); + } - public static String[] dialogueLines(String key) { - return dialogueLines(key, HypixelTranslator.defaultLocale); - } + List lines = new ArrayList<>(); + int index = 1; + while (true) { + String numberedKey = key + "." + index; + if (!translator.hasKey(numberedKey)) { + break; + } + + lines.add(args.length == 0 + ? Component.translatable(numberedKey) + : Component.translatable(numberedKey, args)); + index++; + } - public static String[] dialogueLines(String key, Locale locale) { - String resolved = string(key, locale); - return resolved.split(DIALOGUE_SEPARATOR); - } + if (lines.isEmpty()) { + throw new IllegalStateException("Missing dialogue translation key in en_US: " + key + ".1"); + } - public static String[] dialogueLines(String key, Map placeholders) { - String resolved = string(key, placeholders); - return resolved.split(DIALOGUE_SEPARATOR); + return lines.toArray(new Component[0]); } - public static String[] dialogueLines(String key, Locale locale, Map placeholders) { - String resolved = string(key, locale, placeholders); - return resolved.split(DIALOGUE_SEPARATOR); - } } diff --git a/type.generic/src/main/java/net/swofty/type/generic/scoreboard/HypixelScoreboard.java b/type.generic/src/main/java/net/swofty/type/generic/scoreboard/HypixelScoreboard.java index e13c97304..f7000f33e 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/scoreboard/HypixelScoreboard.java +++ b/type.generic/src/main/java/net/swofty/type/generic/scoreboard/HypixelScoreboard.java @@ -4,37 +4,41 @@ import net.minestom.server.entity.Player; import net.minestom.server.scoreboard.Sidebar; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; public class HypixelScoreboard { private final Map sidebarCache = new HashMap<>(); - private final Map> lineCache = new HashMap<>(); + private final Map> lineCache = new HashMap<>(); private static String lineId(int index) { return "line_" + index; } - public void createScoreboard(Player player, String title) { + public void createScoreboard(Player player, Component title) { if (sidebarCache.containsKey(player.getUuid())) return; - Sidebar sidebar = new Sidebar(Component.text(title)); + Sidebar sidebar = new Sidebar(title); sidebar.addViewer(player); sidebarCache.put(player.getUuid(), sidebar); lineCache.put(player.getUuid(), new ArrayList<>()); } - public void updateTitle(Player player, String title) { + public void updateTitle(Player player, Component title) { Sidebar sidebar = sidebarCache.get(player.getUuid()); if (sidebar == null) return; - sidebar.setTitle(Component.text(title)); + sidebar.setTitle(title); } - public void updateLines(Player player, List lines) { + public void updateLines(Player player, List lines) { Sidebar sidebar = sidebarCache.get(player.getUuid()); if (sidebar == null) return; - List cached = lineCache.getOrDefault(player.getUuid(), new ArrayList<>()); + List cached = lineCache.getOrDefault(player.getUuid(), new ArrayList<>()); if (cached.equals(lines)) return; int oldCount = cached.size(); @@ -43,7 +47,7 @@ public void updateLines(Player player, List lines) { for (int i = 0; i < commonCount; i++) { if (!cached.get(i).equals(lines.get(i))) { - sidebar.updateLineContent(lineId(i), Component.text(lines.get(i))); + sidebar.updateLineContent(lineId(i), lines.get(i)); } int oldScore = oldCount - 1 - i; int newScore = newCount - 1 - i; @@ -55,7 +59,7 @@ public void updateLines(Player player, List lines) { for (int i = oldCount; i < newCount; i++) { sidebar.createLine(new Sidebar.ScoreboardLine( lineId(i), - Component.text(lines.get(i)), + lines.get(i), newCount - 1 - i )); } diff --git a/type.generic/src/main/java/net/swofty/type/generic/tab/TablistModule.java b/type.generic/src/main/java/net/swofty/type/generic/tab/TablistModule.java index 9883801ac..0de355960 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/tab/TablistModule.java +++ b/type.generic/src/main/java/net/swofty/type/generic/tab/TablistModule.java @@ -8,6 +8,7 @@ public abstract class TablistModule { public abstract List getEntries(HypixelPlayer player); + // TODO: use Components public record TablistEntry(String content, TablistSkinRegistry registry) {} public TablistEntry getGrayEntry() { diff --git a/type.generic/src/main/java/net/swofty/type/generic/user/HypixelPlayer.java b/type.generic/src/main/java/net/swofty/type/generic/user/HypixelPlayer.java index 8249e8b93..a5a2882c1 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/user/HypixelPlayer.java +++ b/type.generic/src/main/java/net/swofty/type/generic/user/HypixelPlayer.java @@ -15,23 +15,23 @@ import net.swofty.type.generic.achievement.PlayerAchievementHandler; import net.swofty.type.generic.data.HypixelDataHandler; import net.swofty.type.generic.data.datapoints.DatapointChatType; +import net.swofty.type.generic.data.datapoints.DatapointLocale; import net.swofty.type.generic.data.datapoints.DatapointRank; import net.swofty.type.generic.data.datapoints.DatapointString; import net.swofty.type.generic.data.datapoints.DatapointToggles; import net.swofty.type.generic.experience.PlayerExperienceHandler; -import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.gui.v2.StatefulPaginatedView; import net.swofty.type.generic.gui.v2.StatefulView; import net.swofty.type.generic.gui.v2.StatelessView; import net.swofty.type.generic.gui.v2.View; import net.swofty.type.generic.gui.v2.ViewNavigator; import net.swofty.type.generic.gui.v2.ViewSession; +import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.quest.PlayerQuestHandler; import net.swofty.type.generic.user.categories.Rank; import org.jetbrains.annotations.NotNull; import java.util.HashMap; -import java.util.Map; import java.util.Objects; import java.util.UUID; @@ -154,11 +154,11 @@ public PlayerQuestHandler getQuestHandler() { } public void sendTranslated(String key) { - sendMessage(Component.text(I18n.string(key, getLocale()))); + sendMessage(I18n.t(key)); } - public void sendTranslated(String key, Map placeholders) { - sendMessage(Component.text(I18n.string(key, getLocale(), placeholders))); + public void sendTranslated(String key, Component... placeholders) { + sendMessage(I18n.t(key, placeholders)); } public PlayerSkin getPlayerSkin() { @@ -190,4 +190,9 @@ public void sendTo(ServerType type, boolean force) { player.transferTo(type); } + public void updateLocale(DatapointLocale.SupportedLocale locale) { + getDataHandler().get(HypixelDataHandler.Data.LOCALE, DatapointLocale.class).getValue().switchTo(locale); + super.setLocale(locale.getLocale()); + } + } diff --git a/type.goldmine/src/main/java/net/swofty/type/goldmine/tab/GoldMineServerModule.java b/type.goldmine/src/main/java/net/swofty/type/goldmine/tab/GoldMineServerModule.java index d2c89b18b..cffa6ba95 100644 --- a/type.goldmine/src/main/java/net/swofty/type/goldmine/tab/GoldMineServerModule.java +++ b/type.goldmine/src/main/java/net/swofty/type/goldmine/tab/GoldMineServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.goldmine.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GoldMineServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.gold_mine", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.hub/src/main/java/net/swofty/type/hub/ElectionDisplay.java b/type.hub/src/main/java/net/swofty/type/hub/ElectionDisplay.java index 5040dc1eb..3815edcd5 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/ElectionDisplay.java +++ b/type.hub/src/main/java/net/swofty/type/hub/ElectionDisplay.java @@ -1,5 +1,6 @@ package net.swofty.type.hub; +import net.kyori.adventure.text.Component; import net.minestom.server.coordinate.Pos; import net.swofty.commons.StringUtility; import net.swofty.type.generic.HypixelGenericLoader; @@ -37,8 +38,8 @@ public static void addAndUpdate() { List message = new ArrayList<>(List.of( I18n.string("gui_election.display.title", l), - I18n.string("gui_election.display.year", l, Map.of("year", String.valueOf(SkyBlockCalendar.getYear()))), - I18n.string("gui_election.display.time_left", l, Map.of("time", timeLeftFormatted)) + I18n.string("gui_election.display.year", l, Component.text(String.valueOf(SkyBlockCalendar.getYear()))), + I18n.string("gui_election.display.time_left", l, Component.text(timeLeftFormatted)) )); String vote = ElectionManager.getPlayerVote(player.getUuid()); @@ -49,7 +50,7 @@ public static void addAndUpdate() { .findFirst().orElse(null); if (candidateData != null) { message.add(I18n.string("gui_election.display.your_vote", l, - Map.of("candidate", candidateData.getColoredName()))); + Component.text(candidateData.getColoredName()))); message.add(I18n.string("gui_election.display.click_switch", l)); } } diff --git a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAdventurer.java b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAdventurer.java index 5958a6a81..4c79f5327 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAdventurer.java +++ b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAdventurer.java @@ -57,7 +57,7 @@ public void onClick(NPCInteractEvent e) { @Override public DialogueSet[] dialogues(HypixelPlayer player) { return new DialogueSet[] { - DialogueSet.ofTranslation("hello", "npcs_hub.adventurer.dialogue.hello", player) + DialogueSet.ofTranslation("hello", "npcs_hub.adventurer.dialogue.hello") }; } } diff --git a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAlchemist.java b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAlchemist.java index 62ea5fb6b..c3b6ec7cd 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAlchemist.java +++ b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAlchemist.java @@ -1,5 +1,6 @@ package net.swofty.type.hub.npcs; +import net.kyori.adventure.text.Component; import net.minestom.server.coordinate.Pos; import net.minestom.server.entity.EntityType; import net.swofty.type.generic.data.datapoints.DatapointToggles; @@ -10,8 +11,6 @@ import net.swofty.type.hub.gui.GUIShopAlchemist; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.Map; - public class NPCAlchemist extends HypixelNPC { public NPCAlchemist() { super(new AnimalConfiguration() { @@ -62,7 +61,7 @@ public void onClick(NPCInteractEvent e) { @Override public DialogueSet[] dialogues(HypixelPlayer player) { return new DialogueSet[] { - DialogueSet.ofTranslation("hello", "npcs_hub.alchemist.dialogue.hello", player, Map.of("player", player.getUsername())) + DialogueSet.ofTranslation("hello", "npcs_hub.alchemist.dialogue.hello", Component.text(player.getUsername())) }; } } diff --git a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCArthur.java b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCArthur.java index 117f806be..da29ef25f 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCArthur.java +++ b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCArthur.java @@ -6,8 +6,6 @@ import net.swofty.type.generic.event.custom.NPCInteractEvent; import net.swofty.type.generic.user.HypixelPlayer; -import java.util.stream.Stream; - public class NPCArthur extends HypixelNPC { public NPCArthur() { @@ -49,13 +47,13 @@ public void onClick(NPCInteractEvent e) { @Override public DialogueSet[] dialogues(HypixelPlayer player) { return new DialogueSet[] { - DialogueSet.ofTranslation("dialogue-1", "npcs_hub.arthur.dialogue.dialogue_1", player), - DialogueSet.ofTranslation("dialogue-2", "npcs_hub.arthur.dialogue.dialogue_2", player), - DialogueSet.ofTranslation("dialogue-3", "npcs_hub.arthur.dialogue.dialogue_3", player), - DialogueSet.ofTranslation("dialogue-4", "npcs_hub.arthur.dialogue.dialogue_4", player), - DialogueSet.ofTranslation("dialogue-5", "npcs_hub.arthur.dialogue.dialogue_5", player), - DialogueSet.ofTranslation("dialogue-6", "npcs_hub.arthur.dialogue.dialogue_6", player), - DialogueSet.ofTranslation("dialogue-7", "npcs_hub.arthur.dialogue.dialogue_7", player) + DialogueSet.ofTranslation("dialogue-1", "npcs_hub.arthur.dialogue.dialogue_1"), + DialogueSet.ofTranslation("dialogue-2", "npcs_hub.arthur.dialogue.dialogue_2"), + DialogueSet.ofTranslation("dialogue-3", "npcs_hub.arthur.dialogue.dialogue_3"), + DialogueSet.ofTranslation("dialogue-4", "npcs_hub.arthur.dialogue.dialogue_4"), + DialogueSet.ofTranslation("dialogue-5", "npcs_hub.arthur.dialogue.dialogue_5"), + DialogueSet.ofTranslation("dialogue-6", "npcs_hub.arthur.dialogue.dialogue_6"), + DialogueSet.ofTranslation("dialogue-7", "npcs_hub.arthur.dialogue.dialogue_7") }; } } diff --git a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAuctionMaster.java b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAuctionMaster.java index 9a045e16e..6ea25d819 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAuctionMaster.java +++ b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCAuctionMaster.java @@ -10,8 +10,6 @@ import net.swofty.type.skyblockgeneric.mission.missions.MissionTalkToAuctionMaster; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.stream.Stream; - public class NPCAuctionMaster extends HypixelNPC { public NPCAuctionMaster() { super(new HumanConfiguration() { @@ -45,7 +43,7 @@ public boolean looking(HypixelPlayer player) { @Override public DialogueSet[] dialogues(HypixelPlayer player) { return new DialogueSet[] { - DialogueSet.ofTranslation("quest-hello", "npcs_hub.auction_master.dialogue.quest_hello", player) + DialogueSet.ofTranslation("quest-hello", "npcs_hub.auction_master.dialogue.quest_hello") }; } diff --git a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBaker.java b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBaker.java index 45d9b7fca..b77b6db72 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBaker.java +++ b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBaker.java @@ -16,7 +16,6 @@ import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.List; -import java.util.stream.Stream; public class NPCBaker extends HypixelNPC { @@ -84,7 +83,7 @@ public void onClick(NPCInteractEvent event) { @Override protected DialogueSet[] dialogues(HypixelPlayer player) { return new DialogueSet[] { - DialogueSet.ofTranslation("initial-hello", "npcs_hub.baker.dialogue.initial_hello", player) + DialogueSet.ofTranslation("initial-hello", "npcs_hub.baker.dialogue.initial_hello") }; } } diff --git a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBanker.java b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBanker.java index adb1e575a..248d26470 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBanker.java +++ b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBanker.java @@ -9,8 +9,6 @@ import net.swofty.type.skyblockgeneric.mission.MissionData; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.stream.Stream; - public class NPCBanker extends HypixelNPC { public NPCBanker() { super(new HumanConfiguration() { @@ -59,7 +57,7 @@ public void onClick(NPCInteractEvent e) { @Override public DialogueSet[] dialogues(HypixelPlayer player) { return new DialogueSet[] { - DialogueSet.ofTranslation("quest-hello", "npcs_hub.banker.dialogue.quest_hello", player) + DialogueSet.ofTranslation("quest-hello", "npcs_hub.banker.dialogue.quest_hello") }; } } diff --git a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBartender.java b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBartender.java index a8dd69745..a31fc017f 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBartender.java +++ b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCBartender.java @@ -10,8 +10,6 @@ import net.swofty.type.skyblockgeneric.mission.missions.MissionTalkToBartender; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.stream.Stream; - public class NPCBartender extends HypixelNPC { public NPCBartender() { @@ -69,9 +67,9 @@ public void onClick(NPCInteractEvent e) { @Override public DialogueSet[] dialogues(HypixelPlayer player) { return new DialogueSet[] { - DialogueSet.ofTranslation("quest-hello", "npcs_hub.bartender.dialogue.quest_hello", player), - DialogueSet.ofTranslation("quest-talk", "npcs_hub.bartender.dialogue.quest_talk", player), - DialogueSet.ofTranslation("quest-complete", "npcs_hub.bartender.dialogue.quest_complete", player) + DialogueSet.ofTranslation("quest-hello", "npcs_hub.bartender.dialogue.quest_hello"), + DialogueSet.ofTranslation("quest-talk", "npcs_hub.bartender.dialogue.quest_talk"), + DialogueSet.ofTranslation("quest-complete", "npcs_hub.bartender.dialogue.quest_complete") }; } } \ No newline at end of file diff --git a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCFarmerRigby.java b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCFarmerRigby.java index a79135ce4..4fbb95589 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCFarmerRigby.java +++ b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCFarmerRigby.java @@ -11,8 +11,6 @@ import net.swofty.type.skyblockgeneric.mission.missions.farmer.MissionTalkToFarmerAgain; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.List; - public class NPCFarmerRigby extends HypixelNPC { public NPCFarmerRigby() { @@ -71,8 +69,8 @@ public void onClick(NPCInteractEvent e) { @Override public DialogueSet[] dialogues(HypixelPlayer player) { return new DialogueSet[] { - DialogueSet.ofTranslation("initial-hello", "npcs_hub.farmer_rigby.dialogue.initial_hello", player), - DialogueSet.ofTranslation("spoke-again", "npcs_hub.farmer_rigby.dialogue.spoke_again", player) + DialogueSet.ofTranslation("initial-hello", "npcs_hub.farmer_rigby.dialogue.initial_hello"), + DialogueSet.ofTranslation("spoke-again", "npcs_hub.farmer_rigby.dialogue.spoke_again") }; } diff --git a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCOzanne.java b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCOzanne.java index e8370621d..8e36a9d77 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCOzanne.java +++ b/type.hub/src/main/java/net/swofty/type/hub/npcs/NPCOzanne.java @@ -1,7 +1,5 @@ package net.swofty.type.hub.npcs; -import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.event.ClickEvent; import net.minestom.server.coordinate.Pos; import net.swofty.type.generic.entity.npc.HypixelNPC; import net.swofty.type.generic.entity.npc.configuration.HumanConfiguration; diff --git a/type.hub/src/main/java/net/swofty/type/hub/npcs/election/NPCClerkSeraphineDuplicate.java b/type.hub/src/main/java/net/swofty/type/hub/npcs/election/NPCClerkSeraphineDuplicate.java index 5566ef1ea..742d6425e 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/npcs/election/NPCClerkSeraphineDuplicate.java +++ b/type.hub/src/main/java/net/swofty/type/hub/npcs/election/NPCClerkSeraphineDuplicate.java @@ -52,7 +52,7 @@ public void onClick(NPCInteractEvent e) { @Override public DialogueSet[] dialogues(HypixelPlayer player) { return Stream.of( - DialogueSet.ofTranslation("hello", "npcs_hub.clerk_seraphine.dialogue.hello", player) + DialogueSet.ofTranslation("hello", "npcs_hub.clerk_seraphine.dialogue.hello") ).toArray(DialogueSet[]::new); } } diff --git a/type.hub/src/main/java/net/swofty/type/hub/tab/HubServerModule.java b/type.hub/src/main/java/net/swofty/type/hub/tab/HubServerModule.java index 80c045edf..17f1c7473 100644 --- a/type.hub/src/main/java/net/swofty/type/hub/tab/HubServerModule.java +++ b/type.hub/src/main/java/net/swofty/type/hub/tab/HubServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.hub.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class HubServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.hub", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.island/src/main/java/net/swofty/type/island/events/traditional/ActionPlayerTeleport.java b/type.island/src/main/java/net/swofty/type/island/events/traditional/ActionPlayerTeleport.java index 95f623384..5223ad7e1 100644 --- a/type.island/src/main/java/net/swofty/type/island/events/traditional/ActionPlayerTeleport.java +++ b/type.island/src/main/java/net/swofty/type/island/events/traditional/ActionPlayerTeleport.java @@ -14,7 +14,6 @@ public void run(PlayerSpawnEvent event) { SkyBlockPlayer player = (SkyBlockPlayer) event.getPlayer(); if (!event.isFirstSpawn()) return; - if (!player.hasAuthenticated) return; SharedInstance instance = player.getSkyBlockIsland().getSharedInstance().join(); player.setInstance(instance, player.getRespawnPoint()); diff --git a/type.island/src/main/java/net/swofty/type/island/tab/IslandMemberModule.java b/type.island/src/main/java/net/swofty/type/island/tab/IslandMemberModule.java index f2460d0e1..d62c35bb6 100644 --- a/type.island/src/main/java/net/swofty/type/island/tab/IslandMemberModule.java +++ b/type.island/src/main/java/net/swofty/type/island/tab/IslandMemberModule.java @@ -1,5 +1,6 @@ package net.swofty.type.island.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.data.HypixelDataHandler; import net.swofty.type.generic.data.datapoints.DatapointRank; import net.swofty.type.generic.i18n.I18n; @@ -12,7 +13,6 @@ import java.util.Collections; import java.util.List; import java.util.Locale; -import java.util.Map; public class IslandMemberModule extends TablistModule { @@ -27,7 +27,7 @@ public List getEntries(HypixelPlayer p) { toShow = new ArrayList<>(Collections.singletonList(player)); ArrayList entries = new ArrayList<>(List.of( - new TablistEntry(getCentered(I18n.string("tablist.module.island", l, Map.of("count", String.valueOf(toShow.size())))), TablistSkinRegistry.CYAN) + new TablistEntry(getCentered(I18n.string("tablist.module.island", l, Component.text(String.valueOf(toShow.size())))), TablistSkinRegistry.CYAN) )); // Sort players by their rank ordinal in reverse diff --git a/type.island/src/main/java/net/swofty/type/island/tab/IslandServerModule.java b/type.island/src/main/java/net/swofty/type/island/tab/IslandServerModule.java index b82652044..189a15bf5 100644 --- a/type.island/src/main/java/net/swofty/type/island/tab/IslandServerModule.java +++ b/type.island/src/main/java/net/swofty/type/island/tab/IslandServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.island.tab; +import net.kyori.adventure.text.Component; import net.swofty.commons.StringUtility; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; @@ -15,7 +16,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class IslandServerModule extends TablistModule { @@ -34,11 +34,11 @@ public List getEntries(HypixelPlayer p) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.private_island", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.island.minions_label", l, Map.of("current", String.valueOf(minions.size()), "max", String.valueOf(data.getSlots()))), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.island.minions_label", l, Component.text(String.valueOf(minions.size())), Component.text(String.valueOf(data.getSlots()))), TablistSkinRegistry.GRAY)); entries.add(getGrayEntry()); - entries.add(new TablistEntry(I18n.string("tablist.module.minions", l, Map.of("count", String.valueOf(minions.size()))), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.module.minions", l, Component.text(String.valueOf(minions.size()))), TablistSkinRegistry.GRAY)); minions.forEach(minion -> { String content = " " + minion.getMinion().getDisplay().replace(" Minion", ""); diff --git a/type.jerrysworkshop/src/main/java/net/swofty/type/jerrysworkshop/tab/JerrysWorkshopServerModule.java b/type.jerrysworkshop/src/main/java/net/swofty/type/jerrysworkshop/tab/JerrysWorkshopServerModule.java index 15ffb5b9d..cc496d6b9 100644 --- a/type.jerrysworkshop/src/main/java/net/swofty/type/jerrysworkshop/tab/JerrysWorkshopServerModule.java +++ b/type.jerrysworkshop/src/main/java/net/swofty/type/jerrysworkshop/tab/JerrysWorkshopServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.jerrysworkshop.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class JerrysWorkshopServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.jerrys_workshop", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.murdermysterygame/src/main/java/net/swofty/type/murdermysterygame/MurderMysteryGameScoreboard.java b/type.murdermysterygame/src/main/java/net/swofty/type/murdermysterygame/MurderMysteryGameScoreboard.java index 0e4eb144e..770218611 100644 --- a/type.murdermysterygame/src/main/java/net/swofty/type/murdermysterygame/MurderMysteryGameScoreboard.java +++ b/type.murdermysterygame/src/main/java/net/swofty/type/murdermysterygame/MurderMysteryGameScoreboard.java @@ -1,25 +1,23 @@ package net.swofty.type.murdermysterygame; import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.format.NamedTextColor; import net.minestom.server.MinecraftServer; import net.minestom.server.entity.Player; import net.minestom.server.timer.Scheduler; import net.minestom.server.timer.TaskSchedule; +import net.swofty.type.generic.HypixelConst; +import net.swofty.type.generic.i18n.I18n; +import net.swofty.type.generic.scoreboard.HypixelScoreboard; import net.swofty.type.murdermysterygame.game.Game; import net.swofty.type.murdermysterygame.game.GameStatus; import net.swofty.type.murdermysterygame.role.GameRole; import net.swofty.type.murdermysterygame.user.MurderMysteryPlayer; -import net.swofty.type.generic.HypixelConst; -import net.swofty.type.generic.i18n.I18n; -import net.swofty.type.generic.scoreboard.HypixelScoreboard; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Locale; -import java.util.Map; public class MurderMysteryGameScoreboard { private static final HypixelScoreboard scoreboard = new HypixelScoreboard(); @@ -39,127 +37,131 @@ public static void start() { for (MurderMysteryPlayer player : game.getPlayers()) { if (player.getInstance() == null) continue; Locale l = player.getLocale(); + String date = new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()); - List lines = new ArrayList<>(); - lines.add("§7" + new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()) + " §8" + HypixelConst.getServerName()); - lines.add("§7 "); + List lines = new ArrayList<>(); + lines.add(I18n.t("scoreboard.common.date_line", Component.text(date), Component.text(HypixelConst.getServerName()))); + lines.add(Component.text("§7 ")); if (game.getGameStatus() == GameStatus.WAITING) { - lines.add(I18n.string("scoreboard.murdermystery_game.map_label", l) + game.getMapEntry().getName()); - lines.add(I18n.string("scoreboard.murdermystery_game.players_label", l) + game.getPlayers().size() + "/" + game.getGameType().getMaxPlayers()); - lines.add("§7 "); + lines.add(I18n.t("scoreboard.murdermystery_game.map_line", Component.text(game.getMapEntry().getName()))); + lines.add(I18n.t("scoreboard.murdermystery_game.players_line", + Component.text(String.valueOf(game.getPlayers().size())), + Component.text(String.valueOf(game.getGameType().getMaxPlayers())))); + lines.add(Component.text("§7 ")); if (game.getCountdown().isActive()) { - lines.add(I18n.string("scoreboard.murdermystery_game.starting_in_label", l) + game.getCountdown().getSecondsRemaining() + I18n.string("scoreboard.murdermystery_game.starting_in_suffix", l)); + lines.add(I18n.t("scoreboard.murdermystery_game.starting_in_line", + Component.text(String.valueOf(game.getCountdown().getSecondsRemaining())))); } else { - lines.add(I18n.string("scoreboard.murdermystery_game.waiting_for_players", l)); + lines.add(I18n.t("scoreboard.murdermystery_game.waiting_for_players")); } - lines.add("§7 "); - lines.add(I18n.string("scoreboard.murdermystery_game.mode_label", l) + game.getGameType().getDisplayName()); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.murdermystery_game.mode_line", Component.text(game.getGameType().getDisplayName()))); int playerCount = game.getPlayers().size(); int murdererChance = playerCount > 0 ? Math.round(100f / playerCount) : 0; int detectiveChance = playerCount > 0 ? Math.round(100f / playerCount) : 0; Component actionBar = Component.empty() - .append(Component.text(I18n.string("scoreboard.murdermystery_game.actionbar.murderer_chance", l, Map.of("chance", String.valueOf(murdererChance))), NamedTextColor.RED)) - .append(Component.text(" ", NamedTextColor.GRAY)) - .append(Component.text(I18n.string("scoreboard.murdermystery_game.actionbar.detective_chance", l, Map.of("chance", String.valueOf(detectiveChance))), NamedTextColor.AQUA)); + .append(I18n.t("scoreboard.murdermystery_game.actionbar.murderer_chance", Component.text(String.valueOf(murdererChance)))) + .append(Component.text(" ")) + .append(I18n.t("scoreboard.murdermystery_game.actionbar.detective_chance", Component.text(String.valueOf(detectiveChance)))); player.sendActionBar(actionBar); } else if (game.getGameStatus() == GameStatus.IN_PROGRESS) { GameRole role = game.getRoleManager().getRole(player.getUuid()); if (player.isEliminated()) { - lines.add(I18n.string("scoreboard.murdermystery_game.spectating_label", l)); - lines.add("§7 "); + lines.add(I18n.t("scoreboard.murdermystery_game.spectating_label")); + lines.add(Component.text("§7 ")); if (role != null) { - lines.add(I18n.string("scoreboard.murdermystery_game.your_role_label", l) + " " + getScoreboardRoleColor(role, l) + role.getDisplayName()); + lines.add(I18n.t("scoreboard.murdermystery_game.your_role_line", I18n.t(getScoreboardRoleDisplayKey(role)))); } - lines.add("§7 "); + lines.add(Component.text("§7 ")); int playersAlive = game.getRoleManager().countAliveWithRole(GameRole.INNOCENT) + game.getRoleManager().countAliveWithRole(GameRole.DETECTIVE) + game.getRoleManager().countAliveWithRole(GameRole.MURDERER); - lines.add(I18n.string("scoreboard.murdermystery_game.players_alive_label", l) + playersAlive); + lines.add(I18n.t("scoreboard.murdermystery_game.players_alive_line", Component.text(String.valueOf(playersAlive)))); String timeLeft = formatTimeRemaining(game.getGameStartTime(), l); - lines.add(I18n.string("scoreboard.murdermystery_game.time_left_label", l) + timeLeft); - lines.add("§7 "); + lines.add(I18n.t("scoreboard.murdermystery_game.time_left_line", Component.text(timeLeft))); + lines.add(Component.text("§7 ")); boolean detectiveAlive = game.getRoleManager().countAliveWithRole(GameRole.DETECTIVE) > 0; - String detectiveStatus = detectiveAlive - ? I18n.string("scoreboard.murdermystery_game.detective_alive", l) - : I18n.string("scoreboard.murdermystery_game.detective_dead", l); - lines.add(I18n.string("scoreboard.murdermystery_game.detective_label", l) + " " + detectiveStatus); - lines.add("§7 "); + Component detectiveStatus = detectiveAlive + ? I18n.t("scoreboard.murdermystery_game.detective_alive") + : I18n.t("scoreboard.murdermystery_game.detective_dead"); + lines.add(I18n.t("scoreboard.murdermystery_game.detective_line", detectiveStatus)); + lines.add(Component.text("§7 ")); - lines.add(I18n.string("scoreboard.murdermystery_game.map_label", l) + game.getMapEntry().getName()); + lines.add(I18n.t("scoreboard.murdermystery_game.map_line", Component.text(game.getMapEntry().getName()))); } else { if (role != null) { - lines.add(I18n.string("scoreboard.murdermystery_game.role_label", l) + " " + getScoreboardRoleColor(role, l) + role.getDisplayName()); + lines.add(I18n.t("scoreboard.murdermystery_game.role_line", I18n.t(getScoreboardRoleDisplayKey(role)))); } - lines.add("§7 "); + lines.add(Component.text("§7 ")); int innocentsLeft = game.getRoleManager().countAliveWithRole(GameRole.INNOCENT) + game.getRoleManager().countAliveWithRole(GameRole.DETECTIVE); - lines.add(I18n.string("scoreboard.murdermystery_game.innocents_left_label", l) + innocentsLeft); + lines.add(I18n.t("scoreboard.murdermystery_game.innocents_left_line", Component.text(String.valueOf(innocentsLeft)))); String timeLeft = formatTimeRemaining(game.getGameStartTime(), l); - lines.add(I18n.string("scoreboard.murdermystery_game.time_left_label", l) + timeLeft); - lines.add("§7 "); + lines.add(I18n.t("scoreboard.murdermystery_game.time_left_line", Component.text(timeLeft))); + lines.add(Component.text("§7 ")); boolean detectiveAlive = game.getRoleManager().countAliveWithRole(GameRole.DETECTIVE) > 0; - String detectiveStatus = detectiveAlive - ? I18n.string("scoreboard.murdermystery_game.detective_alive", l) - : I18n.string("scoreboard.murdermystery_game.detective_dead", l); - lines.add(I18n.string("scoreboard.murdermystery_game.detective_label", l) + " " + detectiveStatus); - lines.add("§7 "); + Component detectiveStatus = detectiveAlive + ? I18n.t("scoreboard.murdermystery_game.detective_alive") + : I18n.t("scoreboard.murdermystery_game.detective_dead"); + lines.add(I18n.t("scoreboard.murdermystery_game.detective_line", detectiveStatus)); + lines.add(Component.text("§7 ")); - lines.add(I18n.string("scoreboard.murdermystery_game.map_label", l) + game.getMapEntry().getName()); + lines.add(I18n.t("scoreboard.murdermystery_game.map_line", Component.text(game.getMapEntry().getName()))); } } else if (game.getGameStatus() == GameStatus.ENDING) { - lines.add(I18n.string("scoreboard.murdermystery_game.game_over", l)); - lines.add("§7 "); + lines.add(I18n.t("scoreboard.murdermystery_game.game_over")); + lines.add(Component.text("§7 ")); GameRole role = game.getRoleManager().getRole(player.getUuid()); if (role != null) { - lines.add(I18n.string("scoreboard.murdermystery_game.your_role_label", l) + " " + getScoreboardRoleColor(role, l) + role.getDisplayName()); + lines.add(I18n.t("scoreboard.murdermystery_game.your_role_line", I18n.t(getScoreboardRoleDisplayKey(role)))); } - lines.add("§7 "); + lines.add(Component.text("§7 ")); int kills = player.getKillsThisGame(); if (kills > 0) { - lines.add(I18n.string("scoreboard.murdermystery_game.your_kills_label", l) + kills); + lines.add(I18n.t("scoreboard.murdermystery_game.your_kills_line", Component.text(String.valueOf(kills)))); } int tokens = player.getTokensEarnedThisGame(); - lines.add(I18n.string("scoreboard.murdermystery_game.tokens_earned_label", l) + tokens); - lines.add("§7 "); + lines.add(I18n.t("scoreboard.murdermystery_game.tokens_earned_line", Component.text(String.valueOf(tokens)))); + lines.add(Component.text("§7 ")); - lines.add(I18n.string("scoreboard.murdermystery_game.map_label", l) + game.getMapEntry().getName()); - lines.add(I18n.string("scoreboard.murdermystery_game.mode_label", l) + game.getGameType().getDisplayName()); + lines.add(I18n.t("scoreboard.murdermystery_game.map_line", Component.text(game.getMapEntry().getName()))); + lines.add(I18n.t("scoreboard.murdermystery_game.mode_line", Component.text(game.getGameType().getDisplayName()))); } - lines.add("§7 "); - lines.add(I18n.string("scoreboard.common.footer", l)); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.common.footer")); if (!scoreboard.hasScoreboard(player)) { - scoreboard.createScoreboard(player, getSidebarName(animationFrame, l)); + scoreboard.createScoreboard(player, Component.text(getSidebarName(animationFrame, l))); } scoreboard.updateLines(player, lines); - scoreboard.updateTitle(player, getSidebarName(animationFrame, l)); + scoreboard.updateTitle(player, Component.text(getSidebarName(animationFrame, l))); } } return TaskSchedule.tick(4); }); } - private static String getScoreboardRoleColor(GameRole role, Locale locale) { + private static String getScoreboardRoleDisplayKey(GameRole role) { return switch (role) { - case MURDERER -> I18n.string("scoreboard.murdermystery_game.role_color.murderer", locale); - case DETECTIVE -> I18n.string("scoreboard.murdermystery_game.role_color.detective", locale); - case INNOCENT -> I18n.string("scoreboard.murdermystery_game.role_color.innocent", locale); - case ASSASSIN -> I18n.string("scoreboard.murdermystery_game.role_color.assassin", locale); + case MURDERER -> "scoreboard.murdermystery_game.role_display.murderer"; + case DETECTIVE -> "scoreboard.murdermystery_game.role_display.detective"; + case INNOCENT -> "scoreboard.murdermystery_game.role_display.innocent"; + case ASSASSIN -> "scoreboard.murdermystery_game.role_display.assassin"; }; } diff --git a/type.murdermysterylobby/src/main/java/net/swofty/type/murdermysterylobby/MurderMysteryLobbyScoreboard.java b/type.murdermysterylobby/src/main/java/net/swofty/type/murdermysterylobby/MurderMysteryLobbyScoreboard.java index 7c0b368ed..f39f1140e 100644 --- a/type.murdermysterylobby/src/main/java/net/swofty/type/murdermysterylobby/MurderMysteryLobbyScoreboard.java +++ b/type.murdermysterylobby/src/main/java/net/swofty/type/murdermysterylobby/MurderMysteryLobbyScoreboard.java @@ -1,5 +1,6 @@ package net.swofty.type.murdermysterylobby; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.entity.Player; import net.minestom.server.timer.Scheduler; @@ -58,25 +59,27 @@ public static void start() { tokens = stats.getTotalTokens(MurderMysteryLeaderboardPeriod.LIFETIME); } - List lines = new ArrayList<>(); - lines.add("§7" + new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()) + " §8" + HypixelConst.getServerName()); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.murdermystery_lobby.total_kills_label", l) + totalKills); - lines.add(I18n.string("scoreboard.murdermystery_lobby.total_wins_label", l) + totalWins); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.murdermystery_lobby.wins_as_detective_label", l) + detectiveWins); - lines.add(I18n.string("scoreboard.murdermystery_lobby.wins_as_murderer_label", l) + murdererWins); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.murdermystery_lobby.tokens_label", l) + tokens); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.common.footer", l)); + String date = new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()); + + List lines = new ArrayList<>(); + lines.add(I18n.t("scoreboard.common.date_line", Component.text(date), Component.text(HypixelConst.getServerName()))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.murdermystery_lobby.total_kills_line", Component.text(String.valueOf(totalKills)))); + lines.add(I18n.t("scoreboard.murdermystery_lobby.total_wins_line", Component.text(String.valueOf(totalWins)))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.murdermystery_lobby.wins_as_detective_line", Component.text(String.valueOf(detectiveWins)))); + lines.add(I18n.t("scoreboard.murdermystery_lobby.wins_as_murderer_line", Component.text(String.valueOf(murdererWins)))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.murdermystery_lobby.tokens_line", Component.text(String.valueOf(tokens)))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.common.footer")); if (!scoreboard.hasScoreboard(player)) { - scoreboard.createScoreboard(player, getSidebarName(animationFrame, l)); + scoreboard.createScoreboard(player, Component.text(getSidebarName(animationFrame, l))); } scoreboard.updateLines(player, lines); - scoreboard.updateTitle(player, getSidebarName(animationFrame, l)); + scoreboard.updateTitle(player, Component.text(getSidebarName(animationFrame, l))); } return TaskSchedule.tick(4); }); diff --git a/type.murdermysterylobby/src/main/java/net/swofty/type/murdermysterylobby/tab/MurderMysteryPlayersOnlineModule.java b/type.murdermysterylobby/src/main/java/net/swofty/type/murdermysterylobby/tab/MurderMysteryPlayersOnlineModule.java index 23163d6ab..1f4d8e348 100644 --- a/type.murdermysterylobby/src/main/java/net/swofty/type/murdermysterylobby/tab/MurderMysteryPlayersOnlineModule.java +++ b/type.murdermysterylobby/src/main/java/net/swofty/type/murdermysterylobby/tab/MurderMysteryPlayersOnlineModule.java @@ -1,5 +1,6 @@ package net.swofty.type.murdermysterylobby.tab; +import net.kyori.adventure.text.Component; import net.swofty.commons.StringUtility; import net.swofty.type.generic.HypixelGenericLoader; import net.swofty.type.generic.data.HypixelDataHandler; @@ -13,7 +14,6 @@ import java.util.Collections; import java.util.List; import java.util.Locale; -import java.util.Map; public class MurderMysteryPlayersOnlineModule extends TablistModule { public int page; @@ -27,8 +27,9 @@ public List getEntries(HypixelPlayer player) { Locale l = player.getLocale(); List players = HypixelGenericLoader.getLoadedPlayers(); + // todo: use components ArrayList entries = new ArrayList<>(List.of( - new TablistEntry(getCentered(I18n.string("tablist.module.players_murder_mystery", l, Map.of("count", String.valueOf(players.size())))), TablistSkinRegistry.ORANGE) + new TablistEntry(getCentered(I18n.string("tablist.module.players_murder_mystery", l, Component.text(String.valueOf(players.size())))), TablistSkinRegistry.ORANGE) )); List toShow = new ArrayList<>(); diff --git a/type.prototypelobby/src/main/java/net/swofty/type/prototypelobby/PrototypeLobbyScoreboard.java b/type.prototypelobby/src/main/java/net/swofty/type/prototypelobby/PrototypeLobbyScoreboard.java index 9ede9c5e0..099aba5fd 100644 --- a/type.prototypelobby/src/main/java/net/swofty/type/prototypelobby/PrototypeLobbyScoreboard.java +++ b/type.prototypelobby/src/main/java/net/swofty/type/prototypelobby/PrototypeLobbyScoreboard.java @@ -1,5 +1,6 @@ package net.swofty.type.prototypelobby; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.entity.Player; import net.minestom.server.timer.Scheduler; @@ -42,27 +43,28 @@ public static void start() { } long hype = prototypeDataHandler.get(PrototypeLobbyDataHandler.Data.HYPE, DatapointLeaderboardLong.class).getValue(); + String date = new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()); - List lines = new ArrayList<>(); - lines.add("§7" + new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()) + " §8" + HypixelConst.getServerName()); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.prototype_lobby.dev_notice_line1", l)); - lines.add(I18n.string("scoreboard.prototype_lobby.dev_notice_line2", l)); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.prototype_lobby.bug_report_line1", l)); - lines.add(I18n.string("scoreboard.prototype_lobby.bug_report_line2", l)); - lines.add(I18n.string("scoreboard.prototype_lobby.bug_report_url", l)); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.prototype_lobby.hype_label", l) + hype + I18n.string("scoreboard.prototype_lobby.hype_max", l)); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.common.footer", l)); + List lines = new ArrayList<>(); + lines.add(I18n.t("scoreboard.common.date_line", Component.text(date), Component.text(HypixelConst.getServerName()))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.prototype_lobby.dev_notice_line1")); + lines.add(I18n.t("scoreboard.prototype_lobby.dev_notice_line2")); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.prototype_lobby.bug_report_line1")); + lines.add(I18n.t("scoreboard.prototype_lobby.bug_report_line2")); + lines.add(I18n.t("scoreboard.prototype_lobby.bug_report_url")); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.prototype_lobby.hype", Component.text(String.valueOf(hype)))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.common.footer")); if (!scoreboard.hasScoreboard(player)) { - scoreboard.createScoreboard(player, getSidebarName(prototypeName, l)); + scoreboard.createScoreboard(player, Component.text(getSidebarName(prototypeName, l))); } scoreboard.updateLines(player, lines); - scoreboard.updateTitle(player, getSidebarName(prototypeName, l)); + scoreboard.updateTitle(player, Component.text(getSidebarName(prototypeName, l))); } return TaskSchedule.tick(4); }); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/SkyBlockGenericLoader.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/SkyBlockGenericLoader.java index 39de664f6..c78beccd4 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/SkyBlockGenericLoader.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/SkyBlockGenericLoader.java @@ -80,7 +80,6 @@ import net.swofty.type.skyblockgeneric.mission.SkyBlockMission; import net.swofty.type.skyblockgeneric.museum.MuseumableItemCategory; import net.swofty.type.skyblockgeneric.noteblock.SkyBlockSongsHandler; -import net.swofty.type.skyblockgeneric.redis.RedisAuthenticate; import net.swofty.type.skyblockgeneric.region.SkyBlockBiomeConfiguration; import net.swofty.type.skyblockgeneric.region.SkyBlockRegenConfiguration; import net.swofty.type.skyblockgeneric.region.SkyBlockRegion; @@ -545,11 +544,6 @@ public void initialize(MinecraftServer server) { RedisOriginServer.origin.remove(uuid); } - if (RedisAuthenticate.toAuthenticate.contains(uuid)) { - player.setHasAuthenticated(false); - RedisAuthenticate.toAuthenticate.remove(uuid); - } - Logger.info("Received new player: " + username + " (" + uuid + ")"); return player; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/abiphone/AbiphoneDialogueController.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/abiphone/AbiphoneDialogueController.java index 80ecaa36b..120cb0d54 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/abiphone/AbiphoneDialogueController.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/abiphone/AbiphoneDialogueController.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.abiphone; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.timer.Scheduler; import net.minestom.server.timer.TaskSchedule; @@ -66,7 +67,7 @@ public void cancelDialogue(HypixelPlayer player) { private void handleLineSendingLoop(HypixelPlayer player, AbiphoneNPC.DialogueSet dialogueSet) { npc.sendNPCMessage(player, dialogueSet.lines()[0]); - String[] newLines = new String[dialogueSet.lines().length - 1]; + Component[] newLines = new Component[dialogueSet.lines().length - 1]; System.arraycopy(dialogueSet.lines(), 1, newLines, 0, dialogueSet.lines().length - 1); if (newLines.length == 0) { diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/abiphone/AbiphoneNPC.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/abiphone/AbiphoneNPC.java index 447f97716..c2b3c4033 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/abiphone/AbiphoneNPC.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/abiphone/AbiphoneNPC.java @@ -3,6 +3,8 @@ import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; import net.minestom.server.item.ItemStack; import net.swofty.type.generic.user.HypixelPlayer; import net.swofty.type.skyblockgeneric.item.components.AbiphoneComponent; @@ -11,6 +13,7 @@ @Getter @AllArgsConstructor public abstract class AbiphoneNPC { + private final String id; private final String name; private final String description; @@ -37,12 +40,43 @@ public DialogueSet[] dialogues(HypixelPlayer player) { public abstract ItemStack.Builder getIcon(); public void sendNPCMessage(HypixelPlayer player, String message) { - player.sendMessage("§e[NPC] " + getName() + "§f: §b✆ §f" + message); + sendNPCMessage(player, Component.text(message)); + } + + public void sendNPCMessage(HypixelPlayer player, Component message) { + player.sendMessage(Component.text() + .append(Component.text("[NPC] ", NamedTextColor.YELLOW)) + .append(Component.text(getName(), NamedTextColor.YELLOW)) + .append(Component.text(": ", NamedTextColor.WHITE)) + .append(Component.text("✆ ", NamedTextColor.AQUA)) + .append(message) + .build()); } @Builder - public record DialogueSet(String key, String[] lines, boolean abiPhone) { + public record DialogueSet(String key, Component[] lines, boolean abiPhone) { public static final DialogueSet[] EMPTY = new DialogueSet[0]; + + public static class DialogueSetBuilder { + public DialogueSetBuilder lines(Component[] lines) { + this.lines = lines; + return this; + } + + public DialogueSetBuilder lines(String[] lines) { + if (lines == null) { + this.lines = null; + return this; + } + + Component[] components = new Component[lines.length]; + for (int i = 0; i < lines.length; i++) { + components[i] = Component.text(lines[i]); + } + this.lines = components; + return this; + } + } } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/player/authentication/PlayerChatAuthentication.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/player/authentication/PlayerChatAuthentication.java deleted file mode 100644 index 8bd2a80e3..000000000 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/player/authentication/PlayerChatAuthentication.java +++ /dev/null @@ -1,71 +0,0 @@ -package net.swofty.type.skyblockgeneric.event.actions.player.authentication; - -import net.minestom.server.event.player.PlayerChatEvent; -import net.swofty.commons.ServerType; -import net.swofty.type.generic.data.mongodb.AuthenticationDatabase; -import net.swofty.type.generic.event.EventNodes; -import net.swofty.type.generic.event.HypixelEvent; -import net.swofty.type.generic.event.HypixelEventClass; -import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -public class PlayerChatAuthentication implements HypixelEventClass { - private static Map cooldowns = new HashMap<>(); - - @HypixelEvent(node = EventNodes.PLAYER, requireDataLoaded = false) - public void run(PlayerChatEvent event) { - SkyBlockPlayer player = (SkyBlockPlayer) event.getPlayer(); - if (player.hasAuthenticated) return; - - if (cooldowns.containsKey(player.getUuid())) { - if (System.currentTimeMillis() - cooldowns.get(player.getUuid()) < 1000) { - player.sendMessage("§cPlease wait before sending another message."); - return; - } - } - cooldowns.put(player.getUuid(), System.currentTimeMillis()); - - event.setCancelled(true); - String[] args = event.getRawMessage().split(" "); - - AuthenticationDatabase.AuthenticationData data = new AuthenticationDatabase(player.getUuid()).getAuthenticationData(); - if (data == null) { - if (args.length != 3) { - player.sendMessage("§cYou must first sign-up to play this server!"); - player.sendMessage("§cIn the Minecraft chat, type §6signup §c."); - player.sendMessage("§cIt is not a command, it's just a message. Nobody else can see it."); - return; - } - - if (!args[1].equals(args[2])) { - player.sendMessage("§cYour passwords do not match."); - return; - } - - AuthenticationDatabase.AuthenticationData newData = AuthenticationDatabase.makeFromPassword(args[1]); - new AuthenticationDatabase(player.getUuid()).setAuthenticationData(newData); - - player.sendMessage("§aYou have successfully signed up!"); - player.sendMessage("§aNow, in the Minecraft chat, type §6login §a."); - player.sendMessage("§aIt is not a command, it's just a message. Nobody else can see it."); - player.sendMessage("§8Salt: §7" + newData.salt()); - } else { - if (args.length != 2) { - player.sendMessage("§cIn the Minecraft chat, type §6login §c."); - player.sendMessage("§cIt is not a command, it's just a message. Nobody else can see it."); - return; - } - - if (data.matches(args[1])) { - player.sendMessage("§aYou have successfully logged in!"); - player.sendTo(ServerType.SKYBLOCK_ISLAND, true); - } else { - player.sendMessage("§cYour password is incorrect."); - player.sendMessage("§8Salt: §7" + data.salt()); - } - } - } -} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/player/authentication/PlayerDisableMoveWhenAuthenticating.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/player/authentication/PlayerDisableMoveWhenAuthenticating.java deleted file mode 100644 index cf2c96fe7..000000000 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/event/actions/player/authentication/PlayerDisableMoveWhenAuthenticating.java +++ /dev/null @@ -1,18 +0,0 @@ -package net.swofty.type.skyblockgeneric.event.actions.player.authentication; - -import net.minestom.server.event.player.PlayerMoveEvent; -import net.swofty.type.generic.event.EventNodes; -import net.swofty.type.generic.event.HypixelEvent; -import net.swofty.type.generic.event.HypixelEventClass; -import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; - -public class PlayerDisableMoveWhenAuthenticating implements HypixelEventClass { - - @HypixelEvent(node = EventNodes.PLAYER, requireDataLoaded = false) - public void run(PlayerMoveEvent event) { - SkyBlockPlayer player = (SkyBlockPlayer) event.getPlayer(); - if (player.hasAuthenticated) return; - - event.setCancelled(true); - } -} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/ShopView.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/ShopView.java index 250e74e49..3b2db9657 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/ShopView.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/ShopView.java @@ -79,14 +79,20 @@ public abstract class ShopView extends StatefulPaginatedView configuration() { - return ViewConfiguration.withString((state, _) -> { + return ViewConfiguration.withTitle((state, _) -> { int totalPages = Math.max(1, (int) Math.ceil((double) getFilteredItems(state).size() / interiorSlots.length)); if (totalPages == 1) { return title; } - return title + " | Page " + (state.page() + 1) + "/" + totalPages; + return title.append(Component.text("§f | Page " + (state.page() + 1) + "/" + totalPages)); }, InventoryType.CHEST_6_ROW); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIAnvil.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIAnvil.java index aac32d537..1f35f18a1 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIAnvil.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIAnvil.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryClickEvent; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; @@ -22,7 +23,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIAnvil extends HypixelInventoryGUI { @@ -39,7 +39,7 @@ public class GUIAnvil extends HypixelInventoryGUI { private SkyBlockItem sacrificeItem = null; public GUIAnvil() { - super(I18n.string("gui_anvil.title"), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_anvil.title"), InventoryType.CHEST_6_ROW); } @Override @@ -62,7 +62,7 @@ private void setupCombineButton() { set(new GUIItem(COMBINE_BUTTON_SLOT) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_anvil.combine_items", Material.ANVIL, 1, + return TranslatableItemStackCreator.getStack("gui_anvil.combine_items", Material.ANVIL, 1, "gui_anvil.combine_items.lore"); } }); @@ -72,7 +72,7 @@ private void setupResultSlot() { set(new GUIItem(RESULT_SLOT) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_anvil.result_empty", Material.BARRIER, 1, + return TranslatableItemStackCreator.getStack("gui_anvil.result_empty", Material.BARRIER, 1, "gui_anvil.result_empty.lore"); } }); @@ -277,10 +277,10 @@ private void updateIndicators(boolean isUpgradeValid, boolean isSacrificeValid, : Material.RED_STAINED_GLASS_PANE; ItemStack.Builder upgradeIndicator = ItemStackCreator.getStack(I18n.string("gui_anvil.item_to_upgrade", l), upgradeMaterial, 1, - I18n.lore("gui_anvil.item_to_upgrade.lore", l)); + I18n.iterable("gui_anvil.item_to_upgrade.lore")); ItemStack.Builder sacrificeIndicator = ItemStackCreator.getStack(I18n.string("gui_anvil.item_to_sacrifice", l), sacrificeMaterial, 1, - I18n.lore("gui_anvil.item_to_sacrifice.lore", l)); + I18n.iterable("gui_anvil.item_to_sacrifice.lore")); for (int slot : UPGRADE_INDICATOR_SLOTS) { set(slot, upgradeIndicator); @@ -305,7 +305,7 @@ private void updateResultPreview(boolean isUpgradeValid, boolean isSacrificeVali set(new GUIItem(RESULT_SLOT) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_anvil.result_error", Material.BARRIER, 1, + return TranslatableItemStackCreator.getStack("gui_anvil.result_error", Material.BARRIER, 1, "gui_anvil.result_error.lore"); } }); @@ -313,7 +313,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { set(new GUIItem(RESULT_SLOT) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_anvil.result_empty", Material.BARRIER, 1, + return TranslatableItemStackCreator.getStack("gui_anvil.result_empty", Material.BARRIER, 1, "gui_anvil.result_empty.lore"); } }); @@ -338,7 +338,7 @@ private void updateCombineButton(boolean canCraft) { set(new GUIItem(COMBINE_BUTTON_SLOT) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_anvil.combine_items", Material.ANVIL, 1, + return TranslatableItemStackCreator.getStack("gui_anvil.combine_items", Material.ANVIL, 1, "gui_anvil.combine_items.lore"); } }); @@ -349,12 +349,12 @@ public ItemStack.Builder getItem(HypixelPlayer p) { .applyCostLevels(upgradeItem, sacrificeItem, (SkyBlockPlayer) getPlayer()); Locale l = getPlayer().getLocale(); - List lore = new ArrayList<>(I18n.lore("gui_anvil.combine_items.lore", l)); + List lore = new ArrayList<>(List.of(I18n.iterable("gui_anvil.combine_items.lore"))); if (levelCost > 0) { lore.add(""); lore.add(I18n.string("gui_anvil.cost_label", l)); - lore.add(I18n.string("gui_anvil.cost_exp_levels", l, Map.of("cost", String.valueOf(levelCost)))); + lore.add(I18n.string("gui_anvil.cost_exp_levels", l, Component.text(String.valueOf(levelCost)))); } lore.add(""); @@ -386,7 +386,7 @@ private void performCraft(SkyBlockPlayer player) { if (player.getLevel() < requiredLevels) { Locale l = player.getLocale(); - player.sendMessage(I18n.string("gui_anvil.not_enough_levels", l)); + player.sendMessage(I18n.t("gui_anvil.not_enough_levels")); return; } @@ -413,7 +413,7 @@ private void performCraft(SkyBlockPlayer player) { set(new GUIItem(COMBINE_BUTTON_SLOT) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_anvil.claim_result", Material.OAK_SIGN, 1, + return TranslatableItemStackCreator.getStack("gui_anvil.claim_result", Material.OAK_SIGN, 1, "gui_anvil.claim_result.lore"); } }); @@ -491,4 +491,4 @@ public boolean allowHotkeying() { @Override public void onBottomClick(InventoryPreClickEvent e) { } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIBoosterCookie.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIBoosterCookie.java index fb629a030..a137fea3d 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIBoosterCookie.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIBoosterCookie.java @@ -7,7 +7,6 @@ import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.inventory.item.GUIClickableItem; import net.swofty.type.generic.i18n.I18n; @@ -16,7 +15,7 @@ public class GUIBoosterCookie extends HypixelInventoryGUI { public GUIBoosterCookie() { - super(I18n.string("gui_misc.booster_cookie.title"), InventoryType.CHEST_3_ROW); + super(I18n.t("gui_misc.booster_cookie.title"), InventoryType.CHEST_3_ROW); } @Override @@ -25,8 +24,7 @@ public void onOpen(InventoryGUIOpenEvent e) { set(new GUIClickableItem(15) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_misc.booster_cookie.cancel_button", Material.RED_CONCRETE, 1, + return TranslatableItemStackCreator.getStack("gui_misc.booster_cookie.cancel_button", Material.RED_CONCRETE, 1, "gui_misc.booster_cookie.cancel_button.lore"); } @@ -57,7 +55,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_misc.booster_cookie.consume_button", Material.COOKIE, 1, + return TranslatableItemStackCreator.getStack("gui_misc.booster_cookie.consume_button", Material.COOKIE, 1, "gui_misc.booster_cookie.consume_button.lore"); } }); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIBrewingStand.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIBrewingStand.java index 8f3faf9f0..4898cf093 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIBrewingStand.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIBrewingStand.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories; +import net.kyori.adventure.text.Component; import net.minestom.server.coordinate.Point; import net.minestom.server.event.inventory.InventoryClickEvent; import net.minestom.server.event.inventory.InventoryCloseEvent; @@ -14,7 +15,6 @@ import net.swofty.commons.skyblock.item.attribute.attributes.ItemAttributePotionData; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.inventory.RefreshingGUI; import net.swofty.type.generic.gui.inventory.item.GUIClickableItem; import net.swofty.type.generic.i18n.I18n; @@ -31,7 +31,6 @@ import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.Locale; -import java.util.Map; public class GUIBrewingStand extends HypixelInventoryGUI implements RefreshingGUI { @@ -50,7 +49,7 @@ public class GUIBrewingStand extends HypixelInventoryGUI implements RefreshingGU private SkyBlockItem[] potionItems = new SkyBlockItem[3]; public GUIBrewingStand(Instance instance, Point position, SkyBlockBlock block) { - super(I18n.string("gui_misc.brewing_stand.title"), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_misc.brewing_stand.title"), InventoryType.CHEST_6_ROW); this.instance = instance; this.blockPosition = position; this.block = block; @@ -205,7 +204,7 @@ private void updateAnimationPanes(BlockAttributeBrewingData.BrewingData brewingD if (brewingData.isBrewing()) { paneMaterial = animationToggle ? Material.RED_STAINED_GLASS_PANE : Material.ORANGE_STAINED_GLASS_PANE; long remainingSeconds = brewingData.getRemainingTimeMs() / 1000; - paneName = I18n.string("gui_misc.brewing_stand.remaining_time", l, Map.of("seconds", String.valueOf(remainingSeconds))); + paneName = I18n.string("gui_misc.brewing_stand.remaining_time", l, Component.text(String.valueOf(remainingSeconds))); paneLore = new String[0]; } else { paneMaterial = Material.LIGHT_BLUE_STAINED_GLASS_PANE; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIConsumeSoulflow.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIConsumeSoulflow.java index 54464c671..31cc2cddc 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIConsumeSoulflow.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIConsumeSoulflow.java @@ -1,10 +1,14 @@ package net.swofty.type.skyblockgeneric.gui.inventories; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; import net.swofty.type.generic.data.datapoints.DatapointInteger; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.View; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; @@ -13,7 +17,6 @@ import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.Locale; -import java.util.Map; public class GUIConsumeSoulflow implements View { @@ -41,13 +44,12 @@ public void layout(ViewLayout layout, State state, ViewContext ctx) { int itemSoulflow = s.item().getComponent(SoulflowComponent.class).getAmount(); int addition = s.item().getAmount() * itemSoulflow; - return TranslatableItemStackCreator.getStackHead(player, "gui_misc.consume_soulflow.confirm_button", + return TranslatableItemStackCreator.getStackHead("gui_misc.consume_soulflow.confirm_button", "94f0c693b85658b0bae792c9f9b717eb024ab8c4b349455648ea08358b50ddc4", 1, - "gui_misc.consume_soulflow.confirm_button.lore", Map.of( - "soulflow", String.valueOf(soulflow), - "addition", String.valueOf(addition) - )); + "gui_misc.consume_soulflow.confirm_button.lore", + Component.text(String.valueOf(soulflow)), + Component.text(String.valueOf(addition))); }, (click, viewCtx) -> { SkyBlockPlayer player = (SkyBlockPlayer) viewCtx.player(); @@ -59,10 +61,7 @@ public void layout(ViewLayout layout, State state, ViewContext ctx) { data.get(SkyBlockDataHandler.Data.SOULFLOW, DatapointInteger.class).setValue(soulflow + addition); Locale l = player.getLocale(); - player.sendMessage(I18n.string("gui_misc.consume_soulflow.consumed_message", l, Map.of( - "addition", String.valueOf(addition), - "total", String.valueOf(soulflow + addition) - ))); + player.sendMessage(I18n.t("gui_misc.consume_soulflow.consumed_message", Component.text(String.valueOf(addition)), Component.text(String.valueOf(soulflow + addition)))); player.getInventory().setItemStack(player.getHeldSlot(), ItemStack.AIR); player.closeInventory(); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUICreative.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUICreative.java index d2d1ab5b2..c5f2010b6 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUICreative.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUICreative.java @@ -2,6 +2,7 @@ import net.kyori.adventure.key.Key; import net.kyori.adventure.sound.Sound; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.inventory.click.Click; import net.minestom.server.item.ItemStack; @@ -10,7 +11,11 @@ import net.swofty.type.generic.gui.HypixelSignGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.Layouts; +import net.swofty.type.generic.gui.v2.PaginatedView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ClickContext; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; @@ -24,7 +29,6 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUICreative extends PaginatedView { @@ -34,10 +38,7 @@ public ViewConfiguration configuration() { (state, ctx) -> { int totalPages = Math.max(1, (int) Math.ceil((double) getFilteredItems(state).size() / DEFAULT_SLOTS.length)); Locale l = ctx.player().getLocale(); - return I18n.string("gui_misc.creative.title", l, Map.of( - "page", String.valueOf(state.page() + 1), - "total_pages", String.valueOf(totalPages) - )); + return I18n.string("gui_misc.creative.title", l, Component.text(String.valueOf(state.page() + 1)), Component.text(String.valueOf(totalPages))); }, InventoryType.CHEST_6_ROW ); @@ -79,10 +80,10 @@ protected void layoutBackground(ViewLayout layout, CreativeState @Override protected void layoutCustom(ViewLayout layout, CreativeState state, ViewContext ctx) { - layout.slot(49, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_misc.creative.close_button", Material.BARRIER, 1), + layout.slot(49, (s, c) -> TranslatableItemStackCreator.getStack("gui_misc.creative.close_button", Material.BARRIER, 1), (_, c) -> c.player().closeInventory()); - layout.slot(50, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_misc.creative.search_button", Material.OAK_SIGN, 1, + layout.slot(50, (s, c) -> TranslatableItemStackCreator.getStack("gui_misc.creative.search_button", Material.OAK_SIGN, 1, "gui_misc.creative.search_button.lore"), (_, c) -> { new HypixelSignGUI(c.player()).open(new String[]{"Enter query", ""}).thenAccept(line -> { if (line == null) { @@ -132,12 +133,12 @@ protected void onItemClick(ClickContext click, ViewContext ctx, S toGive.setAmount(64); player.addAndUpdateItem(toGive); player.playSound(Sound.sound(Key.key("block.note_block.pling"), Sound.Source.PLAYER, 1.0f, 2.0f)); - player.sendMessage(I18n.string("gui_misc.creative.given_stack", l, Map.of("item_name", toGive.getDisplayName()))); + player.sendMessage(I18n.t("gui_misc.creative.given_stack", Component.text(toGive.getDisplayName()))); } else { toGive.setAmount(1); player.addAndUpdateItem(toGive); player.playSound(Sound.sound(Key.key("block.note_block.pling"), Sound.Source.PLAYER, 1.0f, 2.0f)); - player.sendMessage(I18n.string("gui_misc.creative.given_single", l, Map.of("item_name", toGive.getDisplayName()))); + player.sendMessage(I18n.t("gui_misc.creative.given_single", Component.text(toGive.getDisplayName()))); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIEnchantmentTable.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIEnchantmentTable.java index 3e58b56a9..7521e0bea 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIEnchantmentTable.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIEnchantmentTable.java @@ -34,8 +34,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.Locale; -import java.util.Map; public class GUIEnchantmentTable extends HypixelInventoryGUI { private static final int[] PAGINATED_SLOTS_LIST_ENCHANTS = new int[]{ @@ -51,7 +49,7 @@ public class GUIEnchantmentTable extends HypixelInventoryGUI { private final int bookshelfPower; public GUIEnchantmentTable(Instance instance, Pos enchantmentTable) { - super(I18n.string("gui_enchantment.title"), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_enchantment.title"), InventoryType.CHEST_6_ROW); this.bookshelfPower = getBookshelfPower(instance, enchantmentTable); } @@ -64,19 +62,15 @@ public void onOpen(InventoryGUIOpenEvent e) { set(new GUIItem(48) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_enchantment.bookshelf_power", Material.BOOKSHELF, 1, - "gui_enchantment.bookshelf_power.lore", Map.of( - "power", String.valueOf(bookshelfPower) - )); + return TranslatableItemStackCreator.getStack("gui_enchantment.bookshelf_power", Material.BOOKSHELF, 1, + "gui_enchantment.bookshelf_power.lore", Component.text(String.valueOf(bookshelfPower))); } }); set(new GUIItem(50) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_enchantment.enchantments_guide", Material.BOOK, 1, + return TranslatableItemStackCreator.getStack("gui_enchantment.enchantments_guide", Material.BOOK, 1, "gui_enchantment.enchantments_guide.lore"); } }); @@ -84,8 +78,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { set(new GUIItem(28) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_enchantment.enchant_item_label", Material.ENCHANTING_TABLE, 1, + return TranslatableItemStackCreator.getStack("gui_enchantment.enchant_item_label", Material.ENCHANTING_TABLE, 1, "gui_enchantment.enchant_item_label.lore"); } }); @@ -95,12 +88,9 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @SneakyThrows public void updateFromItem(SkyBlockItem item, EnchantmentType selected) { - getInventory().setTitle(Component.text( - selected == null ? I18n.string("gui_enchantment.title", getPlayer().getLocale()) : - I18n.string("gui_enchantment.title_selected", getPlayer().getLocale(), Map.of( - "enchantment", StringUtility.toNormalCase(selected.name()) - ))) - ); + getInventory().setTitle(selected == null + ? I18n.t("gui_enchantment.title") + : I18n.t("gui_enchantment.title_selected", Component.text(StringUtility.toNormalCase(selected.name())))); Arrays.stream(PAGINATED_SLOTS_LIST_ENCHANTS).forEach(slot -> set(slot, ItemStackCreator.createNamedItemStack( Material.BLACK_STAINED_GLASS_PANE, "§7 " @@ -112,7 +102,7 @@ public void updateFromItem(SkyBlockItem item, EnchantmentType selected) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_enchantment.place_item", Material.GRAY_DYE, 1, + return TranslatableItemStackCreator.getStack("gui_enchantment.place_item", Material.GRAY_DYE, 1, "gui_enchantment.place_item.lore"); } }); @@ -176,8 +166,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { set(new GUIItem(23) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_enchantment.invalid_item", Material.RED_DYE, 1, + return TranslatableItemStackCreator.getStack("gui_enchantment.invalid_item", Material.RED_DYE, 1, "gui_enchantment.invalid_item.lore"); } }); @@ -196,8 +185,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { set(new GUIItem(23) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_enchantment.cannot_enchant", Material.RED_DYE, 1, + return TranslatableItemStackCreator.getStack("gui_enchantment.cannot_enchant", Material.RED_DYE, 1, "gui_enchantment.cannot_enchant.lore"); } }); @@ -216,9 +204,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; if (bookshelfPower < enchantmentType.getEnchFromTable().getRequiredBookshelfPower()) { - player.sendMessage(I18n.string("gui_enchantment.requires_bookshelf_message", player.getLocale(), Map.of( - "power", String.valueOf(enchantmentType.getEnchFromTable().getRequiredBookshelfPower()) - ))); + player.sendMessage(I18n.t("gui_enchantment.requires_bookshelf_message", Component.text(String.valueOf(enchantmentType.getEnchFromTable().getRequiredBookshelfPower())))); return; } @@ -246,9 +232,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add("§a "); if (bookshelfPower < enchantmentType.getEnchFromTable().getRequiredBookshelfPower()) { - lore.add(I18n.string("gui_enchantment.requires_bookshelf", player.getLocale(), Map.of( - "power", String.valueOf(enchantmentType.getEnchFromTable().getRequiredBookshelfPower()) - ))); + lore.add(I18n.string("gui_enchantment.requires_bookshelf", player.getLocale(), Component.text(String.valueOf(enchantmentType.getEnchFromTable().getRequiredBookshelfPower())))); } else { lore.add(I18n.string("gui_enchantment.click_to_view", player.getLocale())); } @@ -287,37 +271,36 @@ public ItemStack.Builder getItem(HypixelPlayer p) { public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; int levelCost = selected.getEnchFromTable().getLevelsFromTableToApply(player).get(finalLevel); - List lore = new ArrayList<>(); + List lore = new ArrayList<>(); StringUtility.splitByWordAndLength(selected.getDescription(finalLevel, player), 30) - .forEach(line -> lore.add("§7" + line)); + .forEach(line -> lore.add(Component.text("§7" + line))); - lore.add("§a "); + lore.add(Component.text("§a ")); if (selected.getEnch() instanceof ConflictingEnch conflictingEnch) { - for (EnchantmentType ench : conflictingEnch.getConflictingEnchantments()) { - if (item.getAttributeHandler().hasEnchantment(ench)) { - lore.add(I18n.string("gui_enchantment.warning_remove_conflicting", player.getLocale(), Map.of( - "enchantment", StringUtility.toNormalCase(ench.name()) - ))); + for (EnchantmentType enchantmentType : conflictingEnch.getConflictingEnchantments()) { + if (item.getAttributeHandler().hasEnchantment(enchantmentType)) { + lore.add(I18n.t("gui_enchantment.warning_remove_conflicting", Component.text(StringUtility.toNormalCase(enchantmentType.name())))); break; } } } if (finalHasLevel == finalLevel) { - lore.addAll(I18n.lore("gui_enchantment.already_present", player.getLocale())); - lore.add("§a "); + lore.addAll(List.of(I18n.iterable("gui_enchantment.already_present"))); + lore.add(Component.text("§a ")); } - lore.add(I18n.string("gui_enchantment.cost_label", player.getLocale())); + lore.add(I18n.t("gui_enchantment.cost_label")); if (finalHasLevel > finalLevel) { if (levelCost > player.getLevel()) - lore.add(I18n.string("gui_enchantment.cost_exp_levels_fail", player.getLocale(), Map.of("cost", String.valueOf(levelCost)))); - else lore.add(I18n.string("gui_enchantment.cost_exp_levels_pass", player.getLocale(), Map.of("cost", String.valueOf(levelCost)))); + lore.add(I18n.t("gui_enchantment.cost_exp_levels_fail", Component.text(String.valueOf(levelCost)))); + else + lore.add(I18n.t("gui_enchantment.cost_exp_levels_pass", Component.text(String.valueOf(levelCost)))); - lore.add("§a "); - lore.add(I18n.string("gui_enchantment.higher_level_present", player.getLocale())); + lore.add(Component.text("§a ")); + lore.add(I18n.t("gui_enchantment.higher_level_present")); return ItemStackCreator.getStack( "§9" + selected.getName() + " " + StringUtility.getAsRomanNumeral(finalLevel), Material.GRAY_DYE, 1, @@ -326,16 +309,16 @@ public ItemStack.Builder getItem(HypixelPlayer p) { } if (levelCost > player.getLevel()) { - lore.add(I18n.string("gui_enchantment.cost_exp_levels_fail", player.getLocale(), Map.of("cost", String.valueOf(levelCost)))); - lore.add("§a "); - lore.add(I18n.string("gui_enchantment.insufficient_levels", player.getLocale())); + lore.add(I18n.t("gui_enchantment.cost_exp_levels_fail", Component.text(String.valueOf(levelCost)))); + lore.add(Component.text("§a ")); + lore.add(I18n.t("gui_enchantment.insufficient_levels")); } else { - lore.add(I18n.string("gui_enchantment.cost_exp_levels_pass", player.getLocale(), Map.of("cost", String.valueOf(levelCost)))); - lore.add("§a "); + lore.add(I18n.t("gui_enchantment.cost_exp_levels_pass", Component.text(String.valueOf(levelCost)))); + lore.add(Component.text("§a ")); if (finalHasLevel >= finalLevel) { - lore.add(I18n.string("gui_enchantment.click_to_remove", player.getLocale())); + lore.add(I18n.t("gui_enchantment.click_to_remove")); } else { - lore.add(I18n.string("gui_enchantment.click_to_enchant", player.getLocale())); + lore.add(I18n.t("gui_enchantment.click_to_enchant")); } } @@ -352,13 +335,13 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { if (e.getClickedItem().material() == Material.GRAY_DYE) return; - // TODO if someone know how to get the itemstack name, do it + // TODO: if someone know how to get the itemstack name, do it // I can't find it, I keep getting null... // Because it should be, let's say, "§6Heroic Hyperion", and not "Hyperion" String itemName = StringUtility.toNormalCase(type.name()); if (player.getLevel() < selected.getEnchFromTable().getLevelsFromTableToApply(player).get(finalLevel)) { - player.sendMessage(I18n.string("gui_enchantment.insufficient_levels_message", player.getLocale())); + player.sendMessage(I18n.t("gui_enchantment.insufficient_levels_message")); return; } @@ -376,11 +359,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { } player.setLevel(player.getLevel() - selected.getEnchFromTable().getLevelsFromTableToApply(player).get(finalLevel)); - player.sendMessage(I18n.string("gui_enchantment.enchanted_message", player.getLocale(), Map.of( - "item_name", itemName, - "enchantment", StringUtility.toNormalCase(selected.name()), - "level", StringUtility.getAsRomanNumeral(finalLevel) - ))); + player.sendMessage(I18n.t("gui_enchantment.enchanted_message", Component.text(itemName), Component.text(StringUtility.toNormalCase(selected.name())), Component.text(StringUtility.getAsRomanNumeral(finalLevel)))); } else { int difference = finalHasLevel - finalLevel; @@ -391,10 +370,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { } player.setLevel(player.getLevel() - selected.getEnchFromTable().getLevelsFromTableToApply(player).get(finalLevel)); - player.sendMessage(I18n.string("gui_enchantment.removed_message", player.getLocale(), Map.of( - "enchantment", StringUtility.toNormalCase(selected.name()), - "item_name", itemName - ))); + player.sendMessage(I18n.t("gui_enchantment.removed_message", Component.text(StringUtility.toNormalCase(selected.name())), Component.text(itemName))); } updateFromItem(item, selected); @@ -405,16 +381,12 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { set(new GUIClickableItem(45) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; updateFromItem(item, null); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return ItemStackCreator.createNamedItemStack( - Material.ARROW, I18n.string("gui_enchantment.go_back", p.getLocale()) - ); + return ItemStackCreator.createNamedItemStack(Material.ARROW, I18n.t("gui_enchantment.go_back")); } }); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIMinion.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIMinion.java index fc718fe67..73817433e 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIMinion.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIMinion.java @@ -12,8 +12,8 @@ import net.swofty.commons.StringUtility; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.inventory.RefreshingGUI; +import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.inventory.item.GUIClickableItem; import net.swofty.type.generic.gui.inventory.item.GUIItem; import net.swofty.type.generic.i18n.I18n; @@ -39,8 +39,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.Locale; -import java.util.Map; public class GUIMinion extends HypixelInventoryGUI implements RefreshingGUI { private static final int[] SLOTS = new int[]{ @@ -51,10 +49,7 @@ public class GUIMinion extends HypixelInventoryGUI implements RefreshingGUI { private final IslandMinionData.IslandMinion minion; public GUIMinion(IslandMinionData.IslandMinion minion) { - super(I18n.string("gui_minion.title", Map.of( - "minion_name", minion.getMinion().getDisplay(), - "tier", StringUtility.getAsRomanNumeral(minion.getTier()) - )), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_minion.title", Component.text(minion.getMinion().getDisplay()), Component.text(StringUtility.getAsRomanNumeral(minion.getTier()))), InventoryType.CHEST_6_ROW); this.minion = minion; } @@ -69,7 +64,7 @@ public void onOpen(InventoryGUIOpenEvent e) { if (net.swofty.type.generic.gui.inventory.HypixelInventoryGUI.GUI_MAP.containsKey(member.getUuid())) { if (net.swofty.type.generic.gui.inventory.HypixelInventoryGUI.GUI_MAP.get(member.getUuid()) instanceof GUIMinion) { e.player().closeInventory(); - e.player().sendMessage(I18n.string("gui_minion.coop_member_open", e.player().getLocale())); + e.player().sendMessage(I18n.t("gui_minion.coop_member_open")); } } }); @@ -101,18 +96,15 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { minion.removeMinion(); player.getSkyBlockIsland().getMinionData().getMinions().remove(minion); - player.sendMessage(I18n.string("gui_minion.pickup_message", player.getLocale(), Map.of( - "current", String.valueOf(player.getSkyBlockIsland().getMinionData().getMinions().size()), - "max", String.valueOf(player.getSkyblockDataHandler().get( + player.sendMessage(I18n.t("gui_minion.pickup_message", Component.text(String.valueOf(player.getSkyBlockIsland().getMinionData().getMinions().size())), Component.text(String.valueOf(player.getSkyblockDataHandler().get( SkyBlockDataHandler.Data.MINION_DATA, - DatapointMinionData.class).getValue().getSlots()) - ))); + DatapointMinionData.class).getValue().getSlots())))); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_minion.pickup_button", Material.BEDROCK, 1, + return TranslatableItemStackCreator.getStack("gui_minion.pickup_button", Material.BEDROCK, 1, "gui_minion.pickup_button.lore"); } }); @@ -122,7 +114,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; if (minion.getItemsInMinion().isEmpty()) { - player.sendMessage(I18n.string("gui_minion.no_items_stored", player.getLocale())); + player.sendMessage(I18n.t("gui_minion.no_items_stored")); return; } @@ -140,7 +132,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_minion.collect_all_button", Material.CHEST, 1, + return TranslatableItemStackCreator.getStack("gui_minion.collect_all_button", Material.CHEST, 1, "gui_minion.collect_all_button.lore"); } }); @@ -154,7 +146,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_minion.ideal_layout", Material.REDSTONE_TORCH, 1, + return TranslatableItemStackCreator.getStack("gui_minion.ideal_layout", Material.REDSTONE_TORCH, 1, "gui_minion.ideal_layout.lore"); } }); @@ -189,13 +181,12 @@ public ItemStack.Builder getItem(HypixelPlayer p) { int speedPercentage = minion.getSpeedPercentage(); final DecimalFormat formatter = new DecimalFormat("#.##"); - return TranslatableItemStackCreator.getStack(p, "gui_minion.next_tier", Material.GOLD_INGOT, 1, - "gui_minion.next_tier.lore", Map.of( - "current_time", formatter.format(minionTiers.get(minion.getTier() - 1).timeBetweenActions() / (1. + speedPercentage / 100.)), - "next_time", formatter.format(minionTiers.get(minion.getTier()).timeBetweenActions() / (1. + speedPercentage / 100.)), - "current_storage", String.valueOf(minionTiers.get(minion.getTier() - 1).storage()), - "next_storage", String.valueOf(minionTiers.get(minion.getTier()).storage()) - )); + return TranslatableItemStackCreator.getStack("gui_minion.next_tier", Material.GOLD_INGOT, 1, + "gui_minion.next_tier.lore", + Component.text(formatter.format(minionTiers.get(minion.getTier() - 1).timeBetweenActions() / (1. + speedPercentage / 100.))), + Component.text(formatter.format(minionTiers.get(minion.getTier()).timeBetweenActions() / (1. + speedPercentage / 100.))), + Component.text(String.valueOf(minionTiers.get(minion.getTier() - 1).storage())), + Component.text(String.valueOf(minionTiers.get(minion.getTier()).storage()))); } }); @@ -258,7 +249,7 @@ public void refreshItems(HypixelPlayer p) { public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; if (!p.getInventory().getCursorItem().isAir()) { - player.sendMessage(I18n.string("gui_minion.cant_put_items", p.getLocale())); + player.sendMessage(I18n.t("gui_minion.cant_put_items")); e.setCancelled(true); return; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIReforge.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIReforge.java index 312e1492f..59ecb4d0b 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIReforge.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIReforge.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories; +import net.kyori.adventure.text.Component; import net.minestom.server.component.DataComponents; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; @@ -27,7 +28,6 @@ import java.util.HashMap; import java.util.List; -import java.util.Locale; import java.util.Map; public class GUIReforge extends HypixelInventoryGUI { @@ -46,7 +46,7 @@ public class GUIReforge extends HypixelInventoryGUI { } public GUIReforge() { - super(I18n.string("gui_reforge.title"), InventoryType.CHEST_5_ROW); + super(I18n.t("gui_reforge.title"), InventoryType.CHEST_5_ROW); } @Override @@ -90,13 +90,13 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - player.sendMessage(I18n.string("gui_reforge.place_item_message", player.getLocale())); + player.sendMessage(I18n.t("gui_reforge.place_item_message")); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_reforge.reforge_button_empty", Material.ANVIL, 1, + return TranslatableItemStackCreator.getStack("gui_reforge.reforge_button_empty", Material.ANVIL, 1, "gui_reforge.reforge_button_empty.lore"); } }); @@ -134,7 +134,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_reforge.error_cannot_reforge", Material.BARRIER, 1, + return TranslatableItemStackCreator.getStack("gui_reforge.error_cannot_reforge", Material.BARRIER, 1, "gui_reforge.error_cannot_reforge.lore"); } }); @@ -151,7 +151,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_reforge.error_no_reforges", Material.BARRIER, 1, + return TranslatableItemStackCreator.getStack("gui_reforge.error_no_reforges", Material.BARRIER, 1, "gui_reforge.error_no_reforges.lore"); } }); @@ -167,7 +167,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { int cost = COST_MAP.get(item.getAttributeHandler().getRarity()); if (player.getCoins() - cost < 0) { - player.sendMessage(I18n.string("gui_reforge.not_enough_coins", player.getLocale())); + player.sendMessage(I18n.t("gui_reforge.not_enough_coins")); return; } @@ -177,7 +177,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { List availableReforges = ReforgeLoader.getReforgesForType(itemReforgeType); if (availableReforges.isEmpty()) { - player.sendMessage(I18n.string("gui_reforge.no_reforges_available", player.getLocale())); + player.sendMessage(I18n.t("gui_reforge.no_reforges_available")); return; } @@ -196,21 +196,15 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { String itemName = StringUtility.toNormalCase(item.getAttributeHandler().getTypeAsString()); - player.sendMessage(I18n.string("gui_reforge.success_message", player.getLocale(), Map.of( - "old_name", item.getAttributeHandler().getRarity().getColor() + oldPrefix, - "item_name", itemName, - "new_name", item.getAttributeHandler().getRarity().getColor() + " " + selectedReforge.getPrefix() - ))); + player.sendMessage(I18n.t("gui_reforge.success_message", Component.text(item.getAttributeHandler().getRarity().getColor() + oldPrefix), Component.text(itemName), Component.text(item.getAttributeHandler().getRarity().getColor() + " " + selectedReforge.getPrefix()))); updateFromItem(item); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_reforge.reforge_button", Material.ANVIL, 1, - "gui_reforge.reforge_button.lore", Map.of( - "cost", String.valueOf(COST_MAP.get(item.getAttributeHandler().getRarity())) + return TranslatableItemStackCreator.getStack("gui_reforge.reforge_button", Material.ANVIL, 1, + "gui_reforge.reforge_button.lore", Component.text(String.valueOf(COST_MAP.get(item.getAttributeHandler().getRarity())) )); } }); @@ -245,4 +239,4 @@ public void border(ItemStack.Builder stack) { public void onBottomClick(InventoryPreClickEvent e) { } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIViewPlayerProfile.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIViewPlayerProfile.java index 2032bce4c..1733fa87d 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIViewPlayerProfile.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/GUIViewPlayerProfile.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories; +import net.kyori.adventure.text.Component; import net.minestom.server.entity.PlayerSkin; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; @@ -26,13 +27,12 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIViewPlayerProfile extends HypixelInventoryGUI { private final SkyBlockPlayer viewedPlayer; public GUIViewPlayerProfile(SkyBlockPlayer viewedPlayer) { - super(I18n.string("gui_profile.title", Map.of("player_name", viewedPlayer.getUsername())), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_profile.title", Component.text(viewedPlayer.getUsername())), InventoryType.CHEST_6_ROW); this.viewedPlayer = viewedPlayer; } @@ -44,7 +44,6 @@ public void onOpen(InventoryGUIOpenEvent e) { set(new GUIItem(2) { //Held Item @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; if (!viewedPlayer.getItemInMainHand().isAir()) { return ItemStackCreator.getFromStack(viewedPlayer.getItemInMainHand()); } else { @@ -55,7 +54,6 @@ public ItemStack.Builder getItem(HypixelPlayer p) { set(new GUIItem(11) { //Helmet @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; if (!viewedPlayer.getHelmet().isAir()) { return ItemStackCreator.getFromStack(viewedPlayer.getHelmet()); } else { @@ -66,7 +64,6 @@ public ItemStack.Builder getItem(HypixelPlayer p) { set(new GUIItem(20) { //Chestplate @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; if (!viewedPlayer.getChestplate().isAir()) { return ItemStackCreator.getFromStack(viewedPlayer.getChestplate()); } else { @@ -77,7 +74,6 @@ public ItemStack.Builder getItem(HypixelPlayer p) { set(new GUIItem(29) { //Leggings @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; if (!viewedPlayer.getLeggings().isAir()) { return ItemStackCreator.getFromStack(viewedPlayer.getLeggings()); } else { @@ -116,9 +112,9 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add("§7 "); Locale l = p.getLocale(); - lore.add(I18n.string("gui_profile.skyblock_level", l, Map.of("level", viewedPlayer.getSkyBlockExperience().getLevel().getColor() + viewedPlayer.getSkyBlockExperience().getLevel().toString()))); + lore.add(I18n.string("gui_profile.skyblock_level", l, Component.text(viewedPlayer.getSkyBlockExperience().getLevel().getColor() + viewedPlayer.getSkyBlockExperience().getLevel().toString()))); lore.add("§7 "); - lore.add(I18n.string("gui_profile.oldest_profile", l, Map.of("age", age))); + lore.add(I18n.string("gui_profile.oldest_profile", l, Component.text(age))); return ItemStackCreator.getStackHead(viewedPlayer.getShortenedDisplayName(), PlayerSkin.fromUuid(viewedPlayer.getUuid().toString()), 1, @@ -129,39 +125,38 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - player.sendMessage(I18n.string("gui_profile.feature_not_added", player.getLocale())); + player.sendMessage(I18n.t("gui_profile.feature_not_added")); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - List lore = new ArrayList<>(List.of()); + List lore = new ArrayList<>(List.of()); SkyBlockDataHandler dataHandler = viewedPlayer.getSkyblockDataHandler(); - Locale l = p.getLocale(); - String name; + Component name; Material material; if (dataHandler.get(SkyBlockDataHandler.Data.SKYBLOCK_EXPERIENCE, DatapointSkyBlockExperience.class).getValue().getCurrentEmblem() != null) { - name = I18n.string("gui_profile.emblem_selected", l, Map.of("emblem", dataHandler.get(SkyBlockDataHandler.Data.SKYBLOCK_EXPERIENCE, DatapointSkyBlockExperience.class).getValue().getCurrentEmblem().toString())); + name = I18n.t("gui_profile.emblem_selected", Component.text(dataHandler.get(SkyBlockDataHandler.Data.SKYBLOCK_EXPERIENCE, DatapointSkyBlockExperience.class).getValue().getCurrentEmblem().toString())); material = dataHandler.get(SkyBlockDataHandler.Data.SKYBLOCK_EXPERIENCE, DatapointSkyBlockExperience.class).getValue().getEmblem().displayMaterial(); } else { - name = I18n.string("gui_profile.no_emblem", l); + name = I18n.t("gui_profile.no_emblem"); material = Material.BARRIER; - lore.addAll(I18n.lore("gui_profile.no_emblem.lore", l)); + lore.addAll(List.of(I18n.iterable("gui_profile.no_emblem.lore"))); } - lore.add(" "); - lore.add(I18n.string("gui_profile.click_view_emblems", l)); + lore.add(Component.space()); + lore.add(I18n.t("gui_profile.click_view_emblems")); return ItemStackCreator.getStack(name, material, 1, lore); } }); - set(new GUIClickableItem(15) { //Visit Island + set(new GUIClickableItem(15) { // Visit Island @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - player.sendMessage(I18n.string("gui_profile.feature_not_added", player.getLocale())); + player.sendMessage(I18n.t("gui_profile.feature_not_added")); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_profile.visit_island", Material.FEATHER, 1, + return TranslatableItemStackCreator.getStack("gui_profile.visit_island", Material.FEATHER, 1, "gui_profile.visit_island.lore"); } }); @@ -169,12 +164,12 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - player.sendMessage(I18n.string("gui_profile.feature_not_added", player.getLocale())); + player.sendMessage(I18n.t("gui_profile.feature_not_added")); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_profile.trade_request", Material.EMERALD, 1, + return TranslatableItemStackCreator.getStack("gui_profile.trade_request", Material.EMERALD, 1, "gui_profile.trade_request.lore"); } }); @@ -182,12 +177,12 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - player.sendMessage(I18n.string("gui_profile.feature_not_added", player.getLocale())); + player.sendMessage(I18n.t("gui_profile.feature_not_added")); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_profile.invite_to_island", Material.POPPY, 1, + return TranslatableItemStackCreator.getStack("gui_profile.invite_to_island", Material.POPPY, 1, "gui_profile.invite_to_island.lore"); } }); @@ -195,12 +190,12 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - player.sendMessage(I18n.string("gui_profile.feature_not_added", player.getLocale())); + player.sendMessage(I18n.t("gui_profile.feature_not_added")); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_profile.coop_request", Material.DIAMOND, 1, + return TranslatableItemStackCreator.getStack("gui_profile.coop_request", Material.DIAMOND, 1, "gui_profile.coop_request.lore"); } }); @@ -208,12 +203,12 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - player.sendMessage(I18n.string("gui_profile.feature_not_added", player.getLocale())); + player.sendMessage(I18n.t("gui_profile.feature_not_added")); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_profile.personal_vault", Material.ENDER_CHEST, 1, + return TranslatableItemStackCreator.getStack("gui_profile.personal_vault", Material.ENDER_CHEST, 1, "gui_profile.personal_vault.lore"); } }); @@ -221,14 +216,14 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - player.sendMessage(I18n.string("gui_profile.feature_not_added", player.getLocale())); + player.sendMessage(I18n.t("gui_profile.feature_not_added")); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockDataHandler dataHandler = viewedPlayer.getSkyblockDataHandler(); String profileName = dataHandler.get(SkyBlockDataHandler.Data.PROFILE_NAME, DatapointString.class).getValue(); - List lore = new ArrayList<>(I18n.lore("gui_profile.museum.lore", p.getLocale(), Map.of("profile_name", profileName))); + List lore = new ArrayList<>(List.of(I18n.iterable("gui_profile.museum.lore", Component.text(profileName)))); return ItemStackCreator.getStackHead(viewedPlayer.getUsername() + "'s Museum", PlayerSkin.fromUuid(viewedPlayer.getUuid().toString()), 1, lore); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIAbiphone.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIAbiphone.java index e89030566..a1476eeaf 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIAbiphone.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIAbiphone.java @@ -24,7 +24,6 @@ import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIAbiphone extends HypixelPaginatedGUI { @Setter @@ -66,16 +65,16 @@ protected void performSearch(HypixelPlayer player, String query, int page, int m set(new GUIItem(50) { @Override public ItemStack.Builder getItem(HypixelPlayer player) { - return TranslatableItemStackCreator.getStack(player, "gui_abiphone.sort_button", Material.HOPPER, 1, "gui_abiphone.sort_button.lore"); + return TranslatableItemStackCreator.getStack("gui_abiphone.sort_button", Material.HOPPER, 1, "gui_abiphone.sort_button.lore"); } }); set(new GUIItem(51) { @Override public ItemStack.Builder getItem(HypixelPlayer player) { - return TranslatableItemStackCreator.getStack(player, "gui_abiphone.contacts_directory", Material.BOOK, 1, - "gui_abiphone.contacts_directory.lore", Map.of( - "contact_count", String.valueOf(contacts.size()), - "total_contacts", String.valueOf(AbiphoneRegistry.getRegisteredContactNPCs().size()))); + return TranslatableItemStackCreator.getStack("gui_abiphone.contacts_directory", Material.BOOK, 1, + "gui_abiphone.contacts_directory.lore", + Component.text(String.valueOf(contacts.size())), + Component.text(String.valueOf(AbiphoneRegistry.getRegisteredContactNPCs().size()))); } }); @@ -97,15 +96,14 @@ protected GUIClickableItem createItemFor(AbiphoneNPC npc, int slot, HypixelPlaye return new GUIClickableItem(slot) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer player) { - Locale l = player.getLocale(); Click click = e.getClick(); if (click instanceof Click.Left) { player.closeInventory(); - player.sendMessage(Component.text(I18n.string("gui_abiphone.ring_1", l))); + player.sendMessage(I18n.t("gui_abiphone.ring_1")); MinecraftServer.getSchedulerManager().buildTask(() -> { - player.sendMessage(Component.text(I18n.string("gui_abiphone.ring_2", l))); + player.sendMessage(I18n.t("gui_abiphone.ring_2")); MinecraftServer.getSchedulerManager().buildTask(() -> { - player.sendMessage(Component.text(I18n.string("gui_abiphone.ring_3", l))); + player.sendMessage(I18n.t("gui_abiphone.ring_3")); MinecraftServer.getSchedulerManager().buildTask(() -> { npc.onCall(player); }).delay(TaskSchedule.seconds(1)).schedule(); @@ -151,4 +149,3 @@ public enum SortType { DO_NOT_DISTURB_FIRST } } - diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIConfirmAbiphone.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIConfirmAbiphone.java index 5cc2e1b5f..0ad8051bf 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIConfirmAbiphone.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIConfirmAbiphone.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.abiphone; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; @@ -13,7 +14,6 @@ import net.swofty.type.skyblockgeneric.abiphone.AbiphoneNPC; import java.util.Locale; -import java.util.Map; public class GUIConfirmAbiphone extends HypixelInventoryGUI { @@ -21,7 +21,7 @@ public class GUIConfirmAbiphone extends HypixelInventoryGUI { private final Runnable onAccept; public GUIConfirmAbiphone(AbiphoneNPC npc, Runnable onAccept) { - super(I18n.string("gui_abiphone.confirm.title"), InventoryType.CHEST_3_ROW); + super(I18n.t("gui_abiphone.confirm.title"), InventoryType.CHEST_3_ROW); this.npc = npc; this.onAccept = onAccept; } @@ -36,8 +36,8 @@ public void run(InventoryPreClickEvent e, HypixelPlayer player) { @Override public ItemStack.Builder getItem(HypixelPlayer player) { - return TranslatableItemStackCreator.getStack(player, "gui_abiphone.confirm.confirm_button", Material.GREEN_TERRACOTTA, 1, - "gui_abiphone.confirm.confirm_button.lore", Map.of("npc_name", npc.getName())); + return TranslatableItemStackCreator.getStack("gui_abiphone.confirm.confirm_button", Material.GREEN_TERRACOTTA, 1, + "gui_abiphone.confirm.confirm_button.lore", Component.text(npc.getName())); } }); set(new GUIClickableItem(15) { diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIContactManagement.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIContactManagement.java index c947fbc31..3031cd069 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIContactManagement.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/abiphone/GUIContactManagement.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIContactManagement extends HypixelInventoryGUI { @@ -26,7 +25,7 @@ public class GUIContactManagement extends HypixelInventoryGUI { private final AbiphoneNPC npc; public GUIContactManagement(SkyBlockItem abiphone, AbiphoneNPC npc) { - super(I18n.string("gui_abiphone.management.title"), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_abiphone.management.title"), InventoryType.CHEST_6_ROW); this.abiphone = abiphone; this.npc = npc; } @@ -53,13 +52,13 @@ public void run(InventoryPreClickEvent e, HypixelPlayer player) { abiphone.getAttributeHandler().removeAbiphoneNPC(npc); player.closeInventory(); new GUIAbiphone(abiphone).open(player); - player.sendMessage(I18n.string("gui_abiphone.management.removed_message", l, Map.of("npc_name", npc.getName()))); + player.sendMessage(I18n.string("gui_abiphone.management.removed_message", l, Component.text(npc.getName()))); }).open(player); } @Override public ItemStack.Builder getItem(HypixelPlayer player) { - return TranslatableItemStackCreator.getStack(player, "gui_abiphone.management.remove_contact", Material.FEATHER, 1, + return TranslatableItemStackCreator.getStack("gui_abiphone.management.remove_contact", Material.FEATHER, 1, "gui_abiphone.management.remove_contact.lore"); } }); @@ -79,4 +78,3 @@ public void onBottomClick(InventoryPreClickEvent e) { } } - diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionBrowser.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionBrowser.java index 572c7ae49..789545486 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionBrowser.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionBrowser.java @@ -14,11 +14,11 @@ import net.minestom.server.item.Material; import net.swofty.commons.ServiceType; import net.swofty.commons.StringUtility; +import net.swofty.commons.protocol.objects.auctions.AuctionFetchItemsProtocolObject; import net.swofty.commons.skyblock.auctions.AuctionCategories; import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.commons.skyblock.auctions.AuctionsFilter; import net.swofty.commons.skyblock.auctions.AuctionsSorting; -import net.swofty.commons.protocol.objects.auctions.AuctionFetchItemsProtocolObject; import net.swofty.proxyapi.ProxyService; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; @@ -37,7 +37,6 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; -import java.util.Map; @Setter public class GUIAuctionBrowser extends HypixelInventoryGUI implements RefreshingGUI { @@ -58,7 +57,7 @@ public class GUIAuctionBrowser extends HypixelInventoryGUI implements Refreshing private List itemCache = new ArrayList<>(); public GUIAuctionBrowser() { - super(I18n.string("gui_auction.browser.title"), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_auction.browser.title"), InventoryType.CHEST_6_ROW); Thread.startVirtualThread(this::updateItemsCache); } @@ -90,7 +89,8 @@ private void updateItemsCache() { private void setItems() { fill(ItemStackCreator.createNamedItemStack(category.getMaterial(), "")); set(GUIClickableItem.getGoBackItem(49, new GUIAuctionHouse())); - getInventory().setTitle(Component.text(I18n.string("gui_auction.browser.title_with_category", getPlayer().getLocale(), Map.of("category", StringUtility.toNormalCase(category.name()))))); + getInventory().setTitle(I18n.t("gui_auction.browser.title_with_category", + Component.text(StringUtility.toNormalCase(category.name())))); set(new GUIClickableItem(50) { @Override @@ -277,7 +277,7 @@ public void onBottomClick(InventoryPreClickEvent e) { @Override public void refreshItems(HypixelPlayer player) { if (!new ProxyService(ServiceType.AUCTION_HOUSE).isOnline().join()) { - player.sendMessage(I18n.string("gui_auction.browser.offline_message", player.getLocale())); + player.sendMessage(I18n.t("gui_auction.browser.offline_message")); player.closeInventory(); } @@ -288,4 +288,4 @@ public void refreshItems(HypixelPlayer player) { public int refreshRate() { return 10; } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionCreateItem.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionCreateItem.java index 75f2999bc..f4bf753f9 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionCreateItem.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionCreateItem.java @@ -10,9 +10,9 @@ import net.minestom.server.item.Material; import net.swofty.commons.ServiceType; import net.swofty.commons.StringUtility; +import net.swofty.commons.protocol.objects.auctions.AuctionAddItemProtocolObject; import net.swofty.commons.skyblock.auctions.AuctionCategories; import net.swofty.commons.skyblock.auctions.AuctionItem; -import net.swofty.commons.protocol.objects.auctions.AuctionAddItemProtocolObject; import net.swofty.proxyapi.ProxyService; import net.swofty.type.generic.data.datapoints.DatapointDouble; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; @@ -33,7 +33,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -41,7 +40,7 @@ public class GUIAuctionCreateItem extends HypixelInventoryGUI implements Refresh private final HypixelInventoryGUI previousGUI; public GUIAuctionCreateItem(HypixelInventoryGUI previousGUI) { - super(I18n.string("gui_auction.create.title"), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_auction.create.title"), InventoryType.CHEST_6_ROW); this.previousGUI = previousGUI; } @@ -53,15 +52,14 @@ public void onOpen(InventoryGUIOpenEvent e) { DatapointAuctionEscrow.AuctionEscrow escrow = ((SkyBlockPlayer) getPlayer()).getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.AUCTION_ESCROW, DatapointAuctionEscrow.class).getValue(); if (escrow.isBin()) - e.inventory().setTitle(Component.text(I18n.string("gui_auction.create.title_bin", getPlayer().getLocale()))); + e.inventory().setTitle(I18n.t("gui_auction.create.title_bin")); set(new GUIClickableItem(13) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); if (escrow.getItem() == null) - return TranslatableItemStackCreator.getStack(p, "gui_auction.create.select_item", Material.STONE_BUTTON, 1, + return TranslatableItemStackCreator.getStack("gui_auction.create.select_item", Material.STONE_BUTTON, 1, "gui_auction.create.select_item.lore"); SkyBlockItem item = escrow.getItem(); @@ -99,20 +97,18 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - Locale l = p.getLocale(); - List lore = new ArrayList<>(); + List lore = new ArrayList<>(); if (escrow.isBin()) { - lore.addAll(I18n.lore("gui_auction.create.duration_bin.lore", l)); + lore.addAll(List.of(I18n.iterable("gui_auction.create.duration_bin.lore"))); } else { - lore.addAll(I18n.lore("gui_auction.create.duration_normal.lore", l)); + lore.addAll(List.of(I18n.iterable("gui_auction.create.duration_normal.lore"))); } - lore.add(" "); - lore.add(I18n.string("gui_auction.create.duration_extra_fee", l, Map.of("fee", String.valueOf(escrow.getDuration() / 180000)))); - lore.add(" "); - lore.add(I18n.string("gui_auction.create.duration_click", l)); + lore.add(Component.space()); + lore.add(I18n.t("gui_auction.create.duration_extra_fee", Component.text(String.valueOf(escrow.getDuration() / 180000)))); + lore.add(Component.space()); + lore.add(I18n.t("gui_auction.create.duration_click")); - return ItemStackCreator.getStack(I18n.string("gui_auction.create.duration_label", l, Map.of("duration", StringUtility.getAuctionSetupFormattedTime(escrow.getDuration()))), + return ItemStackCreator.getStack(I18n.t("gui_auction.create.duration_label", Component.text(StringUtility.getAuctionSetupFormattedTime(escrow.getDuration()))), Material.CLOCK, 1, lore); } }); @@ -126,12 +122,11 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; if (escrow.isBin()) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.create.switch_to_auction", Material.POWERED_RAIL, 1, + return TranslatableItemStackCreator.getStack("gui_auction.create.switch_to_auction", Material.POWERED_RAIL, 1, "gui_auction.create.switch_to_auction.lore"); } else { - return TranslatableItemStackCreator.getStack(p, "gui_auction.create.switch_to_bin", Material.GOLD_INGOT, 1, + return TranslatableItemStackCreator.getStack("gui_auction.create.switch_to_bin", Material.GOLD_INGOT, 1, "gui_auction.create.switch_to_bin.lore"); } } @@ -142,7 +137,6 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; ProxyService auctionService = new ProxyService(ServiceType.AUCTION_HOUSE); - Locale l = player.getLocale(); auctionService.isOnline().thenAccept((response) -> { if (escrow.getItem() == null || !response) return; @@ -150,14 +144,14 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { long fee = (long) ((escrow.getPrice() * 0.05) + ((double) escrow.getDuration() / 180000)); DatapointDouble coins = player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.COINS, DatapointDouble.class); if (coins.getValue() < fee) { - player.sendMessage(I18n.string("gui_auction.create.not_enough_coins", l)); + player.sendMessage(I18n.t("gui_auction.create.not_enough_coins")); return; } coins.setValue(coins.getValue() - fee); player.closeInventory(); - player.sendMessage(I18n.string("gui_auction.create.escrow_message", l)); + player.sendMessage(I18n.t("gui_auction.create.escrow_message")); ItemStack builtItem = new NonPlayerItemUpdater(escrow.getItem()).getUpdatedItem().build(); AuctionItem item = new AuctionItem(escrow.getItem().toUnderstandable(), player.getUuid(), escrow.getDuration() + System.currentTimeMillis(), @@ -171,7 +165,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.AUCTION_ESCROW, DatapointAuctionEscrow.class).clearEscrow(); player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.AUCTION_ACTIVE_OWNED, DatapointUUIDList.class).getValue().add(item.getUuid()); - player.sendMessage(I18n.string("gui_auction.create.setup_message", l)); + player.sendMessage(I18n.t("gui_auction.create.setup_message")); AuctionAddItemProtocolObject.AuctionAddItemMessage message = new AuctionAddItemProtocolObject.AuctionAddItemMessage(item, category); @@ -179,31 +173,24 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { auctionService.handleRequest(message); UUID auctionUUID = future.join().uuid(); - player.sendMessage(I18n.string("gui_auction.create.started_message", l, Map.of("item_name", itemName))); - player.sendMessage(I18n.string("gui_auction.create.started_id", l, Map.of("uuid", auctionUUID.toString()))); + player.sendMessage(I18n.t("gui_auction.create.started_message", Component.text(itemName))); + player.sendMessage(I18n.t("gui_auction.create.started_id", Component.text(auctionUUID.toString()))); }); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); if (escrow.getItem() == null) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.create.submit_no_item", Material.RED_TERRACOTTA, 1, + return TranslatableItemStackCreator.getStack("gui_auction.create.submit_no_item", Material.RED_TERRACOTTA, 1, "gui_auction.create.submit_no_item.lore"); } else { ItemStack builtItem = new NonPlayerItemUpdater(escrow.getItem()).getUpdatedItem().build(); return ItemStackCreator.getStack( - I18n.string("gui_auction.create.submit_ready", l, Map.of("type", escrow.isBin() ? "Bin " : "")), + I18n.t("gui_auction.create.submit_ready", Component.text(escrow.isBin() ? "Bin " : "")), Material.GREEN_TERRACOTTA, 1, - I18n.lore("gui_auction.create.submit_ready.lore", l, Map.of( - "item_name", StringUtility.getTextFromComponent(builtItem.get(DataComponents.CUSTOM_NAME)), - "duration", StringUtility.getAuctionSetupFormattedTime(escrow.getDuration()), - "price_label", escrow.isBin() ? I18n.string("gui_auction.create.price_bin_label", l) : I18n.string("gui_auction.create.price_normal_label", l), - "price", StringUtility.commaify(escrow.getPrice()), - "fee", String.valueOf((escrow.getPrice() * 0.05) + (escrow.getDuration() / 180000)) - ))); + I18n.iterable("gui_auction.create.submit_ready.lore", Component.text(StringUtility.getTextFromComponent(builtItem.get(DataComponents.CUSTOM_NAME))), Component.text(StringUtility.getAuctionSetupFormattedTime(escrow.getDuration())), escrow.isBin() ? I18n.t("gui_auction.create.price_bin_label") : I18n.t("gui_auction.create.price_normal_label"), Component.text(StringUtility.commaify(escrow.getPrice())), Component.text(String.valueOf((escrow.getPrice() * 0.05) + (escrow.getDuration() / 180000))))); } } }); @@ -215,11 +202,11 @@ public HypixelInventoryGUI onQueryFinish(String query, HypixelPlayer player) { try { val = Long.parseLong(query); } catch (NumberFormatException ex) { - player.sendMessage(I18n.string("gui_auction.create.number_parse_error", player.getLocale())); + player.sendMessage(I18n.t("gui_auction.create.number_parse_error")); return GUIAuctionCreateItem.this; } if (val <= 50) { - player.sendMessage(I18n.string("gui_auction.create.price_too_low", player.getLocale())); + player.sendMessage(I18n.t("gui_auction.create.price_too_low")); return GUIAuctionCreateItem.this; } escrow.setPrice(val); @@ -229,25 +216,23 @@ public HypixelInventoryGUI onQueryFinish(String query, HypixelPlayer player) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - Locale l = p.getLocale(); Material material; - List lore = new ArrayList<>(); + List lore = new ArrayList<>(); if (escrow.isBin()) { material = Material.GOLD_INGOT; - lore.addAll(I18n.lore("gui_auction.create.price_bin.lore", l)); + lore.addAll(List.of(I18n.iterable("gui_auction.create.price_bin.lore"))); } else { material = Material.POWERED_RAIL; - lore.addAll(I18n.lore("gui_auction.create.price_normal.lore", l)); + lore.addAll(List.of(I18n.iterable("gui_auction.create.price_normal.lore"))); } - lore.add(" "); - lore.add(I18n.string("gui_auction.create.price_extra_fee", l, Map.of("fee", String.valueOf(escrow.getPrice() * 0.05)))); - lore.add(" "); - lore.add(I18n.string("gui_auction.create.price_click", l)); + lore.add(Component.space()); + lore.add(I18n.t("gui_auction.create.price_extra_fee", Component.text(String.valueOf(escrow.getPrice() * 0.05)))); + lore.add(Component.space()); + lore.add(I18n.t("gui_auction.create.price_click")); String priceKey = escrow.isBin() ? "gui_auction.create.price_label_bin" : "gui_auction.create.price_label_normal"; return ItemStackCreator.getStack( - I18n.string(priceKey, l, Map.of("price", StringUtility.commaify(escrow.getPrice()))), + I18n.t(priceKey, Component.text(StringUtility.commaify(escrow.getPrice()))), material, 1, lore); } }); @@ -281,7 +266,7 @@ public void onBottomClick(InventoryPreClickEvent e) { DatapointAuctionEscrow.AuctionEscrow escrow = ((SkyBlockPlayer) getPlayer()).getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.AUCTION_ESCROW, DatapointAuctionEscrow.class).getValue(); if (escrow.getItem() != null) { - e.getPlayer().sendMessage(I18n.string("gui_auction.create.already_have_item", getPlayer().getLocale())); + e.getPlayer().sendMessage(I18n.t("gui_auction.create.already_have_item")); return; } @@ -294,7 +279,7 @@ public void onBottomClick(InventoryPreClickEvent e) { @Override public void refreshItems(HypixelPlayer player) { if (!new ProxyService(ServiceType.AUCTION_HOUSE).isOnline().join()) { - player.sendMessage(I18n.string("gui_auction.create.offline_message", player.getLocale())); + player.sendMessage(I18n.t("gui_auction.create.offline_message")); player.closeInventory(); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionDuration.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionDuration.java index 08ebe9210..9575ef5a9 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionDuration.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionDuration.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.auction; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.Inventory; @@ -18,13 +19,11 @@ import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.Locale; -import java.util.Map; - import java.util.concurrent.atomic.AtomicBoolean; public class GUIAuctionDuration extends HypixelInventoryGUI { public GUIAuctionDuration() { - super(I18n.string("gui_auction.duration.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_auction.duration.title"), InventoryType.CHEST_4_ROW); } @Override @@ -46,15 +45,15 @@ public HypixelInventoryGUI onQueryFinish(String query, HypixelPlayer player) { try { val = Long.parseLong(query); } catch (NumberFormatException ex) { - player.sendMessage(I18n.string("gui_auction.duration.number_parse_error", loc)); + player.sendMessage(I18n.t("gui_auction.duration.number_parse_error")); return null; } if (val <= 1) { - player.sendMessage(I18n.string("gui_auction.duration.invalid_time", loc)); + player.sendMessage(I18n.t("gui_auction.duration.invalid_time")); return null; } if (val >= 336 && !right.get()) { - player.sendMessage(I18n.string("gui_auction.duration.max_exceeded", loc)); + player.sendMessage(I18n.t("gui_auction.duration.max_exceeded")); return null; } @@ -73,7 +72,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.duration.custom", Material.COMPASS, 1, + return TranslatableItemStackCreator.getStack("gui_auction.duration.custom", Material.COMPASS, 1, "gui_auction.duration.custom.lore"); } }); @@ -110,7 +109,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); ItemStack.Builder stack = ItemStackCreator.getStack( - I18n.string("gui_auction.duration.hours", l, Map.of("hours", String.valueOf(hours))), + I18n.string("gui_auction.duration.hours", l, Component.text(String.valueOf(hours))), color, 1, " ", I18n.string("gui_auction.duration.hours_click", l)); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionHouse.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionHouse.java index a84c66958..56e6c7373 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionHouse.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionHouse.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.auction; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.Inventory; @@ -9,7 +10,6 @@ import net.swofty.commons.ServiceType; import net.swofty.proxyapi.ProxyService; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.RefreshingGUI; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.inventory.item.GUIClickableItem; @@ -18,11 +18,9 @@ import net.swofty.type.skyblockgeneric.data.datapoints.DatapointUUIDList; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.Map; - public class GUIAuctionHouse extends HypixelInventoryGUI implements RefreshingGUI { public GUIAuctionHouse() { - super(I18n.string("gui_auction.house.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_auction.house.title"), InventoryType.CHEST_4_ROW); if (!new ProxyService(ServiceType.AUCTION_HOUSE).isOnline().join()) fill(Material.BLACK_STAINED_GLASS_PANE, ""); @@ -42,7 +40,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.house.stats_button", Material.PAPER, 1, + return TranslatableItemStackCreator.getStack("gui_auction.house.stats_button", Material.PAPER, 1, "gui_auction.house.stats_button.lore"); } }); @@ -57,7 +55,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.house.browser_button", Material.GOLD_BLOCK, 1, + return TranslatableItemStackCreator.getStack("gui_auction.house.browser_button", Material.GOLD_BLOCK, 1, "gui_auction.house.browser_button.lore"); } }); @@ -73,7 +71,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.house.create_button", Material.GOLDEN_HORSE_ARMOR, 1, + return TranslatableItemStackCreator.getStack("gui_auction.house.create_button", Material.GOLDEN_HORSE_ARMOR, 1, "gui_auction.house.create_button.lore"); } }); @@ -88,9 +86,8 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.house.manage_button", Material.GOLDEN_HORSE_ARMOR, 1, - "gui_auction.house.manage_button.lore", Map.of( - "count", String.valueOf(player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.AUCTION_ACTIVE_OWNED, DatapointUUIDList.class).getValue().size()) + return TranslatableItemStackCreator.getStack("gui_auction.house.manage_button", Material.GOLDEN_HORSE_ARMOR, 1, + "gui_auction.house.manage_button.lore", Component.text(String.valueOf(player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.AUCTION_ACTIVE_OWNED, DatapointUUIDList.class).getValue().size()) )); } }); @@ -107,7 +104,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.house.bids_button", Material.GOLDEN_CARROT, 1, + return TranslatableItemStackCreator.getStack("gui_auction.house.bids_button", Material.GOLDEN_CARROT, 1, "gui_auction.house.bids_button.lore"); } }); @@ -137,7 +134,7 @@ public void onBottomClick(InventoryPreClickEvent e) { @Override public void refreshItems(HypixelPlayer player) { if (!new ProxyService(ServiceType.AUCTION_HOUSE).isOnline().join()) { - player.sendMessage(I18n.string("gui_auction.house.offline_message", player.getLocale())); + player.sendMessage(I18n.t("gui_auction.house.offline_message")); player.closeInventory(); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionHouseStats.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionHouseStats.java index 53a2368b1..199851fe1 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionHouseStats.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionHouseStats.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.auction; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.Inventory; @@ -17,12 +18,9 @@ import net.swofty.type.skyblockgeneric.data.datapoints.DatapointAuctionStatistics; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.Map; -import static java.util.Map.entry; - public class GUIAuctionHouseStats extends HypixelInventoryGUI { public GUIAuctionHouseStats() { - super(I18n.string("gui_auction.stats.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_auction.stats.title"), InventoryType.CHEST_4_ROW); fill(ItemStackCreator.createNamedItemStack(Material.BLACK_STAINED_GLASS_PANE)); set(GUIClickableItem.getGoBackItem(31, new GUIAuctionHouse())); @@ -36,23 +34,22 @@ public ItemStack.Builder getItem(HypixelPlayer p) { DatapointAuctionStatistics.class ).getValue(); - return TranslatableItemStackCreator.getStack(p, "gui_auction.stats.seller_stats", Material.PAPER, 1, - "gui_auction.stats.seller_stats.lore", Map.ofEntries( - entry("auctions_created", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.AUCTIONS_CREATED))), - entry("completed_without_bids", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.AUCTIONS_COMPLETED_WITHOUT_BIDS))), - entry("completed_with_bids", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.AUCTIONS_COMPLETED_WITH_BIDS))), - entry("highest_auction", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.HIGHEST_AUCTION_HELD))), - entry("total_earned", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.TOTAL_COINS_EARNED))), - entry("fees_spent", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.COINS_SPENT_ON_FEES))), - entry("common_sold", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.COMMON_SOLD))), - entry("uncommon_sold", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.UNCOMMON_SOLD))), - entry("rare_sold", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.RARE_SOLD))), - entry("epic_sold", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.EPIC_SOLD))), - entry("legendary_sold", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.LEGENDARY_SOLD))), - entry("mythic_sold", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.MYTHIC_SOLD))), - entry("special_sold", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.SPECIAL_SOLD))), - entry("ultimate_sold", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.ULTIMATE_SOLD))) - )); + return TranslatableItemStackCreator.getStack("gui_auction.stats.seller_stats", Material.PAPER, 1, + "gui_auction.stats.seller_stats.lore", + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.AUCTIONS_CREATED))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.AUCTIONS_COMPLETED_WITHOUT_BIDS))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.AUCTIONS_COMPLETED_WITH_BIDS))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.HIGHEST_AUCTION_HELD))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.TOTAL_COINS_EARNED))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.COINS_SPENT_ON_FEES))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.COMMON_SOLD))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.UNCOMMON_SOLD))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.RARE_SOLD))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.EPIC_SOLD))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.LEGENDARY_SOLD))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.MYTHIC_SOLD))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.SPECIAL_SOLD))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.ULTIMATE_SOLD)))); } }); set(new GUIItem(15) { @@ -64,21 +61,20 @@ public ItemStack.Builder getItem(HypixelPlayer p) { DatapointAuctionStatistics.class ).getValue(); - return TranslatableItemStackCreator.getStack(p, "gui_auction.stats.buyer_stats", Material.FILLED_MAP, 1, - "gui_auction.stats.buyer_stats.lore", Map.ofEntries( - entry("auctions_won", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.AUCTIONS_WON))), - entry("total_bids", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.TOTAL_BIDS))), - entry("highest_bid", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.HIGHEST_BID_MADE))), - entry("total_spent", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.TOTAL_COINS_SPENT))), - entry("common_bought", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.COMMON_BOUGHT))), - entry("uncommon_bought", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.UNCOMMON_BOUGHT))), - entry("rare_bought", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.RARE_BOUGHT))), - entry("epic_bought", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.EPIC_BOUGHT))), - entry("legendary_bought", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.LEGENDARY_BOUGHT))), - entry("mythic_bought", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.MYTHIC_BOUGHT))), - entry("special_bought", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.SPECIAL_BOUGHT))), - entry("ultimate_bought", String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.ULTIMATE_BOUGHT))) - )); + return TranslatableItemStackCreator.getStack("gui_auction.stats.buyer_stats", Material.FILLED_MAP, 1, + "gui_auction.stats.buyer_stats.lore", + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.AUCTIONS_WON))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.TOTAL_BIDS))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.HIGHEST_BID_MADE))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.TOTAL_COINS_SPENT))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.COMMON_BOUGHT))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.UNCOMMON_BOUGHT))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.RARE_BOUGHT))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.EPIC_BOUGHT))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.LEGENDARY_BOUGHT))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.MYTHIC_BOUGHT))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.SPECIAL_BOUGHT))), + Component.text(String.valueOf(stats.get(DatapointAuctionStatistics.AuctionStatistics.AuctionStat.ULTIMATE_BOUGHT)))); } }); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionViewItem.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionViewItem.java index 1dd2ce0ff..186ba4496 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionViewItem.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIAuctionViewItem.java @@ -7,8 +7,8 @@ import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.commons.ServiceType; -import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.commons.protocol.objects.auctions.AuctionFetchItemProtocolObject; +import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.proxyapi.ProxyService; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; @@ -36,7 +36,7 @@ public class GUIAuctionViewItem extends HypixelInventoryGUI implements Refreshin public long minimumBidAmount = 0; public GUIAuctionViewItem(UUID auctionID, HypixelInventoryGUI previousGUI) { - super(I18n.string("gui_auction.view.title"), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_auction.view.title"), InventoryType.CHEST_6_ROW); this.auctionID = auctionID; this.previousGUI = previousGUI; @@ -89,7 +89,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public void refreshItems(HypixelPlayer player) { if (!new ProxyService(ServiceType.AUCTION_HOUSE).isOnline().join()) { - player.sendMessage(I18n.string("gui_auction.view.offline_message", player.getLocale())); + player.sendMessage(I18n.t("gui_auction.view.offline_message")); player.closeInventory(); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIManageAuctions.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIManageAuctions.java index 3bac9938c..ab2fb1ca7 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIManageAuctions.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIManageAuctions.java @@ -1,7 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.auction; import net.minestom.server.component.DataComponents; -import org.tinylog.Logger; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.Inventory; @@ -10,8 +9,8 @@ import net.minestom.server.item.Material; import net.swofty.commons.ServiceType; import net.swofty.commons.StringUtility; -import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.commons.protocol.objects.auctions.AuctionFetchItemProtocolObject; +import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.proxyapi.ProxyService; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; @@ -26,6 +25,7 @@ import net.swofty.type.skyblockgeneric.data.datapoints.DatapointUUIDList; import net.swofty.type.skyblockgeneric.item.updater.NonPlayerItemUpdater; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; +import org.tinylog.Logger; import java.util.ArrayList; import java.util.List; @@ -34,7 +34,7 @@ public class GUIManageAuctions extends HypixelInventoryGUI implements RefreshingGUI { public GUIManageAuctions() { - super(I18n.string("gui_auction.manage.title"), InventoryType.CHEST_3_ROW); + super(I18n.t("gui_auction.manage.title"), InventoryType.CHEST_3_ROW); fill(ItemStackCreator.createNamedItemStack(Material.BLACK_STAINED_GLASS_PANE)); set(GUIClickableItem.getGoBackItem(22, new GUIAuctionHouse())); @@ -48,7 +48,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.manage.create_button", Material.GOLDEN_HORSE_ARMOR, 1, + return TranslatableItemStackCreator.getStack("gui_auction.manage.create_button", Material.GOLDEN_HORSE_ARMOR, 1, "gui_auction.manage.create_button.lore"); } }); @@ -147,7 +147,7 @@ public void onBottomClick(InventoryPreClickEvent e) { @Override public void refreshItems(HypixelPlayer player) { if (!new ProxyService(ServiceType.AUCTION_HOUSE).isOnline().join()) { - player.sendMessage(I18n.string("gui_auction.manage.offline_message", player.getLocale())); + player.sendMessage(I18n.t("gui_auction.manage.offline_message")); player.closeInventory(); return; } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIViewBids.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIViewBids.java index c591dd19a..12af4dd70 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIViewBids.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/GUIViewBids.java @@ -1,7 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.auction; import net.minestom.server.component.DataComponents; -import org.tinylog.Logger; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.Inventory; @@ -10,8 +9,8 @@ import net.minestom.server.item.Material; import net.swofty.commons.ServiceType; import net.swofty.commons.StringUtility; -import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.commons.protocol.objects.auctions.AuctionFetchItemProtocolObject; +import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.proxyapi.ProxyService; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; @@ -25,6 +24,7 @@ import net.swofty.type.skyblockgeneric.data.datapoints.DatapointUUIDList; import net.swofty.type.skyblockgeneric.item.updater.NonPlayerItemUpdater; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; +import org.tinylog.Logger; import java.util.ArrayList; import java.util.List; @@ -33,7 +33,7 @@ public class GUIViewBids extends HypixelInventoryGUI implements RefreshingGUI { public GUIViewBids() { - super(I18n.string("gui_auction.bids.title"), InventoryType.CHEST_3_ROW); + super(I18n.t("gui_auction.bids.title"), InventoryType.CHEST_3_ROW); fill(ItemStackCreator.createNamedItemStack(Material.BLACK_STAINED_GLASS_PANE)); set(GUIClickableItem.getGoBackItem(22, new GUIAuctionHouse())); @@ -132,7 +132,7 @@ public void onBottomClick(InventoryPreClickEvent e) { @Override public void refreshItems(HypixelPlayer player) { if (!new ProxyService(ServiceType.AUCTION_HOUSE).isOnline().join()) { - player.sendMessage(I18n.string("gui_auction.bids.offline_message", player.getLocale())); + player.sendMessage(I18n.t("gui_auction.bids.offline_message")); player.closeInventory(); return; } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewSelfBIN.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewSelfBIN.java index f1e88d108..bbe8638c4 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewSelfBIN.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewSelfBIN.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.auction.view; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; @@ -16,7 +17,6 @@ import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.UUID; public class AuctionViewSelfBIN implements AuctionView { @@ -34,7 +34,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { Locale l = p.getLocale(); double coins = player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.COINS, DatapointDouble.class).getValue(); - player.sendMessage(I18n.string("gui_auction.view_self_bin.claiming_coins", l)); + player.sendMessage(I18n.t("gui_auction.view_self_bin.claiming_coins")); player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.COINS, DatapointDouble.class).setValue(coins + item.getBids().getFirst().value()); ownedActive.remove(item.getUuid()); @@ -42,27 +42,28 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { ownedInactive.add(item.getUuid()); player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.AUCTION_INACTIVE_OWNED, DatapointUUIDList.class).setValue(ownedInactive); - player.sendMessage(I18n.string("gui_auction.view_self_bin.collected_coins", l, Map.of("amount", String.valueOf(item.getBids().getFirst().value())))); + player.sendMessage(I18n.t("gui_auction.view_self_bin.collected_coins", Component.text(String.valueOf(item.getBids().getFirst().value())))); player.closeInventory(); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_self_bin.collect_auction", Material.GOLD_BLOCK, 1, - "gui_auction.view_self_bin.collect_sold.lore", Map.of( - "buyer_name", SkyBlockPlayer.getDisplayName(item.getBids().getFirst().uuid()), - "price", String.valueOf(item.getBids().getFirst().value()) - )); + return TranslatableItemStackCreator.getStack( + "gui_auction.view_self_bin.collect_auction", + Material.GOLD_BLOCK, + 1, + "gui_auction.view_self_bin.collect_sold.lore", + Component.text(SkyBlockPlayer.getDisplayName(item.getBids().getFirst().uuid())), + Component.text(String.valueOf(item.getBids().getFirst().value())) + ); } }); } else { gui.set(new GUIItem(31) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_self_bin.cannot_buy_own", Material.BEDROCK, 1, - "gui_auction.view_self_bin.cannot_buy_own_claimed.lore"); + return TranslatableItemStackCreator.getStack("gui_auction.view_self_bin.cannot_buy_own", Material.BEDROCK, 1, + "gui_auction.view_self_bin.cannot_buy_own_claimed.lore"); } }); } @@ -77,16 +78,14 @@ public ItemStack.Builder getItem(HypixelPlayer p) { gui.set(new GUIClickableItem(31) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_self_bin.claim_item_back", Material.GOLD_INGOT, 1, - "gui_auction.view_self_bin.claim_item_back.lore"); + return TranslatableItemStackCreator.getStack("gui_auction.view_self_bin.claim_item_back", Material.GOLD_INGOT, 1, + "gui_auction.view_self_bin.claim_item_back.lore"); } @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - Locale l = p.getLocale(); - player.sendMessage(I18n.string("gui_auction.view_self_bin.claiming_item", l)); + player.sendMessage(I18n.t("gui_auction.view_self_bin.claiming_item")); ownedActive.remove(item.getUuid()); player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.AUCTION_ACTIVE_OWNED, DatapointUUIDList.class).setValue(ownedActive); ownedInactive.add(item.getUuid()); @@ -94,7 +93,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { player.addAndUpdateItem(item.getItem()); - player.sendMessage(I18n.string("gui_auction.view_self_bin.claimed_item", l)); + player.sendMessage(I18n.t("gui_auction.view_self_bin.claimed_item")); player.closeInventory(); } }); @@ -102,9 +101,8 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { gui.set(new GUIItem(31) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_self_bin.cannot_buy_own", Material.BEDROCK, 1, - "gui_auction.view_self_bin.cannot_buy_own_expired.lore"); + return TranslatableItemStackCreator.getStack("gui_auction.view_self_bin.cannot_buy_own", Material.BEDROCK, 1, + "gui_auction.view_self_bin.cannot_buy_own_expired.lore"); } }); } @@ -114,9 +112,8 @@ public ItemStack.Builder getItem(HypixelPlayer p) { gui.set(new GUIItem(31) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_self_bin.cannot_buy_own", Material.BEDROCK, 1, - "gui_auction.view_self_bin.cannot_buy_own_active.lore"); + return TranslatableItemStackCreator.getStack("gui_auction.view_self_bin.cannot_buy_own", Material.BEDROCK, 1, + "gui_auction.view_self_bin.cannot_buy_own_active.lore"); } }); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewSelfNormal.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewSelfNormal.java index c19513e70..5eb017df2 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewSelfNormal.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewSelfNormal.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.auction.view; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; @@ -20,7 +21,6 @@ import java.util.Comparator; import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.UUID; public class AuctionViewSelfNormal implements AuctionView { @@ -29,10 +29,9 @@ public void open(GUIAuctionViewItem gui, AuctionItem item, SkyBlockPlayer player gui.set(new GUIItem(33) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); List lore = new ArrayList<>(); - lore.add(I18n.string("gui_auction.view_self_normal.bid_history_total", l, Map.of("count", String.valueOf(item.getBids().size())))); + lore.add(I18n.string("gui_auction.view_self_normal.bid_history_total", l, Component.text(String.valueOf(item.getBids().size())))); List bids = new ArrayList<>(item.getBids()); bids.sort(Comparator.comparingLong(AuctionItem.Bid::value).reversed()); @@ -43,8 +42,8 @@ public ItemStack.Builder getItem(HypixelPlayer p) { AuctionItem.Bid bid = bids.get(i); lore.add(I18n.string("gui_auction.view_self_normal.bid_separator", l)); - lore.add(I18n.string("gui_auction.view_self_normal.bid_value", l, Map.of("value", String.valueOf(bid.value())))); - lore.add(I18n.string("gui_auction.view_self_normal.bid_by", l, Map.of("player_name", SkyBlockPlayer.getDisplayName(bid.uuid())))); + lore.add(I18n.string("gui_auction.view_self_normal.bid_value", l, Component.text(String.valueOf(bid.value())))); + lore.add(I18n.string("gui_auction.view_self_normal.bid_by", l, Component.text(SkyBlockPlayer.getDisplayName(bid.uuid())))); lore.add("§b" + StringUtility.formatTimeAsAgo(bid.timestamp())); } @@ -74,8 +73,8 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_self_normal.collect_auction", Material.GOLD_BLOCK, 1, - "gui_auction.view_self_normal.collect_no_bids.lore"); + return TranslatableItemStackCreator.getStack("gui_auction.view_self_normal.collect_auction", Material.GOLD_BLOCK, 1, + "gui_auction.view_self_normal.collect_no_bids.lore"); } }); } else { @@ -93,17 +92,15 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { ownedInactive.add(item.getUuid()); player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.AUCTION_INACTIVE_OWNED, DatapointUUIDList.class).setValue(ownedInactive); - player.sendMessage(I18n.string("gui_auction.view_self_normal.collected_coins", l, Map.of("amount", String.valueOf(highestBid)))); + player.sendMessage(I18n.t("gui_auction.view_self_normal.collected_coins", Component.text(String.valueOf(highestBid)))); player.closeInventory(); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_self_normal.collect_auction", Material.GOLD_BLOCK, 1, - "gui_auction.view_self_normal.collect_with_bids.lore", Map.of( - "amount", String.valueOf(item.getBids().stream().max(Comparator.comparingLong(AuctionItem.Bid::value)).map(AuctionItem.Bid::value).orElse(0L)) - )); + return TranslatableItemStackCreator.getStack("gui_auction.view_self_normal.collect_auction", Material.GOLD_BLOCK, 1, + "gui_auction.view_self_normal.collect_with_bids.lore", Component.text(String.valueOf(item.getBids().stream().max(Comparator.comparingLong(AuctionItem.Bid::value)).map(AuctionItem.Bid::value).orElse(0L)) + )); } }); } @@ -111,11 +108,9 @@ public ItemStack.Builder getItem(HypixelPlayer p) { gui.set(new GUIItem(29) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_self_normal.auction_ended", Material.BARRIER, 1, - "gui_auction.view_self_normal.auction_ended_claimed.lore", Map.of( - "amount", String.valueOf(item.getBids().stream().max(Comparator.comparingLong(AuctionItem.Bid::value)).map(AuctionItem.Bid::value).orElse(0L)) - )); + return TranslatableItemStackCreator.getStack("gui_auction.view_self_normal.auction_ended", Material.BARRIER, 1, + "gui_auction.view_self_normal.auction_ended_claimed.lore", + Component.text(String.valueOf(item.getBids().stream().max(Comparator.comparingLong(AuctionItem.Bid::value)).map(AuctionItem.Bid::value).orElse(0L)))); } }); } @@ -125,9 +120,8 @@ public ItemStack.Builder getItem(HypixelPlayer p) { gui.set(new GUIItem(29) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_self_normal.own_auction", Material.BEDROCK, 1, - "gui_auction.view_self_normal.own_auction.lore"); + return TranslatableItemStackCreator.getStack("gui_auction.view_self_normal.own_auction", Material.BEDROCK, 1, + "gui_auction.view_self_normal.own_auction.lore"); } }); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewThirdBin.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewThirdBin.java index 99e1e870d..72c1c491a 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewThirdBin.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewThirdBin.java @@ -2,14 +2,15 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.event.ClickEvent; +import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.commons.ServiceType; -import net.swofty.commons.skyblock.auctions.AuctionCategories; -import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.commons.protocol.objects.auctions.AuctionAddItemProtocolObject; import net.swofty.commons.protocol.objects.auctions.AuctionFetchItemProtocolObject; +import net.swofty.commons.skyblock.auctions.AuctionCategories; +import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.proxyapi.ProxyPlayer; import net.swofty.proxyapi.ProxyService; import net.swofty.type.generic.data.datapoints.DatapointDouble; @@ -26,7 +27,6 @@ import java.util.ArrayList; import java.util.Locale; -import java.util.Map; import java.util.concurrent.CompletableFuture; public class AuctionViewThirdBin implements AuctionView { @@ -43,7 +43,7 @@ public void open(GUIAuctionViewItem gui, AuctionItem item, SkyBlockPlayer player public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - player.sendMessage(I18n.string("gui_auction.view_third_bin.claiming_item", l)); + player.sendMessage(I18n.t("gui_auction.view_third_bin.claiming_item")); activeBids.setValue(new ArrayList<>(activeBids.getValue()) {{ remove(item.getUuid()); }}); @@ -53,28 +53,26 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { player.addAndUpdateItem(item.getItem()); - player.sendMessage(I18n.string("gui_auction.view_third_bin.claimed_item", l)); + player.sendMessage(I18n.t("gui_auction.view_third_bin.claimed_item")); player.closeInventory(); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_third_bin.claim_item", Material.GOLD_BLOCK, 1, - "gui_auction.view_third_bin.claim_sold.lore", Map.of( - "buyer_name", SkyBlockPlayer.getDisplayName(item.getBids().getFirst().uuid()), - "price", String.valueOf(item.getBids().getFirst().value()) - )); + return TranslatableItemStackCreator.getStack("gui_auction.view_third_bin.claim_item", Material.GOLD_BLOCK, 1, + "gui_auction.view_third_bin.claim_sold.lore", Component.text(SkyBlockPlayer.getDisplayName(item.getBids().getFirst().uuid())), + Component.text(String.valueOf(item.getBids().getFirst().value()) + )); } }); } else { gui.set(new GUIItem(31) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_third_bin.item_sold", Material.BEDROCK, 1, - "gui_auction.view_third_bin.item_sold_claimed.lore", Map.of( - "buyer_name", SkyBlockPlayer.getDisplayName(item.getBids().getFirst().uuid()), - "price", String.valueOf(item.getBids().getFirst().value()) - )); + return TranslatableItemStackCreator.getStack("gui_auction.view_third_bin.item_sold", Material.BEDROCK, 1, + "gui_auction.view_third_bin.item_sold_claimed.lore", Component.text(SkyBlockPlayer.getDisplayName(item.getBids().getFirst().uuid())), + Component.text(String.valueOf(item.getBids().getFirst().value()) + )); } }); } @@ -84,11 +82,10 @@ public ItemStack.Builder getItem(HypixelPlayer p) { gui.set(new GUIItem(31) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_third_bin.item_sold", Material.BEDROCK, 1, - "gui_auction.view_third_bin.item_sold_other.lore", Map.of( - "buyer_name", SkyBlockPlayer.getDisplayName(item.getBids().getFirst().uuid()), - "price", String.valueOf(item.getBids().getFirst().value()) - )); + return TranslatableItemStackCreator.getStack("gui_auction.view_third_bin.item_sold", Material.BEDROCK, 1, + "gui_auction.view_third_bin.item_sold_other.lore", Component.text(SkyBlockPlayer.getDisplayName(item.getBids().getFirst().uuid())), + Component.text(String.valueOf(item.getBids().getFirst().value()) + )); } }); return; @@ -101,23 +98,23 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { Locale l = p.getLocale(); double coins = player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.COINS, DatapointDouble.class).getValue(); if (coins < item.getStartingPrice()) { - player.sendMessage(I18n.string("gui_auction.view_third_bin.not_enough_coins", l)); + player.sendMessage(I18n.t("gui_auction.view_third_bin.not_enough_coins")); return; } - player.sendMessage(I18n.string("gui_auction.view_third_bin.escrow_message", l)); + player.sendMessage(I18n.t("gui_auction.view_third_bin.escrow_message")); player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.COINS, DatapointDouble.class).setValue(coins - item.getStartingPrice()); - player.sendMessage(I18n.string("gui_auction.view_third_bin.processing", l)); + player.sendMessage(I18n.t("gui_auction.view_third_bin.processing")); CompletableFuture future = new ProxyService(ServiceType.AUCTION_HOUSE).handleRequest( - new AuctionFetchItemProtocolObject.AuctionFetchItemMessage(item.getUuid()) + new AuctionFetchItemProtocolObject.AuctionFetchItemMessage(item.getUuid()) ); AuctionItem item = future.join().item(); if (!item.getBids().isEmpty()) { - player.sendMessage(I18n.string("gui_auction.view_third_bin.already_sold", l)); - player.sendMessage(I18n.string("gui_auction.view_third_bin.returning_escrow", l)); + player.sendMessage(I18n.t("gui_auction.view_third_bin.already_sold")); + player.sendMessage(I18n.t("gui_auction.view_third_bin.returning_escrow")); player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.COINS, DatapointDouble.class).setValue(coins + item.getStartingPrice()); return; } @@ -125,8 +122,8 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { CoopDatabase.Coop originatorCoop = CoopDatabase.getFromMember(item.getOriginator()); CoopDatabase.Coop purchaserCoop = CoopDatabase.getFromMember(player.getUuid()); if (originatorCoop != null && purchaserCoop != null && originatorCoop.isSameAs(purchaserCoop)) { - player.sendMessage(I18n.string("gui_auction.view_third_bin.same_coop", l)); - player.sendMessage(I18n.string("gui_auction.view_third_bin.returning_escrow", l)); + player.sendMessage(I18n.t("gui_auction.view_third_bin.same_coop")); + player.sendMessage(I18n.t("gui_auction.view_third_bin.returning_escrow")); player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.COINS, DatapointDouble.class).setValue(coins + item.getStartingPrice()); return; } @@ -143,33 +140,29 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { item.setEndTime(System.currentTimeMillis()); AuctionAddItemProtocolObject.AuctionAddItemMessage message = - new AuctionAddItemProtocolObject.AuctionAddItemMessage( - item, AuctionCategories.TOOLS); + new AuctionAddItemProtocolObject.AuctionAddItemMessage( + item, AuctionCategories.TOOLS); new ProxyService(ServiceType.AUCTION_HOUSE).handleRequest(message).join(); - player.sendMessage(I18n.string("gui_auction.view_third_bin.purchased", l, Map.of( - "item_name", new SkyBlockItem(item.getItem()).getDisplayName(), - "price", String.valueOf(item.getStartingPrice()) - ))); + player.sendMessage(I18n.t("gui_auction.view_third_bin.purchased", Component.text(new SkyBlockItem(item.getItem()).getDisplayName()), Component.text(String.valueOf(item.getStartingPrice())))); ProxyPlayer owner = new ProxyPlayer(item.getOriginator()); if (owner.isOnline().join()) { - owner.sendMessage(Component.text(I18n.string("gui_auction.view_third_bin.owner_notification", l, Map.of( - "buyer_name", player.getFullDisplayName(), - "item_name", new SkyBlockItem(item.getItem()).getDisplayName() - ))).clickEvent( - ClickEvent.runCommand("/ahview " + item.getUuid()) + owner.sendMessage(I18n.t("gui_auction.view_third_bin.owner_notification", + LegacyComponentSerializer.legacySection().deserialize(player.getFullDisplayName()), + LegacyComponentSerializer.legacySection().deserialize(new SkyBlockItem(item.getItem()).getDisplayName()) + ).clickEvent( + ClickEvent.runCommand("/ahview " + item.getUuid()) )); } } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_third_bin.buy_now", Material.GOLD_NUGGET, 1, - "gui_auction.view_third_bin.buy_now.lore", Map.of( - "price", String.valueOf(item.getStartingPrice()) - )); + return TranslatableItemStackCreator.getStack("gui_auction.view_third_bin.buy_now", Material.GOLD_NUGGET, 1, + "gui_auction.view_third_bin.buy_now.lore", Component.text(String.valueOf(item.getStartingPrice()) + )); } }); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewThirdNormal.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewThirdNormal.java index 4e7e28754..029ea2af7 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewThirdNormal.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/auction/view/AuctionViewThirdNormal.java @@ -2,15 +2,16 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.event.ClickEvent; +import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.commons.ServiceType; import net.swofty.commons.StringUtility; -import net.swofty.commons.skyblock.auctions.AuctionCategories; -import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.commons.protocol.objects.auctions.AuctionAddItemProtocolObject; import net.swofty.commons.protocol.objects.auctions.AuctionFetchItemProtocolObject; +import net.swofty.commons.skyblock.auctions.AuctionCategories; +import net.swofty.commons.skyblock.auctions.AuctionItem; import net.swofty.proxyapi.ProxyPlayer; import net.swofty.proxyapi.ProxyPlayerSet; import net.swofty.proxyapi.ProxyService; @@ -34,7 +35,6 @@ import java.util.Comparator; import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.UUID; public class AuctionViewThirdNormal implements AuctionView { @@ -56,7 +56,7 @@ public void open(GUIAuctionViewItem gui, AuctionItem item, SkyBlockPlayer player public ItemStack.Builder getItem(HypixelPlayer p) { Locale l = p.getLocale(); List lore = new ArrayList<>(); - lore.add(I18n.string("gui_auction.view_third_normal.bid_history_total", l, Map.of("count", String.valueOf(item.getBids().size())))); + lore.add(I18n.string("gui_auction.view_third_normal.bid_history_total", l, Component.text(String.valueOf(item.getBids().size())))); List bids = new ArrayList<>(item.getBids()); bids.sort(Comparator.comparingLong(AuctionItem.Bid::value).reversed()); @@ -67,8 +67,8 @@ public ItemStack.Builder getItem(HypixelPlayer p) { AuctionItem.Bid bid = bids.get(i); lore.add(I18n.string("gui_auction.view_third_normal.bid_separator", l)); - lore.add(I18n.string("gui_auction.view_third_normal.bid_value", l, Map.of("value", String.valueOf(bid.value())))); - lore.add(I18n.string("gui_auction.view_third_normal.bid_by", l, Map.of("player_name", SkyBlockPlayer.getDisplayName(bid.uuid())))); + lore.add(I18n.string("gui_auction.view_third_normal.bid_value", l, Component.text(String.valueOf(bid.value())))); + lore.add(I18n.string("gui_auction.view_third_normal.bid_by", l, Component.text(SkyBlockPlayer.getDisplayName(bid.uuid())))); lore.add("§b" + StringUtility.formatTimeAsAgo(bid.timestamp())); } @@ -89,7 +89,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - player.sendMessage(I18n.string("gui_auction.view_third_normal.claiming_bid_coins", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.claiming_bid_coins")); DatapointDouble coins = player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.COINS, DatapointDouble.class); coins.setValue(coins.getValue() + highestBidMadeByPlayer.value()); activeBids.setValue(new ArrayList<>(activeBids.getValue()) {{ @@ -99,15 +99,14 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { add(item.getUuid()); }}); - player.sendMessage(I18n.string("gui_auction.view_third_normal.coins_returned", l, Map.of("amount", String.valueOf(highestBidMadeByPlayer.value())))); + player.sendMessage(I18n.t("gui_auction.view_third_normal.coins_returned", Component.text(String.valueOf(highestBidMadeByPlayer.value())))); player.closeInventory(); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_third_normal.auction_ended_lost", Material.BARRIER, 1, - "gui_auction.view_third_normal.auction_ended_lost_claim.lore", Map.of( - "amount", String.valueOf(highestBidMadeByPlayer.value()) + return TranslatableItemStackCreator.getStack("gui_auction.view_third_normal.auction_ended_lost", Material.BARRIER, 1, + "gui_auction.view_third_normal.auction_ended_lost_claim.lore", Component.text(String.valueOf(highestBidMadeByPlayer.value()) )); } }); @@ -115,7 +114,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { gui.set(new GUIItem(29) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_third_normal.auction_ended_lost", Material.BARRIER, 1, + return TranslatableItemStackCreator.getStack("gui_auction.view_third_normal.auction_ended_lost", Material.BARRIER, 1, "gui_auction.view_third_normal.auction_ended_lost_no_claim.lore"); } }); @@ -127,7 +126,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - player.sendMessage(I18n.string("gui_auction.view_third_normal.claiming_item", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.claiming_item")); activeBids.setValue(new ArrayList<>(activeBids.getValue()) {{ remove(item.getUuid()); }}); @@ -137,13 +136,13 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { player.addAndUpdateItem(item.getItem()); - player.sendMessage(I18n.string("gui_auction.view_third_normal.claimed_item", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.claimed_item")); player.closeInventory(); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_third_normal.auction_ended_won", Material.EMERALD, 1, + return TranslatableItemStackCreator.getStack("gui_auction.view_third_normal.auction_ended_won", Material.EMERALD, 1, "gui_auction.view_third_normal.auction_ended_won_claim.lore"); } }); @@ -151,7 +150,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { gui.set(new GUIItem(29) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_third_normal.auction_ended_won", Material.EMERALD, 1, + return TranslatableItemStackCreator.getStack("gui_auction.view_third_normal.auction_ended_won", Material.EMERALD, 1, "gui_auction.view_third_normal.auction_ended_won_claimed.lore"); } }); @@ -168,11 +167,11 @@ public HypixelInventoryGUI onQueryFinish(String query, HypixelPlayer player) { try { val = Long.parseLong(query); } catch (NumberFormatException ex) { - player.sendMessage(I18n.string("gui_auction.view_third_normal.number_parse_error", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.number_parse_error")); return gui; } if (val < gui.minimumBidAmount) { - player.sendMessage(I18n.string("gui_auction.view_third_normal.bid_too_low", l, Map.of("minimum", String.valueOf(gui.minimumBidAmount)))); + player.sendMessage(I18n.t("gui_auction.view_third_normal.bid_too_low", Component.text(String.valueOf(gui.minimumBidAmount)))); return gui; } @@ -184,9 +183,9 @@ public HypixelInventoryGUI onQueryFinish(String query, HypixelPlayer player) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, - "gui_auction.view_third_normal.bid_amount", Material.GOLD_INGOT, 1, - "gui_auction.view_third_normal.bid_amount.lore", Map.of("minimum", String.valueOf(gui.minimumBidAmount), "amount", String.valueOf(gui.bidAmount))); + return TranslatableItemStackCreator.getStack( + "gui_auction.view_third_normal.bid_amount", Material.GOLD_INGOT, 1, + "gui_auction.view_third_normal.bid_amount.lore", Component.text(String.valueOf(gui.minimumBidAmount)), Component.text(String.valueOf(gui.bidAmount))); } }); gui.set(new GUIClickableItem(29) { @@ -195,23 +194,23 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); if (gui.bidAmount < gui.minimumBidAmount) { - player.sendMessage(I18n.string("gui_auction.view_third_normal.bid_too_low", l, Map.of("minimum", String.valueOf(gui.minimumBidAmount)))); + player.sendMessage(I18n.t("gui_auction.view_third_normal.bid_too_low", Component.text(String.valueOf(gui.minimumBidAmount)))); return; } DatapointDouble coins = player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.COINS, DatapointDouble.class); if (coins.getValue() < gui.bidAmount) { - player.sendMessage(I18n.string("gui_auction.view_third_normal.not_enough_coins", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.not_enough_coins")); return; } UUID topBidder = item.getBids().stream().max(Comparator.comparingLong(AuctionItem.Bid::value)).map(AuctionItem.Bid::uuid).orElse(null); if (topBidder != null && topBidder.equals(player.getUuid())) { - player.sendMessage(I18n.string("gui_auction.view_third_normal.already_top_bid", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.already_top_bid")); return; } - player.sendMessage(I18n.string("gui_auction.view_third_normal.escrow_message", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.escrow_message")); coins.setValue(coins.getValue() - gui.bidAmount); player.closeInventory(); @@ -225,13 +224,13 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { CoopDatabase.Coop originatorCoop = CoopDatabase.getFromMember(item.getOriginator()); CoopDatabase.Coop purchaserCoop = CoopDatabase.getFromMember(player.getUuid()); if (originatorCoop != null && purchaserCoop != null && originatorCoop.isSameAs(purchaserCoop)) { - player.sendMessage(I18n.string("gui_auction.view_third_normal.same_coop", l)); - player.sendMessage(I18n.string("gui_auction.view_third_normal.returning_escrow", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.same_coop")); + player.sendMessage(I18n.t("gui_auction.view_third_normal.returning_escrow")); coins.setValue(coins.getValue() + gui.bidAmount); return; } - player.sendMessage(I18n.string("gui_auction.view_third_normal.processing_bid", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.processing_bid")); Thread.startVirtualThread(() -> { AuctionFetchItemProtocolObject.AuctionFetchItemResponse itemResponse = (AuctionFetchItemProtocolObject.AuctionFetchItemResponse) new ProxyService(ServiceType.AUCTION_HOUSE).handleRequest( new AuctionFetchItemProtocolObject.AuctionFetchItemMessage(item.getUuid()) @@ -241,15 +240,15 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { AuctionItem.Bid highestBid = item.getBids().stream().max(Comparator.comparingLong(AuctionItem.Bid::value)).orElse(null); if (highestBid != null && highestBid.value() >= gui.bidAmount) { - player.sendMessage(I18n.string("gui_auction.view_third_normal.bid_changed", l)); - player.sendMessage(I18n.string("gui_auction.view_third_normal.returning_escrow", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.bid_changed")); + player.sendMessage(I18n.t("gui_auction.view_third_normal.returning_escrow")); coins.setValue(coins.getValue() + gui.bidAmount); return; } if (item.getEndTime() + 5000 < System.currentTimeMillis()) { - player.sendMessage(I18n.string("gui_auction.view_third_normal.auction_ended_error", l)); - player.sendMessage(I18n.string("gui_auction.view_third_normal.returning_escrow", l)); + player.sendMessage(I18n.t("gui_auction.view_third_normal.auction_ended_error")); + player.sendMessage(I18n.t("gui_auction.view_third_normal.returning_escrow")); coins.setValue(coins.getValue() + gui.bidAmount); return; } @@ -264,7 +263,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { item, category); new ProxyService(ServiceType.AUCTION_HOUSE).handleRequest(message).join(); - player.sendMessage(I18n.string("gui_auction.view_third_normal.bid_placed", l, Map.of("amount", String.valueOf(gui.bidAmount)))); + player.sendMessage(I18n.t("gui_auction.view_third_normal.bid_placed", Component.text(String.valueOf(gui.bidAmount)))); new GUIAuctionViewItem(gui.auctionID, gui.previousGUI).open(player); DatapointUUIDList activeBids = player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.AUCTION_ACTIVE_BIDS, DatapointUUIDList.class); @@ -279,11 +278,11 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { if (playersBid < gui.bidAmount && !alertsSentOutTo.contains(proxyPlayer.getUuid())) { alertsSentOutTo.add(proxyPlayer.getUuid()); - proxyPlayer.sendMessage(Component.text(I18n.string("gui_auction.view_third_normal.outbid_notification", l, Map.of( - "bidder_name", player.getFullDisplayName(), - "difference", String.valueOf(gui.bidAmount - playersBid), - "item_name", new SkyBlockItem(item.getItem()).getDisplayName() - ))).clickEvent( + proxyPlayer.sendMessage(I18n.t("gui_auction.view_third_normal.outbid_notification", + LegacyComponentSerializer.legacySection().deserialize(player.getFullDisplayName()), + Component.text(String.valueOf(gui.bidAmount - playersBid)), + LegacyComponentSerializer.legacySection().deserialize(new SkyBlockItem(item.getItem()).getDisplayName()) + ).clickEvent( ClickEvent.runCommand("/ahview " + gui.auctionID) )); } @@ -292,11 +291,11 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { ProxyPlayer auctionOwner = new ProxyPlayer(item.getOriginator()); if (auctionOwner.isOnline().join()) { - auctionOwner.sendMessage(Component.text(I18n.string("gui_auction.view_third_normal.owner_bid_notification", l, Map.of( - "bidder_name", player.getFullDisplayName(), - "amount", String.valueOf(gui.bidAmount), - "item_name", new SkyBlockItem(item.getItem()).getDisplayName() - ))).clickEvent( + auctionOwner.sendMessage(I18n.t("gui_auction.view_third_normal.owner_bid_notification", + LegacyComponentSerializer.legacySection().deserialize(player.getFullDisplayName()), + Component.text(String.valueOf(gui.bidAmount)), + LegacyComponentSerializer.legacySection().deserialize(new SkyBlockItem(item.getItem()).getDisplayName()) + ).clickEvent( ClickEvent.runCommand("/ahview " + gui.auctionID) )); } @@ -305,8 +304,8 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_auction.view_third_normal.submit_bid", Material.GOLD_NUGGET, 1, - "gui_auction.view_third_normal.submit_bid.lore", Map.of("amount", String.valueOf(gui.bidAmount))); + return TranslatableItemStackCreator.getStack("gui_auction.view_third_normal.submit_bid", Material.GOLD_NUGGET, 1, + "gui_auction.view_third_normal.submit_bid.lore", Component.text(String.valueOf(gui.bidAmount))); } }); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBanker.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBanker.java index bd6dc7271..61bfac0fd 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBanker.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBanker.java @@ -7,7 +7,6 @@ import net.minestom.server.item.Material; import net.swofty.commons.StringUtility; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.RefreshingGUI; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.inventory.item.GUIClickableItem; @@ -22,19 +21,18 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIBanker extends HypixelInventoryGUI implements RefreshingGUI { public GUIBanker() { - super(I18n.string("gui_banker.main.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_banker.main.title"), InventoryType.CHEST_4_ROW); } @Override public void setItems(InventoryGUIOpenEvent e) { Locale l = e.player().getLocale(); if (((SkyBlockPlayer) e.player()).isBankDelayed) { - e.player().sendMessage(I18n.string("gui_banker.main.processing_transactions", l)); - e.player().sendMessage(I18n.string("gui_banker.main.processing_wait", l)); + e.player().sendMessage(I18n.t("gui_banker.main.processing_transactions")); + e.player().sendMessage(I18n.t("gui_banker.main.processing_wait")); e.player().closeInventory(); return; } @@ -60,10 +58,9 @@ public void refreshItems(HypixelPlayer player) { set(new GUIItem(32) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_banker.main.information", Material.REDSTONE_TORCH, 1, - "gui_banker.main.information.lore", Map.of( - "limit", StringUtility.commaify(bankData.getBalanceLimit()), - "hours", String.valueOf(SkyBlockCalendar.getHoursUntilNextInterest()) + return TranslatableItemStackCreator.getStack("gui_banker.main.information", Material.REDSTONE_TORCH, 1, + "gui_banker.main.information.lore", Component.text(StringUtility.commaify(bankData.getBalanceLimit())), + Component.text(String.valueOf(SkyBlockCalendar.getHoursUntilNextInterest()) )); } }); @@ -77,10 +74,9 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_banker.main.deposit", Material.CHEST, 1, - "gui_banker.main.deposit.lore", Map.of( - "balance", StringUtility.decimalify(bankData.getAmount(), 1), - "hours", String.valueOf(SkyBlockCalendar.getHoursUntilNextInterest()) + return TranslatableItemStackCreator.getStack("gui_banker.main.deposit", Material.CHEST, 1, + "gui_banker.main.deposit.lore", Component.text(StringUtility.decimalify(bankData.getAmount(), 1)), + Component.text(String.valueOf(SkyBlockCalendar.getHoursUntilNextInterest()) )); } }); @@ -94,10 +90,8 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_banker.main.withdraw", Material.DISPENSER, 1, - "gui_banker.main.withdraw.lore", Map.of( - "balance", StringUtility.decimalify(bankData.getAmount(), 1) - )); + return TranslatableItemStackCreator.getStack("gui_banker.main.withdraw", Material.DISPENSER, 1, + "gui_banker.main.withdraw.lore", Component.text(StringUtility.decimalify(bankData.getAmount(), 1))); } }); @@ -116,16 +110,11 @@ public ItemStack.Builder getItem(HypixelPlayer p) { boolean isNegative = transaction.amount < 0; String amount = StringUtility.decimalify(Math.abs(transaction.amount), 1); - lore.add(I18n.string("gui_banker.main.transaction_entry", l, Map.of( - "sign", isNegative ? "§c-" : "§a+", - "amount", amount, - "time_ago", StringUtility.formatTimeAsAgo(transaction.timestamp), - "originator", transaction.originator - ))); + lore.add(I18n.string("gui_banker.main.transaction_entry", l, Component.text(isNegative ? "§c-" : "§a+"), Component.text(amount), Component.text(StringUtility.formatTimeAsAgo(transaction.timestamp)), Component.text(transaction.originator))); } } - return TranslatableItemStackCreator.getStack(p, "gui_banker.main.recent_transactions", + return TranslatableItemStackCreator.getStack("gui_banker.main.recent_transactions", Material.FILLED_MAP, 1, lore); } }); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBankerDeposit.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBankerDeposit.java index 3d4617051..dfc404e2b 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBankerDeposit.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBankerDeposit.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.banker; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.Inventory; @@ -23,12 +24,11 @@ import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIBankerDeposit extends HypixelInventoryGUI { public GUIBankerDeposit() { - super(I18n.string("gui_banker.deposit.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_banker.deposit.title"), InventoryType.CHEST_4_ROW); } @Override @@ -41,17 +41,13 @@ public void setItems(InventoryGUIOpenEvent e) { public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - return TranslatableItemStackCreator.getStack(p, "gui_banker.deposit.whole_purse", Material.CHEST, 64, + return TranslatableItemStackCreator.getStack("gui_banker.deposit.whole_purse", Material.CHEST, 64, List.of( I18n.string("gui_banker.deposit.whole_purse_subtitle", l), " ", - I18n.string("gui_banker.deposit.current_balance", l, Map.of( - "balance", StringUtility.decimalify( - player.getSkyblockDataHandler().get(SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue().getAmount(), 1) - )), - I18n.string("gui_banker.deposit.amount_to_deposit", l, Map.of( - "amount", StringUtility.decimalify(player.getCoins(), 1) - )), + I18n.string("gui_banker.deposit.current_balance", l, Component.text(StringUtility.decimalify( + player.getSkyblockDataHandler().get(SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue().getAmount(), 1))), + I18n.string("gui_banker.deposit.amount_to_deposit", l, Component.text(StringUtility.decimalify(player.getCoins(), 1))), " ", I18n.string("gui_banker.deposit.click", l) )); @@ -70,17 +66,13 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - return TranslatableItemStackCreator.getStack(p, "gui_banker.deposit.half_purse", Material.CHEST, 32, + return TranslatableItemStackCreator.getStack("gui_banker.deposit.half_purse", Material.CHEST, 32, List.of( I18n.string("gui_banker.deposit.whole_purse_subtitle", l), " ", - I18n.string("gui_banker.deposit.current_balance", l, Map.of( - "balance", StringUtility.decimalify( - player.getSkyblockDataHandler().get(SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue().getAmount(), 1) - )), - I18n.string("gui_banker.deposit.amount_to_deposit", l, Map.of( - "amount", StringUtility.decimalify(player.getCoins() / 2, 1) - )), + I18n.string("gui_banker.deposit.current_balance", l, Component.text(StringUtility.decimalify( + player.getSkyblockDataHandler().get(SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue().getAmount(), 1))), + I18n.string("gui_banker.deposit.amount_to_deposit", l, Component.text(StringUtility.decimalify(player.getCoins() / 2, 1))), " ", I18n.string("gui_banker.deposit.click", l) )); @@ -102,18 +94,18 @@ public HypixelInventoryGUI onQueryFinish(String query, HypixelPlayer p) { try { double amount = Double.parseDouble(query); if (amount > player.getCoins()) { - player.sendMessage(I18n.string("gui_banker.deposit.not_enough_coins", l)); + player.sendMessage(I18n.t("gui_banker.deposit.not_enough_coins")); return null; } if (amount <= 0) { - player.sendMessage(I18n.string("gui_banker.deposit.invalid_amount", l)); + player.sendMessage(I18n.t("gui_banker.deposit.invalid_amount")); return null; } player.closeInventory(); attemptDeposit(player, amount); } catch (NumberFormatException ex) { - player.sendMessage(I18n.string("gui_banker.deposit.invalid_number", l)); + player.sendMessage(I18n.t("gui_banker.deposit.invalid_number")); } return null; } @@ -122,14 +114,12 @@ public HypixelInventoryGUI onQueryFinish(String query, HypixelPlayer p) { public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - return TranslatableItemStackCreator.getStack(p, "gui_banker.deposit.custom_amount", Material.OAK_SIGN, 1, + return TranslatableItemStackCreator.getStack("gui_banker.deposit.custom_amount", Material.OAK_SIGN, 1, List.of( I18n.string("gui_banker.deposit.whole_purse_subtitle", l), " ", - I18n.string("gui_banker.deposit.current_balance", l, Map.of( - "balance", StringUtility.decimalify( - player.getSkyblockDataHandler().get(SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue().getAmount(), 1) - )), + I18n.string("gui_banker.deposit.current_balance", l, Component.text(StringUtility.decimalify( + player.getSkyblockDataHandler().get(SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue().getAmount(), 1))), I18n.string("gui_banker.deposit.custom_amount_label", l), " ", I18n.string("gui_banker.deposit.click", l) @@ -157,13 +147,11 @@ private void attemptDeposit(SkyBlockPlayer player, double amount) { } DatapointBankData.BankData bankData = player.getSkyblockDataHandler().get(net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue(); if (bankData.getAmount() + amount > bankData.getBalanceLimit()) { - player.sendMessage(I18n.string("gui_banker.deposit.exceed_limit", l, Map.of( - "limit", StringUtility.commaify(bankData.getBalanceLimit()) - ))); + player.sendMessage(I18n.string("gui_banker.deposit.exceed_limit", l, Component.text(StringUtility.commaify(bankData.getBalanceLimit())))); return; } - player.sendMessage(I18n.string("gui_banker.deposit.depositing", l)); + player.sendMessage(I18n.t("gui_banker.deposit.depositing")); player.removeCoins(amount); if (!player.isCoop()) { bankData.addAmount(amount); @@ -173,10 +161,7 @@ private void attemptDeposit(SkyBlockPlayer player, double amount) { player.getUsername() )); - player.sendMessage(I18n.string("gui_banker.deposit.success", l, Map.of( - "amount", StringUtility.decimalify(amount, 1), - "balance", StringUtility.decimalify(bankData.getAmount(), 1) - ))); + player.sendMessage(I18n.string("gui_banker.deposit.success", l, Component.text(StringUtility.decimalify(amount, 1)), Component.text(StringUtility.decimalify(bankData.getAmount(), 1)))); return; } CoopDatabase.Coop coop = player.getCoop(); @@ -191,9 +176,7 @@ private void attemptDeposit(SkyBlockPlayer player, double amount) { SkyBlockDataHandler.Data.BANK_DATA, (DatapointBankData.BankData latestBankData) -> { if (latestBankData.getAmount() + amount > latestBankData.getBalanceLimit()) { - player.sendMessage(I18n.string("gui_banker.deposit.exceed_limit", l, Map.of( - "limit", StringUtility.commaify(latestBankData.getBalanceLimit()) - ))); + player.sendMessage(I18n.string("gui_banker.deposit.exceed_limit", l, Component.text(StringUtility.commaify(latestBankData.getBalanceLimit())))); return null; } @@ -202,15 +185,12 @@ private void attemptDeposit(SkyBlockPlayer player, double amount) { latestBankData.addTransaction(new DatapointBankData.Transaction( System.currentTimeMillis(), amount, player.getUsername())); - player.sendMessage(I18n.string("gui_banker.deposit.success", l, Map.of( - "amount", StringUtility.decimalify(amount, 1), - "balance", StringUtility.decimalify(latestBankData.getAmount(), 1) - ))); + player.sendMessage(I18n.string("gui_banker.deposit.success", l, Component.text(StringUtility.decimalify(amount, 1)), Component.text(StringUtility.decimalify(latestBankData.getAmount(), 1)))); return latestBankData; }, () -> { - player.sendMessage(I18n.string("gui_banker.deposit.coop_busy", l)); + player.sendMessage(I18n.t("gui_banker.deposit.coop_busy")); } ); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBankerWithdraw.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBankerWithdraw.java index aae235909..c830cf6d6 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBankerWithdraw.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/banker/GUIBankerWithdraw.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.banker; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.Inventory; @@ -22,12 +23,11 @@ import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIBankerWithdraw extends HypixelInventoryGUI { public GUIBankerWithdraw() { - super(I18n.string("gui_banker.withdraw.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_banker.withdraw.title"), InventoryType.CHEST_4_ROW); } @Override @@ -41,16 +41,12 @@ public void setItems(InventoryGUIOpenEvent e) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { Locale l = p.getLocale(); - return TranslatableItemStackCreator.getStack(p, "gui_banker.withdraw.everything", Material.DISPENSER, 64, + return TranslatableItemStackCreator.getStack("gui_banker.withdraw.everything", Material.DISPENSER, 64, List.of( I18n.string("gui_banker.withdraw.everything_subtitle", l), " ", - I18n.string("gui_banker.withdraw.current_balance", l, Map.of( - "balance", StringUtility.decimalify(bankBalance, 1) - )), - I18n.string("gui_banker.withdraw.amount_to_withdraw", l, Map.of( - "amount", StringUtility.decimalify(bankBalance, 1) - )), + I18n.string("gui_banker.withdraw.current_balance", l, Component.text(StringUtility.decimalify(bankBalance, 1))), + I18n.string("gui_banker.withdraw.amount_to_withdraw", l, Component.text(StringUtility.decimalify(bankBalance, 1))), " ", I18n.string("gui_banker.withdraw.click", l) )); @@ -68,16 +64,12 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { Locale l = p.getLocale(); - return TranslatableItemStackCreator.getStack(p, "gui_banker.withdraw.half_account", Material.DISPENSER, 32, + return TranslatableItemStackCreator.getStack("gui_banker.withdraw.half_account", Material.DISPENSER, 32, List.of( I18n.string("gui_banker.withdraw.everything_subtitle", l), " ", - I18n.string("gui_banker.withdraw.current_balance", l, Map.of( - "balance", StringUtility.decimalify(bankBalance, 1) - )), - I18n.string("gui_banker.withdraw.amount_to_withdraw", l, Map.of( - "amount", StringUtility.decimalify(bankBalance / 2, 1) - )), + I18n.string("gui_banker.withdraw.current_balance", l, Component.text(StringUtility.decimalify(bankBalance, 1))), + I18n.string("gui_banker.withdraw.amount_to_withdraw", l, Component.text(StringUtility.decimalify(bankBalance / 2, 1))), " ", I18n.string("gui_banker.withdraw.click", l) )); @@ -102,16 +94,12 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { Locale l = p.getLocale(); - return TranslatableItemStackCreator.getStack(p, "gui_banker.withdraw.twenty_percent", Material.DISPENSER, 1, + return TranslatableItemStackCreator.getStack("gui_banker.withdraw.twenty_percent", Material.DISPENSER, 1, List.of( I18n.string("gui_banker.withdraw.everything_subtitle", l), " ", - I18n.string("gui_banker.withdraw.current_balance", l, Map.of( - "balance", StringUtility.decimalify(bankBalance, 1) - )), - I18n.string("gui_banker.withdraw.amount_to_withdraw", l, Map.of( - "amount", StringUtility.decimalify(bankBalance / 5, 1) - )), + I18n.string("gui_banker.withdraw.current_balance", l, Component.text(StringUtility.decimalify(bankBalance, 1))), + I18n.string("gui_banker.withdraw.amount_to_withdraw", l, Component.text(StringUtility.decimalify(bankBalance / 5, 1))), " ", I18n.string("gui_banker.withdraw.click", l) )); @@ -126,18 +114,18 @@ public HypixelInventoryGUI onQueryFinish(String query, HypixelPlayer p) { try { double amount = Double.parseDouble(query); if (amount > bankBalance) { - player.sendMessage(I18n.string("gui_banker.withdraw.not_enough_coins", l)); + player.sendMessage(I18n.t("gui_banker.withdraw.not_enough_coins")); return null; } if (amount <= 0) { - player.sendMessage(I18n.string("gui_banker.withdraw.invalid_amount", l)); + player.sendMessage(I18n.t("gui_banker.withdraw.invalid_amount")); return null; } player.closeInventory(); attemptWithdrawal(player, amount); } catch (NumberFormatException ex) { - player.sendMessage(I18n.string("gui_banker.withdraw.invalid_number", l)); + player.sendMessage(I18n.t("gui_banker.withdraw.invalid_number")); } return null; } @@ -146,14 +134,12 @@ public HypixelInventoryGUI onQueryFinish(String query, HypixelPlayer p) { public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - return TranslatableItemStackCreator.getStack(p, "gui_banker.withdraw.custom_amount", Material.OAK_SIGN, 1, + return TranslatableItemStackCreator.getStack("gui_banker.withdraw.custom_amount", Material.OAK_SIGN, 1, List.of( I18n.string("gui_banker.withdraw.everything_subtitle", l), " ", - I18n.string("gui_banker.withdraw.current_balance", l, Map.of( - "balance", StringUtility.decimalify( - player.getSkyblockDataHandler().get(SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue().getAmount(), 1) - )), + I18n.string("gui_banker.withdraw.current_balance", l, Component.text(StringUtility.decimalify( + player.getSkyblockDataHandler().get(SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue().getAmount(), 1))), " ", I18n.string("gui_banker.withdraw.click", l) )); @@ -175,12 +161,12 @@ public void suddenlyQuit(Inventory inventory, HypixelPlayer player) { private void attemptWithdrawal(SkyBlockPlayer player, double amount) { Locale l = player.getLocale(); - player.sendMessage(I18n.string("gui_banker.withdraw.withdrawing", l)); + player.sendMessage(I18n.t("gui_banker.withdraw.withdrawing")); if (!player.isCoop()) { DatapointBankData.BankData bankData = player.getSkyblockDataHandler().get(SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue(); if (amount > bankData.getAmount()) { - player.sendMessage(I18n.string("gui_banker.withdraw.not_enough_coins", l)); + player.sendMessage(I18n.t("gui_banker.withdraw.not_enough_coins")); return; } @@ -189,10 +175,7 @@ private void attemptWithdrawal(SkyBlockPlayer player, double amount) { System.currentTimeMillis(), -amount, player.getUsername())); player.addCoins(amount); - player.sendMessage(I18n.string("gui_banker.withdraw.success", l, Map.of( - "amount", StringUtility.decimalify(amount, 1), - "balance", StringUtility.decimalify(bankData.getAmount(), 1) - ))); + player.sendMessage(I18n.string("gui_banker.withdraw.success", l, Component.text(StringUtility.decimalify(amount, 1)), Component.text(StringUtility.decimalify(bankData.getAmount(), 1)))); return; } @@ -208,7 +191,7 @@ private void attemptWithdrawal(SkyBlockPlayer player, double amount) { (DatapointBankData.BankData latestBankData) -> { if (amount > latestBankData.getAmount()) { - player.sendMessage(I18n.string("gui_banker.withdraw.not_enough_coins", l)); + player.sendMessage(I18n.t("gui_banker.withdraw.not_enough_coins")); return null; } @@ -217,15 +200,12 @@ private void attemptWithdrawal(SkyBlockPlayer player, double amount) { System.currentTimeMillis(), -amount, player.getUsername())); player.addCoins(amount); - player.sendMessage(I18n.string("gui_banker.withdraw.success", l, Map.of( - "amount", StringUtility.decimalify(amount, 1), - "balance", StringUtility.decimalify(latestBankData.getAmount(), 1) - ))); + player.sendMessage(I18n.string("gui_banker.withdraw.success", l, Component.text(StringUtility.decimalify(amount, 1)), Component.text(StringUtility.decimalify(latestBankData.getAmount(), 1)))); return latestBankData; }, () -> { - player.sendMessage(I18n.string("gui_banker.withdraw.coop_busy", l)); + player.sendMessage(I18n.t("gui_banker.withdraw.coop_busy")); } ); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaar.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaar.java index de9eaf27c..a2cd9c0bb 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaar.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaar.java @@ -1,6 +1,7 @@ package net.swofty.type.skyblockgeneric.gui.inventories.bazaar; import lombok.Getter; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; @@ -42,7 +43,7 @@ public class GUIBazaar extends HypixelInventoryGUI implements RefreshingGUI { private final BazaarCategories category; public GUIBazaar(BazaarCategories category) { - super(I18n.string("gui_bazaar.main.title", Map.of("category", StringUtility.toNormalCase(category.name()))), + super(I18n.t("gui_bazaar.main.title", Component.text(StringUtility.toNormalCase(category.name()))), InventoryType.CHEST_6_ROW); this.category = category; @@ -59,7 +60,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_bazaar.main.manage_orders_button", + return TranslatableItemStackCreator.getStack("gui_bazaar.main.manage_orders_button", Material.BOOK, 1, "gui_bazaar.main.manage_orders_button.lore"); } @@ -124,7 +125,7 @@ private void renderPlaceholders() { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_bazaar.main.loading", Material.GRAY_STAINED_GLASS_PANE, 1); + return TranslatableItemStackCreator.getStack("gui_bazaar.main.loading", Material.GRAY_STAINED_GLASS_PANE, 1); } }); } @@ -177,7 +178,7 @@ private void rebuildCacheAndRender(SkyBlockPlayer player) { BazaarItemSet set = sets.get(i); List lore = new ArrayList<>(); - lore.add(I18n.string("gui_bazaar.main.item_set_products", l, Map.of("count", String.valueOf(set.items.size())))); + lore.add(I18n.string("gui_bazaar.main.item_set_products", l, Component.text(String.valueOf(set.items.size())))); lore.add(" "); // Add price data for each item in the set @@ -215,7 +216,7 @@ private void rebuildCacheAndRender(SkyBlockPlayer player) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_bazaar.main.error_loading", Material.BARRIER, 1, + return TranslatableItemStackCreator.getStack("gui_bazaar.main.error_loading", Material.BARRIER, 1, "gui_bazaar.main.error_loading.lore"); } }); @@ -288,7 +289,7 @@ public void refreshItems(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; player.getBazaarConnector().isOnline().thenAccept(online -> { if (!online) { - player.sendMessage(I18n.string("gui_bazaar.main.offline_message", player.getLocale())); + player.sendMessage(I18n.t("gui_bazaar.main.offline_message")); player.closeInventory(); } else { player.getBazaarConnector().processAllPendingTransactions(); @@ -300,4 +301,4 @@ private record CacheEntry(long timestamp, List slots) { record CachedSlot(int slot, BazaarItemSet itemSet, List lore) { } } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarItem.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarItem.java index 9b349aea9..a7922d054 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarItem.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarItem.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.bazaar; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; @@ -34,7 +35,7 @@ public class GUIBazaarItem extends HypixelInventoryGUI implements RefreshingGUI private BazaarConnector.BazaarStatistics currentStats; public GUIBazaarItem(ItemType itemType) { - super(I18n.string("gui_bazaar.item.title", Map.of("set_name", BazaarCategories.getFromItem(itemType).getValue().displayName, "item_name", itemType.getDisplayName())), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_bazaar.item.title", Component.text(BazaarCategories.getFromItem(itemType).getValue().displayName), Component.text(itemType.getDisplayName())), InventoryType.CHEST_4_ROW); this.itemType = itemType; fill(ItemStackCreator.createNamedItemStack(Material.BLACK_STAINED_GLASS_PANE)); @@ -52,7 +53,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_bazaar.item.manage_orders_button", Material.BOOK, 1, + return TranslatableItemStackCreator.getStack("gui_bazaar.item.manage_orders_button", Material.BOOK, 1, "gui_bazaar.item.manage_orders_button.lore"); } }); @@ -67,7 +68,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStackHead(p, "gui_bazaar.item.go_back_bazaar", "c232e3820897429157619b0ee099fec0628f602fff12b695de54aef11d923ad7", 1, + return TranslatableItemStackCreator.getStackHead("gui_bazaar.item.go_back_bazaar", "c232e3820897429157619b0ee099fec0628f602fff12b695de54aef11d923ad7", 1, "gui_bazaar.item.go_back_bazaar.lore"); } }); @@ -97,13 +98,13 @@ private void updateItems(BazaarConnector.BazaarStatistics stats) { public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; if (stats.bestAsk() <= 0) { - p.sendMessage(I18n.string("gui_bazaar.item.buy_no_offers_message", p.getLocale())); + p.sendMessage(I18n.t("gui_bazaar.item.buy_no_offers_message")); return; } int maxSpace = player.maxItemFit(itemType); if (maxSpace <= 0) { - p.sendMessage(I18n.string("gui_bazaar.item.buy_inventory_full", p.getLocale())); + p.sendMessage(I18n.t("gui_bazaar.item.buy_inventory_full")); return; } @@ -116,7 +117,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { double totalCost = priceWithFee * amount; if (totalCost > player.getCoins()) { - p.sendMessage(I18n.string("gui_bazaar.item.buy_need_coins", p.getLocale(), Map.of("amount", FORMATTER.format(totalCost)))); + p.sendMessage(I18n.string("gui_bazaar.item.buy_need_coins", p.getLocale(), Component.text(FORMATTER.format(totalCost)))); return; } @@ -140,8 +141,8 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add(I18n.string("gui_bazaar.item.buy_no_offers", l)); } else { double priceWithFee = stats.bestAsk() * 1.04; - lore.add(I18n.string("gui_bazaar.item.buy_price", l, Map.of("price", FORMATTER.format(priceWithFee)))); - lore.add(I18n.string("gui_bazaar.item.buy_max_space", l, Map.of("amount", String.valueOf(player.maxItemFit(itemType))))); + lore.add(I18n.string("gui_bazaar.item.buy_price", l, Component.text(FORMATTER.format(priceWithFee)))); + lore.add(I18n.string("gui_bazaar.item.buy_max_space", l, Component.text(String.valueOf(player.maxItemFit(itemType))))); lore.add(" "); lore.add(I18n.string("gui_bazaar.item.buy_click", l)); } @@ -156,12 +157,12 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; int have = player.getAmountInInventory(itemType); if (have <= 0) { - p.sendMessage(I18n.string("gui_bazaar.item.sell_no_items", p.getLocale(), Map.of("item_name", itemType.getDisplayName()))); + p.sendMessage(I18n.string("gui_bazaar.item.sell_no_items", p.getLocale(), Component.text(itemType.getDisplayName()))); return; } if (stats.bestBid() <= 0) { - p.sendMessage(I18n.string("gui_bazaar.item.sell_no_orders_message", p.getLocale())); + p.sendMessage(I18n.t("gui_bazaar.item.sell_no_orders_message")); return; } @@ -190,11 +191,11 @@ public ItemStack.Builder getItem(HypixelPlayer p) { if (have <= 0) { lore.add(I18n.string("gui_bazaar.item.sell_have_zero", l)); } else if (stats.bestBid() <= 0) { - lore.add(I18n.string("gui_bazaar.item.sell_have", l, Map.of("amount", String.valueOf(have)))); + lore.add(I18n.string("gui_bazaar.item.sell_have", l, Component.text(String.valueOf(have)))); lore.add(I18n.string("gui_bazaar.item.sell_no_orders", l)); } else { - lore.add(I18n.string("gui_bazaar.item.sell_have", l, Map.of("amount", String.valueOf(have)))); - lore.add(I18n.string("gui_bazaar.item.sell_price", l, Map.of("price", FORMATTER.format(stats.bestBid())))); + lore.add(I18n.string("gui_bazaar.item.sell_have", l, Component.text(String.valueOf(have)))); + lore.add(I18n.string("gui_bazaar.item.sell_price", l, Component.text(FORMATTER.format(stats.bestBid())))); lore.add(" "); lore.add(I18n.string("gui_bazaar.item.sell_click", l)); } @@ -221,22 +222,22 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { double totalCost = price * amount; Locale l = p.getLocale(); if (totalCost > player.getCoins()) { - p.sendMessage(I18n.string("gui_bazaar.item.buy_order_need_coins", l, Map.of("amount", FORMATTER.format(totalCost)))); + p.sendMessage(I18n.string("gui_bazaar.item.buy_order_need_coins", l, Component.text(FORMATTER.format(totalCost)))); new GUIBazaarItem(itemType).open(p); return; } player.removeCoins(totalCost); - p.sendMessage(I18n.string("gui_bazaar.item.buy_order_escrow", l, Map.of("amount", FORMATTER.format(totalCost)))); + p.sendMessage(I18n.string("gui_bazaar.item.buy_order_escrow", l, Component.text(FORMATTER.format(totalCost)))); player.getBazaarConnector().createBuyOrder(itemType, price, amount) .thenAccept(result -> { if (result.success()) { - p.sendMessage(I18n.string("gui_bazaar.item.buy_order_created", l, Map.of("amount", String.valueOf(amount), "price", FORMATTER.format(price)))); + p.sendMessage(I18n.string("gui_bazaar.item.buy_order_created", l, Component.text(String.valueOf(amount)), Component.text(FORMATTER.format(price)))); p.closeInventory(); } else { player.addCoins(totalCost); - p.sendMessage(I18n.string("gui_bazaar.item.buy_order_failed", l, Map.of("amount", FORMATTER.format(totalCost)))); + p.sendMessage(I18n.string("gui_bazaar.item.buy_order_failed", l, Component.text(FORMATTER.format(totalCost)))); new GUIBazaarItem(itemType).open(p); } }); @@ -253,7 +254,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add(" "); lore.add(I18n.string("gui_bazaar.item.create_buy_order_max", l)); if (stats.bestAsk() > 0) { - lore.add(I18n.string("gui_bazaar.item.create_buy_order_best_ask", l, Map.of("price", FORMATTER.format(stats.bestAsk())))); + lore.add(I18n.string("gui_bazaar.item.create_buy_order_best_ask", l, Component.text(FORMATTER.format(stats.bestAsk())))); } lore.add(" "); lore.add(I18n.string("gui_bazaar.item.create_buy_order_click", l)); @@ -268,7 +269,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; int have = player.getAmountInInventory(itemType); if (have <= 0) { - p.sendMessage(I18n.string("gui_bazaar.item.sell_order_no_items", p.getLocale(), Map.of("item_name", itemType.getDisplayName()))); + p.sendMessage(I18n.string("gui_bazaar.item.sell_order_no_items", p.getLocale(), Component.text(itemType.getDisplayName()))); return; } @@ -285,21 +286,21 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { var items = player.takeItem(itemType, amount); Locale l = p.getLocale(); if (items == null) { - p.sendMessage(I18n.string("gui_bazaar.item.sell_order_remove_fail", l)); + p.sendMessage(I18n.t("gui_bazaar.item.sell_order_remove_fail")); new GUIBazaarItem(itemType).open(p); return; } - p.sendMessage(I18n.string("gui_bazaar.item.sell_order_escrow", l, Map.of("amount", String.valueOf(amount), "item_name", itemType.getDisplayName()))); + p.sendMessage(I18n.string("gui_bazaar.item.sell_order_escrow", l, Component.text(String.valueOf(amount)), Component.text(itemType.getDisplayName()))); player.getBazaarConnector().createSellOrder(itemType, price, amount) .thenAccept(result -> { if (result.success()) { - p.sendMessage(I18n.string("gui_bazaar.item.sell_order_created", l, Map.of("amount", String.valueOf(amount), "price", FORMATTER.format(price)))); + p.sendMessage(I18n.string("gui_bazaar.item.sell_order_created", l, Component.text(String.valueOf(amount)), Component.text(FORMATTER.format(price)))); p.closeInventory(); } else { player.addAndUpdateItem(items); - p.sendMessage(I18n.string("gui_bazaar.item.sell_order_failed", l)); + p.sendMessage(I18n.t("gui_bazaar.item.sell_order_failed")); new GUIBazaarItem(itemType).open(p); } }); @@ -315,9 +316,9 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add(I18n.string("gui_bazaar.item.create_sell_order_subtitle", l)); lore.add(" "); int have = player.getAmountInInventory(itemType); - lore.add(I18n.string("gui_bazaar.item.create_sell_order_have", l, Map.of("amount", String.valueOf(have)))); + lore.add(I18n.string("gui_bazaar.item.create_sell_order_have", l, Component.text(String.valueOf(have)))); if (stats.bestBid() > 0) { - lore.add(I18n.string("gui_bazaar.item.create_sell_order_best_bid", l, Map.of("price", FORMATTER.format(stats.bestBid())))); + lore.add(I18n.string("gui_bazaar.item.create_sell_order_best_bid", l, Component.text(FORMATTER.format(stats.bestBid())))); } lore.add(" "); lore.add(I18n.string("gui_bazaar.item.create_sell_order_click", l)); @@ -355,4 +356,4 @@ public boolean allowHotkeying() { public void onBottomClick(InventoryPreClickEvent e) { e.setCancelled(true); } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarItemSet.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarItemSet.java index 9fa4b0a6c..866f09b8a 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarItemSet.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarItemSet.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.bazaar; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.Inventory; @@ -48,7 +49,7 @@ public class GUIBazaarItemSet extends HypixelInventoryGUI implements RefreshingG private final BazaarItemSet itemSet; public GUIBazaarItemSet(BazaarCategories category, BazaarItemSet itemSet) { - super(I18n.string("gui_bazaar.item_set.title", Map.of("category", StringUtility.toNormalCase(category.name()), "set_name", itemSet.displayName)), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_bazaar.item_set.title", Component.text(StringUtility.toNormalCase(category.name())), Component.text(itemSet.displayName)), InventoryType.CHEST_4_ROW); this.itemSet = itemSet; @@ -65,7 +66,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_bazaar.item_set.manage_orders_button", Material.BOOK, 1, + return TranslatableItemStackCreator.getStack("gui_bazaar.item_set.manage_orders_button", Material.BOOK, 1, "gui_bazaar.item_set.manage_orders_button.lore"); } }); @@ -93,12 +94,12 @@ public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); List lore = new ArrayList<>(); - lore.add(I18n.string("gui_bazaar.item_set.commodity_label", l, Map.of("rarity", StringUtility.toNormalCase(itemType.rarity.name())))); + lore.add(I18n.string("gui_bazaar.item_set.commodity_label", l, Component.text(StringUtility.toNormalCase(itemType.rarity.name())))); lore.add(" "); if (stats.bestAsk() > 0) { - lore.add(I18n.string("gui_bazaar.item_set.buy_price", l, Map.of("price", new DecimalFormat("#,###").format(stats.bestAsk())))); - lore.add(I18n.string("gui_bazaar.item_set.buy_price_best", l, Map.of("price", StringUtility.shortenNumber(stats.bestAsk())))); + lore.add(I18n.string("gui_bazaar.item_set.buy_price", l, Component.text(new DecimalFormat("#,###").format(stats.bestAsk())))); + lore.add(I18n.string("gui_bazaar.item_set.buy_price_best", l, Component.text(StringUtility.shortenNumber(stats.bestAsk())))); } else { lore.add(I18n.string("gui_bazaar.item_set.buy_price_none", l)); lore.add(I18n.string("gui_bazaar.item_set.buy_price_none_desc", l)); @@ -107,8 +108,8 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add(" "); if (stats.bestBid() > 0) { - lore.add(I18n.string("gui_bazaar.item_set.sell_price", l, Map.of("price", new DecimalFormat("#,###").format(stats.bestBid())))); - lore.add(I18n.string("gui_bazaar.item_set.sell_price_best", l, Map.of("price", StringUtility.shortenNumber(stats.bestBid())))); + lore.add(I18n.string("gui_bazaar.item_set.sell_price", l, Component.text(new DecimalFormat("#,###").format(stats.bestBid())))); + lore.add(I18n.string("gui_bazaar.item_set.sell_price_best", l, Component.text(StringUtility.shortenNumber(stats.bestBid())))); } else { lore.add(I18n.string("gui_bazaar.item_set.sell_price_none", l)); lore.add(I18n.string("gui_bazaar.item_set.sell_price_none_desc", l)); @@ -137,7 +138,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); List lore = new ArrayList<>(); - lore.add(I18n.string("gui_bazaar.item_set.commodity_label", l, Map.of("rarity", StringUtility.toNormalCase(itemType.rarity.name())))); + lore.add(I18n.string("gui_bazaar.item_set.commodity_label", l, Component.text(StringUtility.toNormalCase(itemType.rarity.name())))); lore.add(" "); lore.add(I18n.string("gui_bazaar.item_set.error_loading", l)); lore.add(I18n.string("gui_bazaar.item_set.error_try_again", l)); @@ -207,7 +208,7 @@ public void refreshItems(HypixelPlayer p) { } player.getBazaarConnector().isOnline().thenAccept(online -> { if (!online) { - player.sendMessage(I18n.string("gui_bazaar.item_set.offline_message", player.getLocale())); + player.sendMessage(I18n.t("gui_bazaar.item_set.offline_message")); player.closeInventory(); } }); @@ -238,4 +239,3 @@ private ItemStack.Builder getFromSkyBlockItem(SkyBlockItem item) { else return builder; } } - diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrderCompletedOptions.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrderCompletedOptions.java index 7b98fd05d..b078293e0 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrderCompletedOptions.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrderCompletedOptions.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.bazaar; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; @@ -24,7 +25,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIBazaarOrderCompletedOptions extends HypixelInventoryGUI { private final List completions; @@ -38,7 +38,7 @@ public class GUIBazaarOrderCompletedOptions extends HypixelInventoryGUI { public GUIBazaarOrderCompletedOptions(List completions, BazaarConnector.BazaarOrder activeOrder) { - super(I18n.string("gui_bazaar.order_completed.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_bazaar.order_completed.title"), InventoryType.CHEST_4_ROW); this.completions = completions; this.activeOrder = activeOrder; this.summary = calculateSummary(completions); @@ -106,30 +106,29 @@ private void setupItems() { set(new GUIItem(13) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); List lore = new ArrayList<>(); lore.add(I18n.string("gui_bazaar.order_completed.order_completed_label", l)); lore.add(" "); - lore.add(I18n.string("gui_bazaar.order_completed.completed_count", l, Map.of("amount", String.valueOf((int) summary.totalQuantity), "item_name", finalItemType.getDisplayName()))); - lore.add(I18n.string("gui_bazaar.order_completed.transactions_count", l, Map.of("count", String.valueOf(summary.transactionCount)))); + lore.add(I18n.string("gui_bazaar.order_completed.completed_count", l, Component.text(String.valueOf((int) summary.totalQuantity)), Component.text(finalItemType.getDisplayName()))); + lore.add(I18n.string("gui_bazaar.order_completed.transactions_count", l, Component.text(String.valueOf(summary.transactionCount)))); lore.add(" "); if (isSell) { - lore.add(I18n.string("gui_bazaar.order_completed.gross_earnings", l, Map.of("amount", FORMATTER.format(summary.totalSpent)))); - lore.add(I18n.string("gui_bazaar.order_completed.tax_paid", l, Map.of("amount", FORMATTER.format(summary.totalSecondaryAmount)))); - lore.add(I18n.string("gui_bazaar.order_completed.net_earnings", l, Map.of("amount", FORMATTER.format(Math.abs(summary.totalValue))))); + lore.add(I18n.string("gui_bazaar.order_completed.gross_earnings", l, Component.text(FORMATTER.format(summary.totalSpent)))); + lore.add(I18n.string("gui_bazaar.order_completed.tax_paid", l, Component.text(FORMATTER.format(summary.totalSecondaryAmount)))); + lore.add(I18n.string("gui_bazaar.order_completed.net_earnings", l, Component.text(FORMATTER.format(Math.abs(summary.totalValue))))); } else { - lore.add(I18n.string("gui_bazaar.order_completed.total_spent", l, Map.of("amount", FORMATTER.format(summary.totalSpent)))); + lore.add(I18n.string("gui_bazaar.order_completed.total_spent", l, Component.text(FORMATTER.format(summary.totalSpent)))); if (summary.totalSecondaryAmount > 0) { - lore.add(I18n.string("gui_bazaar.order_completed.total_saved", l, Map.of("amount", FORMATTER.format(summary.totalSecondaryAmount)))); - lore.add(I18n.string("gui_bazaar.order_completed.refund_ready", l, Map.of("amount", FORMATTER.format(summary.totalSecondaryAmount)))); + lore.add(I18n.string("gui_bazaar.order_completed.total_saved", l, Component.text(FORMATTER.format(summary.totalSecondaryAmount)))); + lore.add(I18n.string("gui_bazaar.order_completed.refund_ready", l, Component.text(FORMATTER.format(summary.totalSecondaryAmount)))); } } return ItemStackCreator.getStack( - I18n.string("gui_bazaar.order_completed.order_name", l, Map.of("item_name", finalItemType.getDisplayName())), + I18n.string("gui_bazaar.order_completed.order_name", l, Component.text(finalItemType.getDisplayName())), finalItemType.material, Math.max(1, (int) summary.totalQuantity), lore @@ -155,7 +154,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { int count = 0; for (var tx : completions) { if (count >= 10) { - lore.add(I18n.string("gui_bazaar.order_completed.transaction_more", l, Map.of("count", String.valueOf(completions.size() - 10)))); + lore.add(I18n.string("gui_bazaar.order_completed.transaction_more", l, Component.text(String.valueOf(completions.size() - 10)))); break; } @@ -165,14 +164,14 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add("§a▲ " + (int) tx.getQuantity() + "x at §6" + FORMATTER.format(tx.getPricePerUnit()) + " §8(" + timeStr + ")"); if (tx.getSecondaryAmount() > 0) { - lore.add(" " + I18n.string("gui_bazaar.order_completed.transaction_saved", l, Map.of("amount", FORMATTER.format(tx.getSecondaryAmount())))); + lore.add(" " + I18n.string("gui_bazaar.order_completed.transaction_saved", l, Component.text(FORMATTER.format(tx.getSecondaryAmount())))); } } else if (tx.getType() == DatapointCompletedBazaarTransactions.TransactionType.SELL_COMPLETED) { lore.add("§6▼ " + (int) tx.getQuantity() + "x at §6" + FORMATTER.format(tx.getPricePerUnit()) + " §8(" + timeStr + ")"); - lore.add(" " + I18n.string("gui_bazaar.order_completed.transaction_tax", l, Map.of("amount", FORMATTER.format(tx.getSecondaryAmount())))); + lore.add(" " + I18n.string("gui_bazaar.order_completed.transaction_tax", l, Component.text(FORMATTER.format(tx.getSecondaryAmount())))); } else if (tx.getType() == DatapointCompletedBazaarTransactions.TransactionType.REFUND) { - lore.add(I18n.string("gui_bazaar.order_completed.refund_label", l, Map.of("amount", FORMATTER.format(tx.getSecondaryAmount()))) + " §8(" + timeStr + ")"); + lore.add(I18n.string("gui_bazaar.order_completed.refund_label", l, Component.text(FORMATTER.format(tx.getSecondaryAmount()))) + " §8(" + timeStr + ")"); } count++; } @@ -192,9 +191,8 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - List lore = new ArrayList<>(I18n.lore("gui_bazaar.order_completed.claim_rewards_header", l)); + List lore = new ArrayList<>(List.of(I18n.iterable("gui_bazaar.order_completed.claim_rewards_header"))); lore.add(" "); boolean isSell = isSellOrder(); @@ -221,15 +219,15 @@ private void setupToggleButton() { set(new GUIClickableItem(22) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; new GUIBazaarOrderOptions(activeOrder).open(p); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_bazaar.order_completed.view_unfilled", Material.COMPASS, 1, - "gui_bazaar.order_completed.view_unfilled.lore", Map.of("amount", String.valueOf((int) activeOrder.amount()), "price", FORMATTER.format(activeOrder.price()))); + return TranslatableItemStackCreator.getStack("gui_bazaar.order_completed.view_unfilled", Material.COMPASS, 1, + "gui_bazaar.order_completed.view_unfilled.lore", + Component.text(String.valueOf((int) activeOrder.amount())), + Component.text(FORMATTER.format(activeOrder.price()))); } }); } @@ -237,7 +235,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { private void claimRewards(SkyBlockPlayer player) { Locale l = player.getLocale(); if (completions == null || completions.isEmpty()) { - player.sendMessage(I18n.string("gui_bazaar.order_completed.no_rewards", l)); + player.sendMessage(I18n.t("gui_bazaar.order_completed.no_rewards")); return; } @@ -247,16 +245,16 @@ private void claimRewards(SkyBlockPlayer player) { try { if (isSell) { player.addCoins(Math.abs(summary.totalValue)); - player.sendMessage(I18n.string("gui_bazaar.order_completed.received_coins", l, Map.of("amount", FORMATTER.format(Math.abs(summary.totalValue))))); + player.sendMessage(I18n.string("gui_bazaar.order_completed.received_coins", l, Component.text(FORMATTER.format(Math.abs(summary.totalValue))))); } else { SkyBlockItem item = new SkyBlockItem(itemType); item.setAmount((int) summary.totalQuantity); player.addAndUpdateItem(item); - player.sendMessage(I18n.string("gui_bazaar.order_completed.received_items", l, Map.of("amount", String.valueOf((int) summary.totalQuantity), "item_name", itemType.getDisplayName()))); + player.sendMessage(I18n.string("gui_bazaar.order_completed.received_items", l, Component.text(String.valueOf((int) summary.totalQuantity)), Component.text(itemType.getDisplayName()))); if (summary.totalSecondaryAmount > 0) { player.addCoins(summary.totalSecondaryAmount); - player.sendMessage(I18n.string("gui_bazaar.order_completed.received_refund", l, Map.of("amount", FORMATTER.format(summary.totalSecondaryAmount)))); + player.sendMessage(I18n.string("gui_bazaar.order_completed.received_refund", l, Component.text(FORMATTER.format(summary.totalSecondaryAmount)))); } } @@ -271,13 +269,13 @@ private void claimRewards(SkyBlockPlayer player) { completedTransactions.claimTransactions(transactionIds); - player.sendMessage(I18n.string("gui_bazaar.order_completed.all_claimed", l)); + player.sendMessage(I18n.t("gui_bazaar.order_completed.all_claimed")); player.playSuccessSound(); new GUIBazaarOrders().open(player); } catch (Exception e) { - player.sendMessage(I18n.string("gui_bazaar.order_completed.claim_failed", l, Map.of("error", e.getMessage()))); + player.sendMessage(I18n.string("gui_bazaar.order_completed.claim_failed", l, Component.text(e.getMessage()))); System.err.println("Failed to claim bazaar rewards: " + e.getMessage()); } } @@ -307,4 +305,4 @@ public boolean allowHotkeying() { public void onBottomClick(InventoryPreClickEvent e) { e.setCancelled(true); } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrderOptions.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrderOptions.java index 0b29cb9db..9d0007811 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrderOptions.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrderOptions.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.bazaar; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; @@ -7,7 +8,6 @@ import net.swofty.commons.skyblock.item.ItemType; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.inventory.item.GUIClickableItem; import net.swofty.type.generic.gui.inventory.item.GUIItem; import net.swofty.type.generic.i18n.I18n; @@ -24,7 +24,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIBazaarOrderOptions extends HypixelInventoryGUI { private final BazaarConnector.BazaarOrder order; @@ -33,7 +32,7 @@ public class GUIBazaarOrderOptions extends HypixelInventoryGUI { .withZone(ZoneId.systemDefault()); public GUIBazaarOrderOptions(BazaarConnector.BazaarOrder order) { - super(I18n.string("gui_bazaar.order_options.title", Map.of("item_name", order.getItemType().getDisplayName())), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_bazaar.order_options.title", Component.text(order.getItemType().getDisplayName())), InventoryType.CHEST_4_ROW); this.order = order; fill(ItemStackCreator.createNamedItemStack(Material.BLACK_STAINED_GLASS_PANE)); @@ -62,21 +61,21 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add(isSell ? I18n.string("gui_bazaar.order_options.order_type_sell", l) : I18n.string("gui_bazaar.order_options.order_type_buy", l)); lore.add(" "); - lore.add(I18n.string("gui_bazaar.order_options.original_amount", l, Map.of("amount", String.valueOf((int) originalQuantity)))); - lore.add(I18n.string("gui_bazaar.order_options.remaining_amount", l, Map.of("amount", String.valueOf((int) order.amount())))); - lore.add(I18n.string("gui_bazaar.order_options.price_per_unit", l, Map.of("price", FORMATTER.format(order.price())))); + lore.add(I18n.string("gui_bazaar.order_options.original_amount", l, Component.text(String.valueOf((int) originalQuantity)))); + lore.add(I18n.string("gui_bazaar.order_options.remaining_amount", l, Component.text(String.valueOf((int) order.amount())))); + lore.add(I18n.string("gui_bazaar.order_options.price_per_unit", l, Component.text(FORMATTER.format(order.price())))); lore.add(" "); if (filledQuantity > 0) { - lore.add(I18n.string("gui_bazaar.order_options.filled_items", l, Map.of("count", String.valueOf((int) filledQuantity)))); - lore.add(I18n.string("gui_bazaar.order_options.filled_progress", l, Map.of("percent", String.format("%.1f%%", (filledQuantity / originalQuantity) * 100)))); + lore.add(I18n.string("gui_bazaar.order_options.filled_items", l, Component.text(String.valueOf((int) filledQuantity)))); + lore.add(I18n.string("gui_bazaar.order_options.filled_progress", l, Component.text(String.format("%.1f%%", (filledQuantity / originalQuantity) * 100)))); } else { lore.add(I18n.string("gui_bazaar.order_options.no_fills", l)); lore.add(I18n.string("gui_bazaar.order_options.no_fills_progress", l)); } lore.add(" "); - lore.add(I18n.string("gui_bazaar.order_options.order_id", l, Map.of("id", order.orderId().toString().substring(0, 8)))); + lore.add(I18n.string("gui_bazaar.order_options.order_id", l, Component.text(order.orderId().toString().substring(0, 8)))); return ItemStackCreator.getStack( (isSell ? "§6" : "§a") + itemType.getDisplayName() + " Order", @@ -108,13 +107,13 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add(I18n.string("gui_bazaar.order_options.no_transactions", l)); lore.add(I18n.string("gui_bazaar.order_options.no_transactions_pending", l)); } else { - lore.add(I18n.string("gui_bazaar.order_options.transaction_count", l, Map.of("count", String.valueOf(transactions.size()), "suffix", transactions.size() == 1 ? "" : "s"))); + lore.add(I18n.string("gui_bazaar.order_options.transaction_count", l, Component.text(String.valueOf(transactions.size())), Component.text(transactions.size() == 1 ? "" : "s"))); lore.add(" "); int count = 0; for (var tx : transactions) { if (count >= 5) { - lore.add(I18n.string("gui_bazaar.order_options.transaction_more", l, Map.of("count", String.valueOf(transactions.size() - 5)))); + lore.add(I18n.string("gui_bazaar.order_options.transaction_more", l, Component.text(String.valueOf(transactions.size() - 5)))); break; } @@ -123,12 +122,12 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add("§a▲ " + (int) tx.getQuantity() + "x at §6" + FORMATTER.format(tx.getPricePerUnit()) + " §8(" + timeStr + ")"); if (tx.getSecondaryAmount() > 0) { - lore.add(" " + I18n.string("gui_bazaar.order_options.transaction_saved", l, Map.of("amount", FORMATTER.format(tx.getSecondaryAmount())))); + lore.add(" " + I18n.string("gui_bazaar.order_options.transaction_saved", l, Component.text(FORMATTER.format(tx.getSecondaryAmount())))); } } else if (tx.getType() == DatapointCompletedBazaarTransactions.TransactionType.SELL_COMPLETED) { lore.add("§6▼ " + (int) tx.getQuantity() + "x at §6" + FORMATTER.format(tx.getPricePerUnit()) + " §8(" + timeStr + ")"); - lore.add(" " + I18n.string("gui_bazaar.order_options.transaction_tax", l, Map.of("amount", FORMATTER.format(tx.getSecondaryAmount())))); + lore.add(" " + I18n.string("gui_bazaar.order_options.transaction_tax", l, Component.text(FORMATTER.format(tx.getSecondaryAmount())))); } count++; } @@ -193,7 +192,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add(" "); lore.add(I18n.string("gui_bazaar.order_options.avg_buy_price", l)); lore.add(" §6" + FORMATTER.format(totalSpent / getFilledQuantity(transactions)) + " coins/item"); - lore.add(I18n.string("gui_bazaar.order_options.vs_your_bid", l, Map.of("price", FORMATTER.format(order.price())))); + lore.add(I18n.string("gui_bazaar.order_options.vs_your_bid", l, Component.text(FORMATTER.format(order.price())))); } } @@ -211,36 +210,35 @@ private void setupActionButtons() { public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - p.sendMessage(I18n.string("gui_bazaar.order_options.cancel_message", l)); + p.sendMessage(I18n.t("gui_bazaar.order_options.cancel_message")); player.getBazaarConnector().cancelOrder(order.orderId()) .thenAccept(success -> { if (success) { - p.sendMessage(I18n.string("gui_bazaar.order_options.cancel_success", l)); + p.sendMessage(I18n.t("gui_bazaar.order_options.cancel_success")); if (isSell) { SkyBlockItem item = new SkyBlockItem(order.getItemType()); item.setAmount((int) order.amount()); player.addAndUpdateItem(item); - p.sendMessage(I18n.string("gui_bazaar.order_options.cancel_return_items", l, Map.of("amount", String.valueOf((int) order.amount()), "item_name", itemType.getDisplayName()))); + p.sendMessage(I18n.string("gui_bazaar.order_options.cancel_return_items", l, Component.text(String.valueOf((int) order.amount())), Component.text(itemType.getDisplayName()))); } else { double refund = order.price() * order.amount(); player.addCoins(refund); - p.sendMessage(I18n.string("gui_bazaar.order_options.cancel_refund_coins", l, Map.of("amount", FORMATTER.format(refund)))); + p.sendMessage(I18n.string("gui_bazaar.order_options.cancel_refund_coins", l, Component.text(FORMATTER.format(refund)))); } new GUIBazaarOrders().open(p); } else { - p.sendMessage(I18n.string("gui_bazaar.order_options.cancel_failed", l)); + p.sendMessage(I18n.t("gui_bazaar.order_options.cancel_failed")); } }); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - List lore = new ArrayList<>(I18n.lore("gui_bazaar.order_options.cancel_order.lore_header", l)); + List lore = new ArrayList<>(List.of(I18n.iterable("gui_bazaar.order_options.cancel_order.lore_header"))); lore.add(" "); if (isSell) { @@ -251,7 +249,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { lore.add(" "); lore.add(I18n.string("gui_bazaar.order_options.cancel_undone", l)); - lore.addAll(I18n.lore("gui_bazaar.order_options.cancel_completed_remain", l)); + lore.addAll(List.of(I18n.iterable("gui_bazaar.order_options.cancel_completed_remain"))); lore.add(" "); lore.add(I18n.string("gui_bazaar.order_options.cancel_click", l)); @@ -262,16 +260,14 @@ public ItemStack.Builder getItem(HypixelPlayer p) { set(new GUIClickableItem(24) { @Override public void run(InventoryPreClickEvent e, HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; new GUIBazaarItem(itemType).open(p); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); return ItemStackCreator.getStack(I18n.string("gui_bazaar.order_options.view_market", l), Material.EMERALD, 1, - I18n.lore("gui_bazaar.order_options.view_market.lore", l, Map.of("item_name", itemType.getDisplayName()))); + I18n.iterable("gui_bazaar.order_options.view_market.lore", Component.text(itemType.getDisplayName()))); } }); } @@ -293,7 +289,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { if (!unclaimedForThisOrder.isEmpty()) { new GUIBazaarOrderCompletedOptions(unclaimedForThisOrder, order).open(p); } else { - p.sendMessage(I18n.string("gui_bazaar.order_options.no_completed_message", p.getLocale())); + p.sendMessage(I18n.t("gui_bazaar.order_options.no_completed_message")); } } @@ -312,18 +308,14 @@ public ItemStack.Builder getItem(HypixelPlayer p) { if (unclaimedForThisOrder.isEmpty()) { return ItemStackCreator.getStack(I18n.string("gui_bazaar.order_options.no_completed", l), Material.GRAY_DYE, 1, - I18n.lore("gui_bazaar.order_options.no_completed.lore", l)); + I18n.iterable("gui_bazaar.order_options.no_completed.lore")); } else { double totalValue = unclaimedForThisOrder.stream() .mapToDouble(DatapointCompletedBazaarTransactions.CompletedBazaarTransaction::getTotalValue) .sum(); return ItemStackCreator.getStack(I18n.string("gui_bazaar.order_options.view_completed", l), Material.CHEST, 1, - I18n.lore("gui_bazaar.order_options.view_completed.lore", l, Map.of( - "count", String.valueOf(unclaimedForThisOrder.size()), - "suffix", unclaimedForThisOrder.size() == 1 ? "" : "s", - "amount", FORMATTER.format(Math.abs(totalValue)) - ))); + I18n.iterable("gui_bazaar.order_options.view_completed.lore", Component.text(String.valueOf(unclaimedForThisOrder.size())), Component.text(unclaimedForThisOrder.size() == 1 ? "" : "s"), Component.text(FORMATTER.format(Math.abs(totalValue))))); } } }); @@ -365,4 +357,4 @@ public boolean allowHotkeying() { public void onBottomClick(InventoryPreClickEvent e) { e.setCancelled(true); } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrders.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrders.java index 6599b2800..f684bccd1 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrders.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/GUIBazaarOrders.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.bazaar; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; @@ -30,26 +31,24 @@ public class GUIBazaarOrders extends HypixelInventoryGUI { private static final DecimalFormat FORMATTER = new DecimalFormat("#,###.##"); public GUIBazaarOrders() { - super(I18n.string("gui_bazaar.orders.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_bazaar.orders.title"), InventoryType.CHEST_4_ROW); fill(ItemStackCreator.createNamedItemStack(Material.GRAY_STAINED_GLASS_PANE)); set(new GUIItem(4) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); return ItemStackCreator.getStack(I18n.string("gui_bazaar.orders.sell_orders_header", l), Material.GOLD_INGOT, 1, - I18n.lore("gui_bazaar.orders.sell_orders_header.lore", l)); + I18n.iterable("gui_bazaar.orders.sell_orders_header.lore")); } }); set(new GUIItem(31) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); return ItemStackCreator.getStack(I18n.string("gui_bazaar.orders.buy_orders_header", l), Material.EMERALD, 1, - I18n.lore("gui_bazaar.orders.buy_orders_header.lore", l)); + I18n.iterable("gui_bazaar.orders.buy_orders_header.lore")); } }); } @@ -123,7 +122,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); return ItemStackCreator.getStack(I18n.string("gui_bazaar.orders.no_sell_orders", l), Material.BARRIER, 1, - I18n.lore("gui_bazaar.orders.no_sell_orders.lore", l)); + I18n.iterable("gui_bazaar.orders.no_sell_orders.lore")); } }); } @@ -135,7 +134,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); return ItemStackCreator.getStack(I18n.string("gui_bazaar.orders.no_buy_orders", l), Material.BARRIER, 1, - I18n.lore("gui_bazaar.orders.no_buy_orders.lore", l)); + I18n.iterable("gui_bazaar.orders.no_buy_orders.lore")); } }); } @@ -255,17 +254,17 @@ private ItemStack.Builder createCompletedOrderDisplay(Locale l) { lore.add(I18n.string("gui_bazaar.orders.completed_label", l)); lore.add(I18n.string("gui_bazaar.orders.completed_ready", l)); lore.add(" "); - lore.add(I18n.string("gui_bazaar.orders.completed_amount", l, Map.of("amount", String.valueOf((int)totalQuantity)))); - lore.add(I18n.string("gui_bazaar.orders.completed_value", l, Map.of("amount", FORMATTER.format(Math.abs(totalValue))))); + lore.add(I18n.string("gui_bazaar.orders.completed_amount", l, Component.text(String.valueOf((int) totalQuantity)))); + lore.add(I18n.string("gui_bazaar.orders.completed_value", l, Component.text(FORMATTER.format(Math.abs(totalValue))))); lore.add(" "); lore.add(I18n.string("gui_bazaar.orders.completed_receive", l)); if (isSell) { - lore.add(" " + I18n.string("gui_bazaar.orders.completed_receive_coins", l, Map.of("amount", FORMATTER.format(Math.abs(totalValue))))); + lore.add(" " + I18n.string("gui_bazaar.orders.completed_receive_coins", l, Component.text(FORMATTER.format(Math.abs(totalValue))))); } else { - lore.add(" " + I18n.string("gui_bazaar.orders.completed_receive_items", l, Map.of("amount", String.valueOf((int)totalQuantity), "item_name", itemType.getDisplayName()))); + lore.add(" " + I18n.string("gui_bazaar.orders.completed_receive_items", l, Component.text(String.valueOf((int) totalQuantity)), Component.text(itemType.getDisplayName()))); if (totalValue > 0) { - lore.add(" " + I18n.string("gui_bazaar.orders.completed_receive_refund", l, Map.of("amount", FORMATTER.format(totalRefund)))); + lore.add(" " + I18n.string("gui_bazaar.orders.completed_receive_refund", l, Component.text(FORMATTER.format(totalRefund)))); } } @@ -285,11 +284,11 @@ private ItemStack.Builder createActiveOrderDisplay(Locale l) { boolean isSell = activeOrder.side() == BazaarConnector.OrderSide.SELL; ItemType itemType = activeOrder.getItemType(); - lore.add(I18n.string("gui_bazaar.orders.active_worth", l, Map.of("amount", FORMATTER.format(activeOrder.getTotalValue())))); + lore.add(I18n.string("gui_bazaar.orders.active_worth", l, Component.text(FORMATTER.format(activeOrder.getTotalValue())))); lore.add(" "); - lore.add(I18n.string("gui_bazaar.orders.active_order_amount", l, Map.of("amount", String.valueOf((int)activeOrder.amount())))); + lore.add(I18n.string("gui_bazaar.orders.active_order_amount", l, Component.text(String.valueOf((int) activeOrder.amount())))); lore.add(" "); - lore.add(I18n.string("gui_bazaar.orders.active_price_per_unit", l, Map.of("price", FORMATTER.format(activeOrder.price())))); + lore.add(I18n.string("gui_bazaar.orders.active_price_per_unit", l, Component.text(FORMATTER.format(activeOrder.price())))); lore.add(" "); lore.add(I18n.string("gui_bazaar.orders.active_click", l)); @@ -311,4 +310,4 @@ public boolean allowHotkeying() { public void onBottomClick(InventoryPreClickEvent e) { e.setCancelled(true); } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/selections/GUIBazaarOrderAmountSelection.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/selections/GUIBazaarOrderAmountSelection.java index 03d21fc30..32e656037 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/selections/GUIBazaarOrderAmountSelection.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/selections/GUIBazaarOrderAmountSelection.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.bazaar.selections; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; @@ -18,7 +19,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.concurrent.CompletableFuture; public class GUIBazaarOrderAmountSelection extends HypixelInventoryGUI { @@ -40,8 +40,8 @@ public GUIBazaarOrderAmountSelection( double unitPrice ) { super(isInstant - ? (isBuy ? I18n.string("gui_bazaar.amount_selection.title_instant_buy") : I18n.string("gui_bazaar.amount_selection.title_instant_sell")) - : (isBuy ? I18n.string("gui_bazaar.amount_selection.title_buy") : I18n.string("gui_bazaar.amount_selection.title_sell")), + ? (isBuy ? I18n.t("gui_bazaar.amount_selection.title_instant_buy") : I18n.t("gui_bazaar.amount_selection.title_instant_sell")) + : (isBuy ? I18n.t("gui_bazaar.amount_selection.title_buy") : I18n.t("gui_bazaar.amount_selection.title_sell")), InventoryType.CHEST_4_ROW); this.isBuy = isBuy; @@ -74,7 +74,7 @@ private void buildInstantUI(SkyBlockPlayer p) { addButton(11, Math.min(64, maxAmount), "Stack", "Buy a stack!", Math.min(64, maxAmount), p); addButton(13, maxAmount, "All", "Fill my inventory!", maxAmount, p); - addCustom(15, p); + addCustom(15); } private void buildLimitUI(SkyBlockPlayer p) { @@ -86,7 +86,7 @@ private void buildLimitUI(SkyBlockPlayer p) { addLimitButton(9, small, "Buy a stack!", "Amount: " + small + "×", p); addLimitButton(11, medium, "Buy a big stack!","Amount: " + medium + "×", p); addLimitButton(13, large, "Buy a thousand!", "Amount: " + large + "×", p); - addCustom(15, p); + addCustom(15); } private void addButton(int slot, int qty, String title, String subtitle, int amount, SkyBlockPlayer p) { @@ -104,10 +104,10 @@ public ItemStack.Builder getItem(HypixelPlayer p) { Locale l = p.getLocale(); List lore = new ArrayList<>(); lore.add("§7" + subtitle); - lore.add(I18n.string("gui_bazaar.amount_selection.per_unit", l, Map.of("price", F.format(unitPrice)))); + lore.add(I18n.string("gui_bazaar.amount_selection.per_unit", l, Component.text(F.format(unitPrice)))); lore.add(isBuy - ? I18n.string("gui_bazaar.amount_selection.total_cost", l, Map.of("amount", F.format(unitPrice * qty))) - : I18n.string("gui_bazaar.amount_selection.total_rev", l, Map.of("amount", F.format(unitPrice * qty)))); + ? I18n.string("gui_bazaar.amount_selection.total_cost", l, Component.text(F.format(unitPrice * qty))) + : I18n.string("gui_bazaar.amount_selection.total_rev", l, Component.text(F.format(unitPrice * qty)))); lore.add(" "); lore.add(isBuy ? I18n.string("gui_bazaar.amount_selection.click_buy", l) @@ -131,12 +131,11 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); List lore = new ArrayList<>(); lore.add(I18n.string("gui_bazaar.amount_selection.limit_subtitle", l)); lore.add("§7" + amountLine); - lore.add(I18n.string("gui_bazaar.amount_selection.per_unit", l, Map.of("price", F.format(unitPrice)))); + lore.add(I18n.string("gui_bazaar.amount_selection.per_unit", l, Component.text(F.format(unitPrice)))); lore.add(" "); lore.add(I18n.string("gui_bazaar.amount_selection.limit_click", l)); return ItemStackCreator.getStack( @@ -148,7 +147,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { }); } - private void addCustom(int slot, SkyBlockPlayer p) { + private void addCustom(int slot) { set(new GUIQueryItem(slot) { @Override public HypixelInventoryGUI onQueryFinish(String q, HypixelPlayer pl) { @@ -156,25 +155,24 @@ public HypixelInventoryGUI onQueryFinish(String q, HypixelPlayer pl) { try { int v = Integer.parseInt(q); if (v < 1 || v > maxAmount) { - pl.sendMessage(I18n.string("gui_bazaar.amount_selection.invalid_range", l, Map.of("max", String.valueOf(maxAmount)))); + pl.sendMessage(I18n.t("gui_bazaar.amount_selection.invalid_range", Component.text(maxAmount))); return null; } future.complete(v); } catch (NumberFormatException ex) { - pl.sendMessage(I18n.string("gui_bazaar.amount_selection.invalid_number", l)); + pl.sendMessage(I18n.t("gui_bazaar.amount_selection.invalid_number")); } return null; } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); List lore = new ArrayList<>(); lore.add(isInstant ? I18n.string("gui_bazaar.amount_selection.custom_instant", l) : I18n.string("gui_bazaar.amount_selection.custom_limit", l)); - lore.add(I18n.string("gui_bazaar.amount_selection.custom_max", l, Map.of("max", String.valueOf(maxAmount)))); + lore.add(I18n.string("gui_bazaar.amount_selection.custom_max", l, Component.text(maxAmount))); lore.add(" "); lore.add(I18n.string("gui_bazaar.amount_selection.custom_click", l)); return ItemStackCreator.getStack( diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/selections/GUIBazaarPriceSelection.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/selections/GUIBazaarPriceSelection.java index 8dbb73ddd..30de8ff82 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/selections/GUIBazaarPriceSelection.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/bazaar/selections/GUIBazaarPriceSelection.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.bazaar.selections; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.Inventory; @@ -18,9 +19,9 @@ import net.swofty.type.generic.user.HypixelPlayer; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; +import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.concurrent.CompletableFuture; public class GUIBazaarPriceSelection extends HypixelInventoryGUI implements RefreshingGUI { @@ -35,7 +36,7 @@ public class GUIBazaarPriceSelection extends HypixelInventoryGUI implements Refr public GUIBazaarPriceSelection(HypixelInventoryGUI previousGUI, Integer amount, Double lowestPrice, Double highestPrice, ItemType itemTypeLinker, boolean isSellOrder) { - super(isSellOrder ? I18n.string("gui_bazaar.price_selection.title_sell") : I18n.string("gui_bazaar.price_selection.title_buy"), InventoryType.CHEST_4_ROW); + super(isSellOrder ? I18n.t("gui_bazaar.price_selection.title_sell") : I18n.t("gui_bazaar.price_selection.title_buy"), InventoryType.CHEST_4_ROW); this.lowestPrice = lowestPrice; this.highestPrice = highestPrice; @@ -69,14 +70,14 @@ public ItemStack.Builder getItem(HypixelPlayer p) { Material.GOLDEN_HORSE_ARMOR, 1, isSellOrder ? I18n.string("gui_bazaar.price_selection.offer_setup_sell", l) : I18n.string("gui_bazaar.price_selection.offer_setup_buy", l), " ", - I18n.string("gui_bazaar.price_selection.lowest_price", l, Map.of("price", String.valueOf(lowestPrice))), - I18n.string("gui_bazaar.price_selection.highest_price", l, Map.of("price", String.valueOf(highestPrice))), - I18n.string("gui_bazaar.price_selection.spread", l, Map.of("high", String.valueOf(highestPrice), "low", String.valueOf(lowestPrice), "spread", String.valueOf(spread))), + I18n.string("gui_bazaar.price_selection.lowest_price", l, Component.text(lowestPrice)), + I18n.string("gui_bazaar.price_selection.highest_price", l, Component.text(highestPrice)), + I18n.string("gui_bazaar.price_selection.spread", l, Component.text(highestPrice), Component.text(lowestPrice), Component.text(spread)), " ", - isSellOrder ? I18n.string("gui_bazaar.price_selection.selling_amount", l, Map.of("amount", String.valueOf(amount))) : I18n.string("gui_bazaar.price_selection.buying_amount", l, Map.of("amount", String.valueOf(amount))), - I18n.string("gui_bazaar.price_selection.unit_price", l, Map.of("price", String.valueOf(spreadPrice))), + isSellOrder ? I18n.string("gui_bazaar.price_selection.selling_amount", l, Component.text(amount)) : I18n.string("gui_bazaar.price_selection.buying_amount", l, Component.text(amount)), + I18n.string("gui_bazaar.price_selection.unit_price", l, Component.text(spreadPrice)), " ", - I18n.string("gui_bazaar.price_selection.total", l, Map.of("amount", String.valueOf(spreadPrice * amount))), + I18n.string("gui_bazaar.price_selection.total", l, Component.text(spreadPrice * amount)), " ", I18n.string("gui_bazaar.price_selection.click_to_use", l)); } @@ -93,20 +94,19 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - List lore = new java.util.ArrayList<>(); - lore.add(isSellOrder ? I18n.string("gui_bazaar.price_selection.offer_setup_sell", l) : I18n.string("gui_bazaar.price_selection.offer_setup_buy", l)); - lore.add(" "); - lore.addAll(I18n.lore("gui_bazaar.price_selection.best_offer_beat", l)); - lore.add(" "); - lore.add(isSellOrder ? I18n.string("gui_bazaar.price_selection.selling_amount", l, Map.of("amount", String.valueOf(amount))) : I18n.string("gui_bazaar.price_selection.buying_amount", l, Map.of("amount", String.valueOf(amount)))); - lore.add(I18n.string("gui_bazaar.price_selection.unit_price", l, Map.of("price", String.valueOf(incrementedOffer)))); - lore.add(" "); - lore.add(I18n.string("gui_bazaar.price_selection.total", l, Map.of("amount", String.valueOf(incrementedOffer * amount)))); - lore.add(" "); - lore.add(I18n.string("gui_bazaar.price_selection.click_to_use", l)); - return ItemStackCreator.getStack(isSellOrder ? I18n.string("gui_bazaar.price_selection.best_offer_minus", l) : I18n.string("gui_bazaar.price_selection.best_offer_plus", l), + List lore = new ArrayList<>(); + lore.add(isSellOrder ? I18n.t("gui_bazaar.price_selection.offer_setup_sell") : I18n.t("gui_bazaar.price_selection.offer_setup_buy")); + lore.add(Component.space()); + lore.addAll(List.of(I18n.iterable("gui_bazaar.price_selection.best_offer_beat"))); + lore.add(Component.space()); + lore.add(isSellOrder ? I18n.t("gui_bazaar.price_selection.selling_amount", Component.text(amount)) : I18n.t("gui_bazaar.price_selection.buying_amount", Component.text(amount))); + lore.add(I18n.t("gui_bazaar.price_selection.unit_price", Component.text(incrementedOffer))); + lore.add(Component.space()); + lore.add(I18n.t("gui_bazaar.price_selection.total", Component.text(incrementedOffer * amount))); + lore.add(Component.space()); + lore.add(I18n.t("gui_bazaar.price_selection.click_to_use")); + return ItemStackCreator.getStack(isSellOrder ? I18n.t("gui_bazaar.price_selection.best_offer_minus") : I18n.t("gui_bazaar.price_selection.best_offer_plus"), Material.GOLD_NUGGET, 1, lore); } }); @@ -121,17 +121,16 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - List lore = new java.util.ArrayList<>(); + List lore = new java.util.ArrayList<>(); lore.add(isSellOrder ? I18n.string("gui_bazaar.price_selection.offer_setup_sell", l) : I18n.string("gui_bazaar.price_selection.offer_setup_buy", l)); lore.add(" "); - lore.addAll(I18n.lore("gui_bazaar.price_selection.same_as_best.lore", l)); + lore.addAll(List.of(I18n.iterable("gui_bazaar.price_selection.same_as_best.lore"))); lore.add(" "); - lore.add(isSellOrder ? I18n.string("gui_bazaar.price_selection.selling_amount", l, Map.of("amount", String.valueOf(amount))) : I18n.string("gui_bazaar.price_selection.buying_amount", l, Map.of("amount", String.valueOf(amount)))); - lore.add(I18n.string("gui_bazaar.price_selection.unit_price", l, Map.of("price", String.valueOf(bestOffer)))); + lore.add(isSellOrder ? I18n.string("gui_bazaar.price_selection.selling_amount", l, Component.text(amount)) : I18n.string("gui_bazaar.price_selection.buying_amount", l, Component.text(amount))); + lore.add(I18n.string("gui_bazaar.price_selection.unit_price", l, Component.text(bestOffer))); lore.add(" "); - lore.add(I18n.string("gui_bazaar.price_selection.total", l, Map.of("amount", String.valueOf(bestOffer * amount)))); + lore.add(I18n.string("gui_bazaar.price_selection.total", l, Component.text(bestOffer * amount))); lore.add(" "); lore.add(I18n.string("gui_bazaar.price_selection.click_to_use", l)); return ItemStackCreator.getStack(I18n.string("gui_bazaar.price_selection.same_as_best", l), @@ -149,21 +148,20 @@ public HypixelInventoryGUI onQueryFinish(String query, HypixelPlayer player) { future.complete(price); return null; } catch (NumberFormatException e) { - player.sendMessage(I18n.string("gui_bazaar.price_selection.invalid_price", player.getLocale())); + player.sendMessage(I18n.t("gui_bazaar.price_selection.invalid_price")); return null; } } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - List lore = new java.util.ArrayList<>(); + List lore = new java.util.ArrayList<>(); lore.add(isSellOrder ? I18n.string("gui_bazaar.price_selection.offer_setup_sell", l) : I18n.string("gui_bazaar.price_selection.offer_setup_buy", l)); lore.add(" "); - lore.addAll(I18n.lore("gui_bazaar.price_selection.custom_price.lore", l)); + lore.addAll(List.of(I18n.iterable("gui_bazaar.price_selection.custom_price.lore"))); lore.add(" "); - lore.add(I18n.string("gui_bazaar.price_selection.ordering_amount", l, Map.of("amount", String.valueOf(amount)))); + lore.add(I18n.string("gui_bazaar.price_selection.ordering_amount", l, Component.text(amount))); lore.add(" "); lore.add(I18n.string("gui_bazaar.price_selection.custom_click", l)); return ItemStackCreator.getStack(I18n.string("gui_bazaar.price_selection.custom_price", l), @@ -201,7 +199,7 @@ public void onBottomClick(InventoryPreClickEvent e) { @Override public void refreshItems(HypixelPlayer player) { if (!new ProxyService(ServiceType.BAZAAR).isOnline().join()) { - player.sendMessage(I18n.string("gui_bazaar.price_selection.offline_message", player.getLocale())); + player.sendMessage(I18n.t("gui_bazaar.price_selection.offline_message")); player.closeInventory(); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIBuilder.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIBuilder.java index b5081d859..b34886f15 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIBuilder.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIBuilder.java @@ -5,18 +5,18 @@ import net.minestom.server.inventory.Inventory; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; -import net.swofty.type.generic.user.HypixelPlayer; import net.minestom.server.item.Material; +import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; import net.swofty.type.generic.gui.inventory.item.GUIClickableItem; import net.swofty.type.generic.i18n.I18n; +import net.swofty.type.generic.user.HypixelPlayer; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; public class GUIBuilder extends HypixelInventoryGUI { public GUIBuilder() { - super(I18n.string("gui_builder.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_builder.title"), InventoryType.CHEST_4_ROW); } @Override public void onOpen(InventoryGUIOpenEvent e) { @@ -30,7 +30,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_builder.woodworking_button", Material.OAK_PLANKS, 1, + return TranslatableItemStackCreator.getStack("gui_builder.woodworking_button", Material.OAK_PLANKS, 1, "gui_builder.woodworking_button.lore"); } }); @@ -43,7 +43,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_builder.rocks_bricks_button", Material.STONE, 1, + return TranslatableItemStackCreator.getStack("gui_builder.rocks_bricks_button", Material.STONE, 1, "gui_builder.rocks_bricks_button.lore"); } }); @@ -56,7 +56,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_builder.green_thumb_button", Material.ROSE_BUSH, 1, + return TranslatableItemStackCreator.getStack("gui_builder.green_thumb_button", Material.ROSE_BUSH, 1, "gui_builder.green_thumb_button.lore"); } }); @@ -69,7 +69,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStackHead(p, "gui_builder.variety_button", "3c2d8e8ec2737b599a48fc07ea58b806969e6021802019992dda32a653794df6", 1, + return TranslatableItemStackCreator.getStackHead("gui_builder.variety_button", "3c2d8e8ec2737b599a48fc07ea58b806969e6021802019992dda32a653794df6", 1, "gui_builder.variety_button.lore"); } }); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderGreenThumb.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderGreenThumb.java index e02b2ded0..4ec42c5e2 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderGreenThumb.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderGreenThumb.java @@ -8,7 +8,7 @@ public class GUIShopBuilderGreenThumb extends ShopView { public GUIShopBuilderGreenThumb() { - super(I18n.string("gui_builder.green_thumb.title"), GREENTHUMB); + super(I18n.t("gui_builder.green_thumb.title"), GREENTHUMB); } @Override diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderRocksBricks.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderRocksBricks.java index 7e2834d8c..d6f1dc515 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderRocksBricks.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderRocksBricks.java @@ -8,7 +8,7 @@ public class GUIShopBuilderRocksBricks extends ShopView { public GUIShopBuilderRocksBricks() { - super(I18n.string("gui_builder.rocks_bricks.title"), UPPER5ROWS); + super(I18n.t("gui_builder.rocks_bricks.title"), UPPER5ROWS); } @Override diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderVariety.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderVariety.java index 7f657d44f..5195561a3 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderVariety.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderVariety.java @@ -8,7 +8,7 @@ public class GUIShopBuilderVariety extends ShopView { public GUIShopBuilderVariety() { - super(I18n.string("gui_builder.variety.title"), VARIETY); + super(I18n.t("gui_builder.variety.title"), VARIETY); } @Override diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderWoodworking.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderWoodworking.java index 79cba6b67..9c9ce7db1 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderWoodworking.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/builder/GUIShopBuilderWoodworking.java @@ -8,7 +8,7 @@ public class GUIShopBuilderWoodworking extends ShopView { public GUIShopBuilderWoodworking() { - super(I18n.string("gui_builder.woodworking.title"), UPPER5ROWS); + super(I18n.t("gui_builder.woodworking.title"), UPPER5ROWS); } @Override diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/coop/GUICoopInviteSender.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/coop/GUICoopInviteSender.java index c76470f14..067977d88 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/coop/GUICoopInviteSender.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/coop/GUICoopInviteSender.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.coop; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.entity.PlayerSkin; import net.minestom.server.event.inventory.InventoryCloseEvent; @@ -48,7 +49,7 @@ public class GUICoopInviteSender extends HypixelInventoryGUI implements Refreshi private CoopDatabase.Coop coop; public GUICoopInviteSender(CoopDatabase.Coop coopTemp) { - super(I18n.string("gui_coop.sender.title"), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_coop.sender.title"), InventoryType.CHEST_6_ROW); this.coop = coopTemp; @@ -110,7 +111,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_coop.sender.confirm_button", Material.GREEN_TERRACOTTA, 1, + return TranslatableItemStackCreator.getStack("gui_coop.sender.confirm_button", Material.GREEN_TERRACOTTA, 1, "gui_coop.sender.confirm_button.lore"); } }); @@ -124,12 +125,12 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { coop.removeInvite(player.getUuid()); coop.save(); player.closeInventory(); - player.sendMessage(I18n.string("gui_coop.sender.cancelled_message", l)); + player.sendMessage(I18n.t("gui_coop.sender.cancelled_message")); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_coop.sender.cancel_button", Material.RED_TERRACOTTA, 1, + return TranslatableItemStackCreator.getStack("gui_coop.sender.cancel_button", Material.RED_TERRACOTTA, 1, "gui_coop.sender.cancel_button.lore"); } }); @@ -144,10 +145,9 @@ public void refreshItems(HypixelPlayer player) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - Locale l = p.getLocale(); return ItemStackCreator.getStackHead( player.getFullDisplayName(), PlayerSkin.fromUuid(String.valueOf(player.getUuid())), 1, - I18n.lore("gui_coop.sender.player_head_self.lore", l)); + I18n.iterable("gui_coop.sender.player_head_self.lore")); } }); @@ -167,12 +167,11 @@ public ItemStack.Builder getItem(HypixelPlayer p) { set(new GUIItem(slots[i + 1]) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); String status = accepted ? I18n.string("gui_coop.sender.accepted_yes", l) : I18n.string("gui_coop.sender.accepted_no", l); return ItemStackCreator.getStackHead( displayName, PlayerSkin.fromUuid(String.valueOf(target)), 1, - List.of(" ", I18n.string("gui_coop.sender.player_accepted", l, Map.of("status", status)))); + List.of(" ", I18n.string("gui_coop.sender.player_accepted", l, Component.text(status)))); } }); } @@ -202,4 +201,4 @@ public void suddenlyQuit(Inventory inventory, HypixelPlayer player) { public void onBottomClick(InventoryPreClickEvent e) { e.setCancelled(true); } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/coop/GUICoopInviteTarget.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/coop/GUICoopInviteTarget.java index 826190b51..5c3b11a87 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/coop/GUICoopInviteTarget.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/coop/GUICoopInviteTarget.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.coop; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.entity.PlayerSkin; import net.minestom.server.event.inventory.InventoryCloseEvent; @@ -45,7 +46,7 @@ public class GUICoopInviteTarget extends HypixelInventoryGUI { ); public GUICoopInviteTarget(CoopDatabase.Coop coop) { - super(I18n.string("gui_coop.target.title"), InventoryType.CHEST_5_ROW); + super(I18n.t("gui_coop.target.title"), InventoryType.CHEST_5_ROW); fill(ItemStackCreator.createNamedItemStack(Material.BLACK_STAINED_GLASS_PANE)); @@ -63,11 +64,9 @@ public GUICoopInviteTarget(CoopDatabase.Coop coop) { set(new GUIItem(slots[0]) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; - Locale l = p.getLocale(); return ItemStackCreator.getStackHead( SkyBlockPlayer.getDisplayName(coop.originator()), PlayerSkin.fromUuid(String.valueOf(coop.originator())), 1, - I18n.lore("gui_coop.target.originator_head.lore", l)); + I18n.iterable("gui_coop.target.originator_head.lore")); } }); @@ -84,7 +83,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { String status = accepted ? I18n.string("gui_coop.sender.accepted_yes", l) : I18n.string("gui_coop.sender.accepted_no", l); return ItemStackCreator.getStackHead( displayName, PlayerSkin.fromUuid(String.valueOf(target)), 1, - List.of(" ", I18n.string("gui_coop.sender.player_accepted", l, Map.of("status", status)))); + List.of(" ", I18n.string("gui_coop.sender.player_accepted", l, Component.text(status)))); } }); } @@ -96,19 +95,19 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { coop.removeInvite(player.getUuid()); coop.save(); Locale l = p.getLocale(); - player.sendMessage(I18n.string("gui_coop.target.denied_message", l)); + player.sendMessage(I18n.t("gui_coop.target.denied_message")); player.closeInventory(); SkyBlockPlayer target = SkyBlockGenericLoader.getLoadedPlayers().stream().filter(player1 -> player1.getUuid().equals(coop.originator())).findFirst().orElse(null); if (target != null && (coop.memberInvites().contains(target.getUuid()) || coop.members().contains(target.getUuid()))) - target.sendMessage(I18n.string("gui_coop.target.denied_notify", target.getLocale(), Map.of("player_name", player.getUsername()))); + target.sendMessage(I18n.t("gui_coop.target.denied_notify", Component.text(player.getUsername()))); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_coop.target.deny_button", Material.BARRIER, 1); + return TranslatableItemStackCreator.getStack("gui_coop.target.deny_button", Material.BARRIER, 1); } }); @@ -163,15 +162,14 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer target = SkyBlockGenericLoader.getLoadedPlayers().stream().filter(player1 -> player1.getUuid().equals(coop.originator())).findFirst().orElse(null); if (target != null && (coop.memberInvites().contains(target.getUuid()) || coop.members().contains(target.getUuid()))) - target.sendMessage(I18n.string("gui_coop.target.accepted_notify", target.getLocale(), Map.of("player_name", player.getUsername()))); + target.sendMessage(I18n.string("gui_coop.target.accepted_notify", target.getLocale(), Component.text(player.getUsername()))); } @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_coop.target.accept_button", Material.GREEN_TERRACOTTA, 1, - "gui_coop.target.accept_button.lore", Map.of( - "profile_count", String.valueOf(player.getProfiles().getProfiles().size()))); + return TranslatableItemStackCreator.getStack("gui_coop.target.accept_button", Material.GREEN_TERRACOTTA, 1, + "gui_coop.target.accept_button.lore", Component.text(String.valueOf(player.getProfiles().getProfiles().size()))); } }); } @@ -195,4 +193,4 @@ public void suddenlyQuit(Inventory inventory, HypixelPlayer player) { public void onBottomClick(InventoryPreClickEvent e) { e.setCancelled(true); } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/ElectionView.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/ElectionView.java index da4b33241..1eae88517 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/ElectionView.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/ElectionView.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.election; +import net.kyori.adventure.text.Component; import net.minestom.server.entity.PlayerSkin; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; @@ -43,7 +44,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont I18n.string("gui_election.view.no_election", l), Material.BARRIER, 1, - I18n.lore("gui_election.view.no_election.lore", l) + I18n.iterable("gui_election.view.no_election.lore") ); }); return; @@ -88,14 +89,9 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont Locale l = c.player().getLocale(); ElectionManager.castVote(c.player().getUuid(), candidateName); c.player().sendMessage(I18n.string("gui_election.view.vote_divider", l)); - c.player().sendMessage(I18n.string("gui_election.view.vote_cast", l, Map.of( - "candidate", candidate.getColoredName(), - "year", String.valueOf(data.getElectionYear())))); + c.player().sendMessage(I18n.string("gui_election.view.vote_cast", l, Component.text(candidate.getColoredName()), Component.text(String.valueOf(data.getElectionYear())))); c.player().sendMessage(" " + I18n.string("gui_election.view.vote_fame", l)); - c.player().sendMessage(I18n.string("gui_election.view.vote_result", l, Map.of( - "candidate", candidate.getColoredName(), - "percentage", pctStr, - "votes", voteStr))); + c.player().sendMessage(I18n.string("gui_election.view.vote_result", l, Component.text(candidate.getColoredName()), Component.text(pctStr), Component.text(voteStr))); c.player().sendMessage(I18n.string("gui_election.view.vote_divider", l)); c.replace(new ElectionViewStatsView()); }); @@ -107,15 +103,13 @@ private List buildCandidateLore(Locale l, SkyBlockMayor mayor, ElectionD String voteStr, String pctStr, boolean votedFor) { String color = candidate.getColor(); List lore = new ArrayList<>(); - lore.add(I18n.string("gui_election.view.candidate.year", l, Map.of("year", String.valueOf(electionYear)))); + lore.add(I18n.string("gui_election.view.candidate.year", l, Component.text(String.valueOf(electionYear)))); lore.add(""); - lore.add(I18n.string("gui_election.view.candidate.votes", l, Map.of( - "color", color, "votes", voteStr, "percentage", pctStr))); + lore.add(I18n.string("gui_election.view.candidate.votes", l, Component.text(color), Component.text(voteStr), Component.text(pctStr))); if (yearsSince >= 0) { - lore.add(I18n.string("gui_election.view.candidate.last_elected", l, Map.of( - "color", color, "years", String.valueOf(yearsSince)))); + lore.add(I18n.string("gui_election.view.candidate.last_elected", l, Component.text(color), Component.text(String.valueOf(yearsSince)))); } else { - lore.add(I18n.string("gui_election.view.candidate.last_elected_never", l, Map.of("color", color))); + lore.add(I18n.string("gui_election.view.candidate.last_elected_never", l, Component.text(color))); } lore.add(""); lore.add("§8§m--------------------------"); @@ -138,7 +132,7 @@ private List buildCandidateLore(Locale l, SkyBlockMayor mayor, ElectionD if (!mayor.isSpecial()) { lore.add(""); - lore.add(I18n.string("gui_election.view.candidate.minister_note_1", l, Map.of("color", color))); + lore.add(I18n.string("gui_election.view.candidate.minister_note_1", l, Component.text(color))); lore.add(I18n.string("gui_election.view.candidate.minister_note_2", l)); } @@ -149,7 +143,7 @@ private List buildCandidateLore(Locale l, SkyBlockMayor mayor, ElectionD lore.add(I18n.string("gui_election.view.candidate.change_vote_1", l)); lore.add(I18n.string("gui_election.view.candidate.change_vote_2", l)); lore.add(""); - lore.add(I18n.string("gui_election.view.candidate.click_vote", l, Map.of("name", mayor.getDisplayName()))); + lore.add(I18n.string("gui_election.view.candidate.click_vote", l, Component.text(mayor.getDisplayName()))); } return lore; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/ElectionViewStatsView.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/ElectionViewStatsView.java index 6b4c31b84..737095acc 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/ElectionViewStatsView.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/ElectionViewStatsView.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.election; +import net.kyori.adventure.text.Component; import net.minestom.server.entity.PlayerSkin; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; @@ -28,7 +29,7 @@ public class ElectionViewStatsView extends StatelessView { public ViewConfiguration configuration() { return ViewConfiguration.withString( (s, ctx) -> I18n.string("gui_election.stats.title", ctx.player().getLocale(), - Map.of("year", String.valueOf(SkyBlockCalendar.getYear()))), + Component.text(String.valueOf(SkyBlockCalendar.getYear()))), InventoryType.CHEST_6_ROW); } @@ -45,7 +46,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont I18n.string("gui_election.view.no_election", l), Material.BARRIER, 1, - I18n.lore("gui_election.view.no_election.lore", l) + I18n.iterable("gui_election.view.no_election.lore") ); }); return; @@ -124,16 +125,11 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont return; } ElectionManager.castVote(c.player().getUuid(), candidateName); - c.player().sendMessage(I18n.string("gui_election.view.vote_divider", l)); - c.player().sendMessage(I18n.string("gui_election.view.vote_cast", l, Map.of( - "candidate", candidate.getColoredName(), - "year", String.valueOf(data.getElectionYear())))); + c.player().sendMessage(I18n.t("gui_election.view.vote_divider")); + c.player().sendMessage(I18n.t("gui_election.view.vote_cast", Component.text(candidate.getColoredName()), Component.text(String.valueOf(data.getElectionYear())))); c.player().sendMessage(" " + I18n.string("gui_election.view.vote_fame", l)); - c.player().sendMessage(I18n.string("gui_election.view.vote_result", l, Map.of( - "candidate", candidate.getColoredName(), - "percentage", pctStr, - "votes", voteStr))); - c.player().sendMessage(I18n.string("gui_election.view.vote_divider", l)); + c.player().sendMessage(I18n.t("gui_election.view.vote_result", Component.text(candidate.getColoredName()), Component.text(pctStr), Component.text(voteStr))); + c.player().sendMessage(I18n.t("gui_election.view.vote_divider")); c.replace(new ElectionViewStatsView()); }); } @@ -146,18 +142,16 @@ private List buildCandidateLore(Locale l, SkyBlockMayor mayor, ElectionD boolean votedFor, boolean isLeader) { String color = candidate.getColor(); List lore = new ArrayList<>(); - lore.add(I18n.string("gui_election.view.candidate.year", l, Map.of("year", String.valueOf(electionYear)))); + lore.add(I18n.string("gui_election.view.candidate.year", l, Component.text(String.valueOf(electionYear)))); lore.add(""); - lore.add(I18n.string("gui_election.view.candidate.votes", l, Map.of( - "color", color, "votes", voteStr, "percentage", pctStr))); + lore.add(I18n.string("gui_election.view.candidate.votes", l, Component.text(color), Component.text(voteStr), Component.text(pctStr))); if (isLeader) { - lore.add(I18n.string("gui_election.stats.leader", l, Map.of("color", color))); + lore.add(I18n.string("gui_election.stats.leader", l, Component.text(color))); } if (yearsSince >= 0) { - lore.add(I18n.string("gui_election.view.candidate.last_elected", l, Map.of( - "color", color, "years", String.valueOf(yearsSince)))); + lore.add(I18n.string("gui_election.view.candidate.last_elected", l, Component.text(color), Component.text(String.valueOf(yearsSince)))); } else { - lore.add(I18n.string("gui_election.view.candidate.last_elected_never", l, Map.of("color", color))); + lore.add(I18n.string("gui_election.view.candidate.last_elected_never", l, Component.text(color))); } lore.add(""); lore.add("§8§m--------------------------"); @@ -180,7 +174,7 @@ private List buildCandidateLore(Locale l, SkyBlockMayor mayor, ElectionD if (!mayor.isSpecial()) { lore.add(""); - lore.add(I18n.string("gui_election.view.candidate.minister_note_1", l, Map.of("color", color))); + lore.add(I18n.string("gui_election.view.candidate.minister_note_1", l, Component.text(color))); lore.add(I18n.string("gui_election.view.candidate.minister_note_2", l)); } @@ -188,7 +182,7 @@ private List buildCandidateLore(Locale l, SkyBlockMayor mayor, ElectionD if (votedFor) { lore.add(I18n.string("gui_election.view.candidate.voted", l)); } else { - lore.add(I18n.string("gui_election.view.candidate.click_vote", l, Map.of("name", mayor.getDisplayName()))); + lore.add(I18n.string("gui_election.view.candidate.click_vote", l, Component.text(mayor.getDisplayName()))); } return lore; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/MayorMenuView.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/MayorMenuView.java index b92f8bfe0..6b043bcd7 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/MayorMenuView.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/MayorMenuView.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.election; +import net.kyori.adventure.text.Component; import net.minestom.server.entity.PlayerSkin; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; @@ -19,7 +20,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class MayorMenuView extends StatelessView { @@ -31,7 +31,7 @@ public ViewConfiguration configuration() { } return ViewConfiguration.withString( (s, ctx) -> I18n.string("gui_election.mayor.title", ctx.player().getLocale(), - Map.of("name", mayor.getDisplayName())), + Component.text(mayor.getDisplayName())), InventoryType.CHEST_4_ROW); } @@ -91,7 +91,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont List resultLore = new ArrayList<>(); resultLore.add(I18n.string("gui_election.mayor.results_year", l, - Map.of("year", String.valueOf(lastResult.getYear())))); + Component.text(String.valueOf(lastResult.getYear())))); resultLore.add(""); List results = lastResult.getCandidateResults(); @@ -109,7 +109,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont resultLore.add(""); resultLore.add(I18n.string("gui_election.mayor.results_footer_1", l)); resultLore.add(I18n.string("gui_election.mayor.results_footer_2", l, - Map.of("name", mayor.getDisplayName()))); + Component.text(mayor.getDisplayName()))); resultLore.add(I18n.string("gui_election.mayor.results_footer_3", l)); return ItemStackCreator.getStack(I18n.string("gui_election.mayor.results_title", l), diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/MinisterMenuView.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/MinisterMenuView.java index b6d990755..b20b0c1c6 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/MinisterMenuView.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/election/MinisterMenuView.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.election; +import net.kyori.adventure.text.Component; import net.minestom.server.entity.PlayerSkin; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; @@ -19,7 +20,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class MinisterMenuView extends StatelessView { @@ -31,7 +31,7 @@ public ViewConfiguration configuration() { } return ViewConfiguration.withString( (s, ctx) -> I18n.string("gui_election.minister.title", ctx.player().getLocale(), - Map.of("name", minister.getDisplayName())), + Component.text(minister.getDisplayName())), InventoryType.CHEST_4_ROW); } @@ -92,7 +92,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont String mayorName = currentMayor != null ? currentMayor.getDisplayName() : "???"; List resultLore = new ArrayList<>(); resultLore.add(I18n.string("gui_election.mayor.results_year", l, - Map.of("year", String.valueOf(lastResult.getYear())))); + Component.text(String.valueOf(lastResult.getYear())))); resultLore.add(""); List results = lastResult.getCandidateResults(); @@ -109,7 +109,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont resultLore.add(""); resultLore.add(I18n.string("gui_election.mayor.results_footer_1", l)); - resultLore.add(I18n.string("gui_election.mayor.results_footer_2", l, Map.of("name", mayorName))); + resultLore.add(I18n.string("gui_election.mayor.results_footer_2", l, Component.text(mayorName))); resultLore.add(I18n.string("gui_election.mayor.results_footer_3", l)); return ItemStackCreator.getStack(I18n.string("gui_election.mayor.results_title", l), diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumAppraisal.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumAppraisal.java index ba6a18ca8..dc1e42572 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumAppraisal.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumAppraisal.java @@ -7,7 +7,7 @@ public class GUIMuseumAppraisal extends HypixelInventoryGUI { public GUIMuseumAppraisal() { - super(I18n.string("gui_museum.appraisal.title"), InventoryType.CHEST_5_ROW); + super(I18n.t("gui_museum.appraisal.title"), InventoryType.CHEST_5_ROW); } @Override diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumArmorCategory.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumArmorCategory.java index 263e38278..fbe6c127e 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumArmorCategory.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumArmorCategory.java @@ -11,12 +11,11 @@ import net.swofty.commons.ServiceType; import net.swofty.commons.StringUtility; import net.swofty.commons.TrackedItem; -import net.swofty.commons.skyblock.item.ItemType; import net.swofty.commons.protocol.objects.itemtracker.TrackedItemRetrieveProtocolObject; +import net.swofty.commons.skyblock.item.ItemType; import net.swofty.proxyapi.ProxyService; import net.swofty.type.generic.gui.inventory.HypixelPaginatedGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.inventory.item.GUIClickableItem; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.user.HypixelPlayer; @@ -62,7 +61,7 @@ public void onBottomClick(InventoryPreClickEvent e) { DatapointMuseum.MuseumData data = player.getMuseumData(); if (data.getItemInMuseum(skyBlockItem.getAttributeHandler().getPotentialType()) != null) { - player.sendMessage(I18n.string("gui_museum.armor_category.already_in_museum", player.getLocale(), Map.of("item_name", skyBlockItem.getAttributeHandler().getPotentialType().getDisplayName()))); + player.sendMessage(I18n.t("gui_museum.armor_category.already_in_museum", Component.text(skyBlockItem.getAttributeHandler().getPotentialType().getDisplayName()))); return; } @@ -79,7 +78,7 @@ public void onBottomClick(InventoryPreClickEvent e) { UUID uuidOfNew = UUID.fromString(skyBlockItem.getAttributeHandler().getUniqueTrackedID()); if (!uuidOfAlreadyInMuseum.equals(uuidOfNew)) { - player.sendMessage(I18n.string("gui_museum.armor_category.can_only_readd", player.getLocale())); + player.sendMessage(I18n.t("gui_museum.armor_category.can_only_read")); return; } } @@ -130,7 +129,7 @@ public void onBottomClick(InventoryPreClickEvent e) { } if (missing != 0) { - player.sendMessage(I18n.string("gui_museum.armor_category.missing_items", player.getLocale(), Map.of("set_name", armorSetRegistry.getDisplayName(), "count", String.valueOf(4 - missing)))); + player.sendMessage(I18n.t("gui_museum.armor_category.missing_items", Component.text(armorSetRegistry.getDisplayName()), Component.text(String.valueOf(4 - missing)))); return; } @@ -145,7 +144,7 @@ public void onBottomClick(InventoryPreClickEvent e) { MuseumDisplays.updateDisplay(player); new GUIMuseumArmorCategory().open(player); - player.sendMessage(I18n.string("gui_museum.armor_category.donated", player.getLocale(), Map.of("set_name", armorSetRegistry.getDisplayName()))); + player.sendMessage(I18n.t("gui_museum.armor_category.donated", Component.text(armorSetRegistry.getDisplayName()))); } } @@ -259,12 +258,12 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { } if (!player.hasEmptySlots(4)) { - player.sendMessage(I18n.string("gui_museum.armor_category.need_empty_slots", player.getLocale())); + player.sendMessage(I18n.t("gui_museum.armor_category.need_empty_slots")); return; } - player.sendMessage(I18n.string("gui_museum.armor_category.retrieved_message", player.getLocale(), Map.of("set_name", armorSet.getDisplayName()))); - player.sendMessage(I18n.string("gui_museum.armor_category.retrieved_return_message", player.getLocale())); + player.sendMessage(I18n.t("gui_museum.armor_category.retrieved_message", Component.text(armorSet.getDisplayName()))); + player.sendMessage(I18n.t("gui_museum.armor_category.retrieved_return_message")); List set = List.of(helmet, chestplate, leggings, boots); set.forEach(item -> { @@ -284,9 +283,9 @@ public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; if (!inMuseum) { Locale l = player.getLocale(); - return ItemStackCreator.getStack(I18n.string("gui_museum.armor_category.not_in_museum", l, Map.of("set_name", armorSet.getDisplayName())), + return ItemStackCreator.getStack(I18n.string("gui_museum.armor_category.not_in_museum", l, Component.text(armorSet.getDisplayName())), Material.GRAY_DYE, 1, - I18n.lore("gui_museum.armor_category.not_in_museum.lore", l)); + I18n.iterable("gui_museum.armor_category.not_in_museum.lore")); } Locale l = player.getLocale(); @@ -310,7 +309,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { int leggingsValue = new ItemPriceCalculator(leggings).calculateCleanPrice().intValue(); int bootsValue = new ItemPriceCalculator(boots).calculateCleanPrice().intValue(); - List lore = new ArrayList<>(); + List lore = new ArrayList<>(); lore.add("§8§m---------------------"); lore.add(I18n.string("gui_museum.armor_category.set_donated_label", l)); lore.add("§b" + StringUtility.formatAsDate(data.getInsertionTimes().get(helmetUUID))); @@ -344,7 +343,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { if (hasTakenItOut) { lore.add("§8§m---------------------"); - lore.addAll(I18n.lore("gui_museum.armor_category.retrieved_from_museum.lore", l)); + lore.addAll(List.of(I18n.iterable("gui_museum.armor_category.retrieved_from_museum.lore"))); } else { lore.add(" "); lore.add(I18n.string("gui_museum.armor_category.click_to_retrieve", l)); @@ -364,4 +363,4 @@ public void onClose(InventoryCloseEvent e, CloseReason reason) { player, SkyBlockDataHandler.Data.INVENTORY.onQuit.apply(player) ); } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumCategory.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumCategory.java index e0de41d13..7818835dc 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumCategory.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumCategory.java @@ -11,12 +11,11 @@ import net.swofty.commons.ServiceType; import net.swofty.commons.StringUtility; import net.swofty.commons.TrackedItem; -import net.swofty.commons.skyblock.item.ItemType; import net.swofty.commons.protocol.objects.itemtracker.TrackedItemRetrieveProtocolObject; +import net.swofty.commons.skyblock.item.ItemType; import net.swofty.proxyapi.ProxyService; import net.swofty.type.generic.gui.inventory.HypixelPaginatedGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.inventory.item.GUIClickableItem; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.user.HypixelPlayer; @@ -32,7 +31,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.UUID; public class GUIMuseumCategory extends HypixelPaginatedGUI { @@ -64,7 +62,7 @@ public void onBottomClick(InventoryPreClickEvent e) { DatapointMuseum.MuseumData data = player.getMuseumData(); if (data.getItemInMuseum(skyBlockItem.getAttributeHandler().getPotentialType()) != null) { - player.sendMessage(I18n.string("gui_museum.category.already_in_museum", player.getLocale(), Map.of("item_name", skyBlockItem.getDisplayName()))); + player.sendMessage(I18n.t("gui_museum.category.already_in_museum", Component.text(skyBlockItem.getDisplayName()))); return; } @@ -76,7 +74,7 @@ public void onBottomClick(InventoryPreClickEvent e) { ); if (!trackedItemUUID.equals(previouslyInMuseumUUID)) { - player.sendMessage(I18n.string("gui_museum.category.can_only_readd", player.getLocale())); + player.sendMessage(I18n.t("gui_museum.category.can_only_read")); return; } } @@ -90,7 +88,7 @@ public void onBottomClick(InventoryPreClickEvent e) { MuseumDisplays.updateDisplay(player); new GUIMuseumCategory(category).open(player); - player.sendMessage(I18n.string("gui_museum.category.donated", player.getLocale(), Map.of("item_name", skyBlockItem.getDisplayName()))); + player.sendMessage(I18n.t("gui_museum.category.donated", Component.text(skyBlockItem.getDisplayName()))); } } @@ -161,7 +159,7 @@ public void performSearch(HypixelPlayer p, String query, int page, int maxPage) @Override public String getTitle(HypixelPlayer player, String query, int page, PaginationList paged) { - return I18n.string("gui_museum.category.title", player.getLocale(), Map.of("category", category.toString())); + return I18n.string("gui_museum.category.title", player.getLocale(), Component.text(category.toString())); } @Override @@ -180,8 +178,8 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { return; } - player.sendMessage(I18n.string("gui_museum.category.retrieved_message", player.getLocale(), Map.of("item_name", item.getDisplayName()))); - player.sendMessage(I18n.string("gui_museum.category.retrieved_return_message", player.getLocale())); + player.sendMessage(I18n.t("gui_museum.category.retrieved_message", Component.text(item.getDisplayName()))); + player.sendMessage(I18n.t("gui_museum.category.retrieved_return_message")); data.moveToRetrieved(skyBlockItem); player.setMuseumData(data); @@ -197,9 +195,9 @@ public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; if (!inMuseum) { Locale l = player.getLocale(); - return ItemStackCreator.getStack(I18n.string("gui_museum.category.item_not_in_museum", l, Map.of("item_name", item.getDisplayName())), + return ItemStackCreator.getStack(I18n.string("gui_museum.category.item_not_in_museum", l, Component.text(item.getDisplayName())), Material.GRAY_DYE, 1, - I18n.lore("gui_museum.category.item_not_in_museum.lore", l)); + I18n.iterable("gui_museum.category.item_not_in_museum.lore")); } UUID trackedItemUUID = UUID.fromString(skyBlockItem.getAttributeHandler().getUniqueTrackedID()); @@ -208,7 +206,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { .handleRequest(message).join()).trackedItem(); Locale l = player.getLocale(); - List lore = new ArrayList<>(skyBlockItem.getLore()); + List lore = new ArrayList<>(skyBlockItem.getLore()); lore.add("§8§m---------------------"); lore.add(I18n.string("gui_museum.category.item_donated_label", l)); lore.add("§b" + StringUtility.formatAsDate(data.getInsertionTimes().get(trackedItemUUID))); @@ -237,7 +235,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { } if (hasTakenItOut) { lore.add("§8§m---------------------"); - lore.addAll(I18n.lore("gui_museum.category.retrieved_from_museum.lore", l)); + lore.addAll(List.of(I18n.iterable("gui_museum.category.retrieved_from_museum.lore"))); } else { lore.add(" "); lore.add(I18n.string("gui_museum.category.click_to_retrieve", l)); @@ -257,4 +255,4 @@ public void onClose(InventoryCloseEvent e, CloseReason reason) { player, SkyBlockDataHandler.Data.INVENTORY.onQuit.apply(player) ); } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumEmptyDisplay.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumEmptyDisplay.java index dd5d8ee97..b81dab567 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumEmptyDisplay.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumEmptyDisplay.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.museum; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; @@ -106,7 +107,7 @@ public boolean shouldFilterFromSearch(String query, Object item) { @Override public void performSearch(HypixelPlayer player, String query, int page, int maxPage) { if (!new ProxyService(ServiceType.ITEM_TRACKER).isOnline().join()) { - player.sendMessage(I18n.string("gui_museum.empty_display.item_tracker_offline", player.getLocale())); + player.sendMessage(I18n.t("gui_museum.empty_display.item_tracker_offline")); player.closeInventory(); return; } @@ -129,9 +130,9 @@ public void performSearch(HypixelPlayer player, String query, int page, int maxP public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = player.getLocale(); - return ItemStackCreator.getStack(I18n.string("gui_museum.empty_display.no_items", l, Map.of("display", display.toString(), "position", String.valueOf(position + 1))), + return ItemStackCreator.getStack(I18n.string("gui_museum.empty_display.no_items", l, Component.text(display.toString()), Component.text(String.valueOf(position + 1))), Material.BARRIER, 1, - I18n.lore("gui_museum.empty_display.no_items.lore", l)); + I18n.iterable("gui_museum.empty_display.no_items.lore")); } }); } @@ -139,7 +140,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public String getTitle(HypixelPlayer player, String query, int page, PaginationList paged) { - return I18n.string("gui_museum.empty_display.title", player.getLocale(), Map.of("display", display.toString(), "position", String.valueOf(position + 1), "page", String.valueOf(page), "max_page", String.valueOf(paged.getPageCount()))); + return I18n.string("gui_museum.empty_display.title", player.getLocale(), Component.text(display.toString()), Component.text(String.valueOf(position + 1)), Component.text(String.valueOf(page)), Component.text(String.valueOf(paged.getPageCount()))); } @Override @@ -163,7 +164,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_museum.empty_display.error", Material.BARRIER, 1, + return TranslatableItemStackCreator.getStack("gui_museum.empty_display.error", Material.BARRIER, 1, "gui_museum.empty_display.error.lore"); } }; @@ -182,7 +183,7 @@ private GUIClickableItem createIndividualItemDisplay(SkyBlockItem item, int slot public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; player.closeInventory(); - player.sendMessage(I18n.string("gui_museum.empty_display.set_display_single", player.getLocale(), Map.of("display", display.toString(), "position", String.valueOf(position + 1), "item_name", item.getDisplayName()))); + player.sendMessage(I18n.t("gui_museum.empty_display.set_display_single", Component.text(display.toString()), Component.text(String.valueOf(position + 1)), Component.text(item.getDisplayName()))); DatapointMuseum.MuseumData data = player.getMuseumData(); data.getDisplayHandler().addToDisplay(item, display, position); player.setMuseumData(data); @@ -235,7 +236,7 @@ private GUIClickableItem createArmorSetDisplay(Map.Entry items; public GUIMuseumNonEmptyDisplay(MuseumDisplays display, int position) { - super(I18n.string("gui_museum.display.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_museum.display.title"), InventoryType.CHEST_4_ROW); this.display = display; this.position = position; @@ -69,7 +69,7 @@ public void onOpen(InventoryGUIOpenEvent e) { items = data.getDisplayHandler().getItemsAtSlot(display, position); if (items.isEmpty()) { - player.sendMessage(I18n.string("gui_museum.display.no_items", player.getLocale())); + player.sendMessage(I18n.t("gui_museum.display.no_items")); player.closeInventory(); return; } @@ -78,11 +78,11 @@ public void onOpen(InventoryGUIOpenEvent e) { if (items.size() == 1) { setTitle(items.getFirst().getAttributeHandler().getPotentialType().getDisplayName()); } else { - setTitle(I18n.string("gui_museum.display.title_with_count", player.getLocale(), Map.of("count", String.valueOf(items.size())))); + setTitle(I18n.t("gui_museum.display.title_with_count", Component.text(String.valueOf(items.size())))); } if (!new ProxyService(ServiceType.ITEM_TRACKER).isOnline().join()) { - player.sendMessage(I18n.string("gui_museum.display.item_tracker_offline", player.getLocale())); + player.sendMessage(I18n.t("gui_museum.display.item_tracker_offline")); player.closeInventory(); return; } @@ -104,8 +104,8 @@ public ItemStack.Builder getItem(HypixelPlayer p) { return ItemStackCreator.getStack(I18n.string("gui_museum.display.remove_button", l), Material.BEDROCK, 1, items.size() == 1 - ? I18n.lore("gui_museum.display.remove_single.lore", l) - : I18n.lore("gui_museum.display.remove_multiple.lore", l, Map.of("count", String.valueOf(items.size())))); + ? I18n.iterable("gui_museum.display.remove_single.lore") + : I18n.iterable("gui_museum.display.remove_multiple.lore", Component.text(String.valueOf(items.size())))); } }); @@ -186,4 +186,4 @@ public boolean allowHotkeying() { public void onBottomClick(InventoryPreClickEvent e) { e.setCancelled(true); } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumRewards.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumRewards.java index 13a85b416..69a0f905d 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumRewards.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIMuseumRewards.java @@ -7,7 +7,7 @@ public class GUIMuseumRewards extends HypixelInventoryGUI { public GUIMuseumRewards() { - super(I18n.string("gui_museum.rewards.title"), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_museum.rewards.title"), InventoryType.CHEST_6_ROW); } @Override diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIYourMuseum.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIYourMuseum.java index 2d7c8ba6b..5e2d1b9a6 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIYourMuseum.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/museum/GUIYourMuseum.java @@ -1,6 +1,7 @@ package net.swofty.type.skyblockgeneric.gui.inventories.museum; import lombok.SneakyThrows; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; @@ -35,14 +36,14 @@ public class GUIYourMuseum extends HypixelInventoryGUI { ); public GUIYourMuseum() { - super(I18n.string("gui_museum.main.title"), InventoryType.CHEST_6_ROW); + super(I18n.t("gui_museum.main.title"), InventoryType.CHEST_6_ROW); } @SneakyThrows @Override public void onOpen(InventoryGUIOpenEvent e) { if (!new ProxyService(ServiceType.ITEM_TRACKER).isOnline().join()) { - e.player().sendMessage(I18n.string("gui_museum.main.item_tracker_offline", e.player().getLocale())); + e.player().sendMessage(I18n.t("gui_museum.main.item_tracker_offline")); e.player().closeInventory(); return; } @@ -62,7 +63,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_museum.main.rewards_button", Material.GOLD_BLOCK, 1, + return TranslatableItemStackCreator.getStack("gui_museum.main.rewards_button", Material.GOLD_BLOCK, 1, "gui_museum.main.rewards_button.lore"); } }); @@ -70,16 +71,15 @@ public ItemStack.Builder getItem(HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; - return TranslatableItemStackCreator.getStack(p, "gui_museum.main.edit_npc_tags", Material.NAME_TAG, 1, + return TranslatableItemStackCreator.getStack("gui_museum.main.edit_npc_tags", Material.NAME_TAG, 1, "gui_museum.main.edit_npc_tags.lore"); } }); set(new GUIItem(4) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - List lore = new ArrayList<>(I18n.lore("gui_museum.main.museum_info.lore", l)); + List lore = new ArrayList<>(List.of(I18n.iterable("gui_museum.main.museum_info.lore"))); int maxAmountOfItems = MuseumableItemCategory.getMuseumableItemCategorySize(); int unlockedItems = data.getAllItems().size(); @@ -87,7 +87,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { double percentageUnlocked = (double) unlockedItems / (double) maxAmountOfItems * 100; double percentageUnlockedToTwoDecimalPlaces = Math.round(percentageUnlocked * 100) / 100.0; - lore.add(I18n.string("gui_museum.main.items_donated", l, Map.of("percentage", String.valueOf(percentageUnlockedToTwoDecimalPlaces)))); + lore.add(I18n.string("gui_museum.main.items_donated", l, Component.text(String.valueOf(percentageUnlockedToTwoDecimalPlaces)))); lore.add(getAsDisplay(unlockedItems, maxAmountOfItems)); Map calculatedPrices = data.getCalculatedPrices(); @@ -133,15 +133,15 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; Locale l = p.getLocale(); - List lore = new ArrayList<>(I18n.lore("gui_museum.main.category_button.lore_prefix", l, - Map.of("color", category.getColor(), "category", category.getCategory()))); + List lore = new ArrayList<>(List.of(I18n.iterable("gui_museum.main.category_button.lore_prefix", + Component.text(category.getColor()), Component.text(category.getCategory())))); int maxAmountOfItems = MuseumableItemCategory.getMuseumableItemCategorySize(category); int unlockedItems = data.getItemsByCategory(category).size(); double percentage = (double) unlockedItems / (double) maxAmountOfItems * 100; double percentageToTwoDecimalPlaces = Math.round(percentage * 100) / 100.0; - lore.add(I18n.string("gui_museum.main.category_items_donated", l, Map.of("percentage", String.valueOf(percentageToTwoDecimalPlaces)))); + lore.add(I18n.string("gui_museum.main.category_items_donated", l, Component.text(String.valueOf(percentageToTwoDecimalPlaces)))); lore.add(getAsDisplay(unlockedItems, maxAmountOfItems)); lore.add(" "); lore.add(I18n.string("gui_museum.main.category_click", l)); @@ -180,4 +180,4 @@ public boolean allowHotkeying() { public void onBottomClick(InventoryPreClickEvent e) { e.setCancelled(true); } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/rusty/GUIRusty.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/rusty/GUIRusty.java index 801a43d0a..f0a26022d 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/rusty/GUIRusty.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/rusty/GUIRusty.java @@ -5,7 +5,6 @@ import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.inventory.item.GUIClickableItem; import net.swofty.type.generic.gui.inventory.item.GUIItem; @@ -14,7 +13,7 @@ public class GUIRusty extends HypixelInventoryGUI { public GUIRusty() { - super(I18n.string("gui_rusty.main.title"), InventoryType.CHEST_4_ROW); + super(I18n.t("gui_rusty.main.title"), InventoryType.CHEST_4_ROW); } @@ -30,7 +29,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer player) { @Override public ItemStack.Builder getItem(HypixelPlayer player) { - return TranslatableItemStackCreator.getStack(player, "gui_rusty.main.weapons_button", Material.IRON_SWORD, 1, + return TranslatableItemStackCreator.getStack("gui_rusty.main.weapons_button", Material.IRON_SWORD, 1, "gui_rusty.main.weapons_button.lore"); } }); @@ -43,7 +42,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer player) { @Override public ItemStack.Builder getItem(HypixelPlayer player) { - return TranslatableItemStackCreator.getStackHead(player, "gui_rusty.main.pets_button", "4e794274c1bb197ad306540286a7aa952974f5661bccf2b725424f6ed79c7884", 1, + return TranslatableItemStackCreator.getStackHead("gui_rusty.main.pets_button", "4e794274c1bb197ad306540286a7aa952974f5661bccf2b725424f6ed79c7884", 1, "gui_rusty.main.pets_button.lore"); } }); @@ -56,7 +55,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer player) { @Override public ItemStack.Builder getItem(HypixelPlayer player) { - return TranslatableItemStackCreator.getStackHead(player, "gui_rusty.main.accessories_button", "3ada666715bfd2aa9fbd81daef59b9fe1c96c4fa0d08dbc72eae5633177dbf88", 1, + return TranslatableItemStackCreator.getStackHead("gui_rusty.main.accessories_button", "3ada666715bfd2aa9fbd81daef59b9fe1c96c4fa0d08dbc72eae5633177dbf88", 1, "gui_rusty.main.accessories_button.lore"); } }); @@ -69,7 +68,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer player) { @Override public ItemStack.Builder getItem(HypixelPlayer player) { - return TranslatableItemStackCreator.getStack(player, "gui_rusty.main.miscellaneous_button", Material.FILLED_MAP, 1, + return TranslatableItemStackCreator.getStack("gui_rusty.main.miscellaneous_button", Material.FILLED_MAP, 1, "gui_rusty.main.miscellaneous_button.lore"); } }); @@ -77,7 +76,7 @@ public ItemStack.Builder getItem(HypixelPlayer player) { set(new GUIItem(32) { @Override public ItemStack.Builder getItem(HypixelPlayer player) { - return TranslatableItemStackCreator.getStack(player, "gui_rusty.main.janitor_info", Material.REDSTONE_TORCH, 1, + return TranslatableItemStackCreator.getStack("gui_rusty.main.janitor_info", Material.REDSTONE_TORCH, 1, "gui_rusty.main.janitor_info.lore"); } }); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/rusty/GUIRustySubMenu.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/rusty/GUIRustySubMenu.java index 98ad14a2c..bbb10ecff 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/rusty/GUIRustySubMenu.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/rusty/GUIRustySubMenu.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.rusty; +import net.kyori.adventure.text.Component; import net.minestom.server.component.DataComponents; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; @@ -23,7 +24,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.function.Function; import java.util.function.Supplier; @@ -115,18 +115,17 @@ public void run(InventoryPreClickEvent e, HypixelPlayer player) { @Override public ItemStack.Builder getItem(HypixelPlayer player) { - Locale l = player.getLocale(); String toggleAction = player.getToggles().get(DatapointToggles.Toggles.ToggleType.RUSTY_PURCHASE_CONFIRMATION) ? "disable" : "enable"; - return ItemStackCreator.getStack(I18n.string("gui_rusty.submenu.shop_confirmations", l), + return ItemStackCreator.getStack(I18n.t("gui_rusty.submenu.shop_confirmations"), player.getToggles().get(DatapointToggles.Toggles.ToggleType.RUSTY_PURCHASE_CONFIRMATION) ? Material.LIME_DYE : Material.LIGHT_GRAY_DYE, 1, - I18n.lore("gui_rusty.submenu.shop_confirmations.lore", l, Map.of("toggle_action", toggleAction))); + I18n.iterable("gui_rusty.submenu.shop_confirmations.lore", Component.text(toggleAction))); } }); set(new GUIItem(50) { @Override public ItemStack.Builder getItem(HypixelPlayer player) { - return TranslatableItemStackCreator.getStack(player, "gui_rusty.submenu.janitor_info", Material.REDSTONE_TORCH, 1, + return TranslatableItemStackCreator.getStack("gui_rusty.submenu.janitor_info", Material.REDSTONE_TORCH, 1, "gui_rusty.submenu.janitor_info.lore"); } }); @@ -146,7 +145,7 @@ public ItemStack.Builder getItem(HypixelPlayer player) { Locale l = player.getLocale(); String status = player.getToggles().get(DatapointToggles.Toggles.ToggleType.RUSTY_SORT_BY_RARITY) ? "§aYES" : "§cNO"; return ItemStackCreator.getStack(I18n.string("gui_rusty.submenu.sort_by_rarity", l), Material.ENDER_EYE, 1, - I18n.lore("gui_rusty.submenu.sort_by_rarity.lore", l, Map.of("status", status))); + I18n.iterable("gui_rusty.submenu.sort_by_rarity.lore", Component.text(status))); } }); @@ -194,12 +193,9 @@ public void run(InventoryPreClickEvent e, HypixelPlayer player) { if (skyblockPlayer.getCoins() >= price) { skyblockPlayer.addAndUpdateItem(item); skyblockPlayer.removeCoins(price); - skyblockPlayer.sendMessage(I18n.string("gui_rusty.submenu.bought_message", l, Map.of( - "item_name", item.getDisplayName(), - "price", String.valueOf(price) - ))); + skyblockPlayer.sendMessage(I18n.string("gui_rusty.submenu.bought_message", l, Component.text(item.getDisplayName()), Component.text(String.valueOf(price)))); } else { - skyblockPlayer.sendMessage(I18n.string("gui_rusty.submenu.not_enough_coins", l)); + skyblockPlayer.sendMessage(I18n.t("gui_rusty.submenu.not_enough_coins")); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUICrafting.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUICrafting.java index fd804b3ea..c8fbc3ad3 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUICrafting.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUICrafting.java @@ -1,18 +1,23 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu; -import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.TextDecoration; import net.minestom.server.component.DataComponents; import net.minestom.server.inventory.InventoryType; import net.minestom.server.inventory.click.Click; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; +import net.minestom.server.tag.Tag; import net.swofty.commons.StringUtility; import net.swofty.commons.skyblock.item.ItemType; import net.swofty.type.generic.event.HypixelEventHandler; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.Layouts; +import net.swofty.type.generic.gui.v2.StatefulView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; +import net.swofty.type.generic.gui.v2.ViewSession; import net.swofty.type.generic.gui.v2.context.ClickContext; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; @@ -24,11 +29,11 @@ import java.util.ArrayList; import java.util.Arrays; -import java.util.Locale; import java.util.Objects; import java.util.stream.Collectors; public class GUICrafting implements StatefulView { + private static final String[] DEFAULT_CRAFT_ERROR = new String[]{"§cYou cannot craft this item right now."}; private static final int[] CRAFT_SLOTS = new int[]{10, 11, 12, 19, 20, 21, 28, 29, 30}; private static final int RESULT_SLOT = 23; @@ -48,52 +53,52 @@ public void layout(ViewLayout layout, CraftingState state, ViewCo int currentHash = computeGridHash(ctx); SkyBlockRecipe recipe = (state.lastParsedRecipe() != null && state.lastGridHash() == currentHash) - ? state.lastParsedRecipe() - : parseCurrentRecipe(ctx); + ? state.lastParsedRecipe() + : parseCurrentRecipe(ctx); boolean hasValidRecipe = recipe != null; SkyBlockRecipe.CraftingResult result = hasValidRecipe ? recipe.getCanCraft().apply(player) : null; + String[] craftErrorMessages = getCraftErrorMessages(result); boolean canCraft = hasValidRecipe && result != null && result.allowed(); Material borderMaterial = canCraft ? Material.LIME_STAINED_GLASS_PANE : Material.RED_STAINED_GLASS_PANE; Components.fill(layout); - layout.slots(Layouts.row(5), (s, c) -> ItemStackCreator.createNamedItemStack(borderMaterial)); + layout.slots(Layouts.row(5), (_, _) -> ItemStackCreator.createNamedItemStack(borderMaterial)); Components.close(layout, 49); Components.containerGrid( - layout, - 10, - 30, (_, _, _, state1) -> { - int newHash = computeGridHash(ctx); - SkyBlockRecipe newRecipe = SkyBlockRecipe.parseRecipe(getCurrentRecipeStacks(ctx)); - if (state1.lastGridHash() == newHash && Objects.equals(state1.lastParsedRecipe(), newRecipe)) { - return; - } - ctx.session(CraftingState.class).setState(new CraftingState(newHash, newRecipe)); + layout, + 10, + 30, (_, _, _, state1) -> { + int newHash = computeGridHash(ctx); + SkyBlockRecipe newRecipe = SkyBlockRecipe.parseRecipe(getCurrentRecipeStacks(ctx)); + if (state1.lastGridHash() == newHash && Objects.equals(state1.lastParsedRecipe(), newRecipe)) { + return; } + ctx.session(CraftingState.class).setState(new CraftingState(newHash, newRecipe)); + } ); if (!hasValidRecipe) { - layout.slot(RESULT_SLOT, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.crafting.recipe_required", Material.BARRIER, 1, "gui_sbmenu.crafting.recipe_required.lore")); + layout.slot(RESULT_SLOT, (_, _) -> TranslatableItemStackCreator.getStack("gui_sbmenu.crafting.recipe_required", Material.BARRIER, 1, "gui_sbmenu.crafting.recipe_required.lore")); } else if (!canCraft) { - layout.slot(RESULT_SLOT, (s, c) -> ItemStackCreator.getStack(result.errorMessage()[0], - Material.BEDROCK, 1, - Arrays.copyOfRange(result.errorMessage(), 1, result.errorMessage().length))); + layout.slot(RESULT_SLOT, (_, _) -> ItemStackCreator.getStack(craftErrorMessages[0], + Material.BEDROCK, 1, + Arrays.copyOfRange(craftErrorMessages, 1, craftErrorMessages.length))); } else { int amount = recipe.getAmount(); - layout.slot(RESULT_SLOT, (s, c) -> { + layout.slot(RESULT_SLOT, (_, c) -> { SkyBlockPlayer p = (SkyBlockPlayer) c.player(); ItemStack.Builder builder = PlayerItemUpdater.playerUpdate(p, recipe.getResult().getItemStack()).amount(amount); - ArrayList lore = new ArrayList<>(); + ArrayList lore = new ArrayList<>(); var existingLore = builder.build().get(DataComponents.LORE); if (existingLore != null) { existingLore.stream().map(line -> "§7" + StringUtility.getTextFromComponent(line)).forEach(lore::add); } - Locale l = c.player().getLocale(); - lore.addAll(I18n.lore("gui_sbmenu.crafting.crafting_item.lore", l)); - builder.set(DataComponents.LORE, lore.stream().map(line -> Component.text(line).decoration(TextDecoration.ITALIC, false)) - .collect(Collectors.toList())); + lore.addAll(Arrays.asList(I18n.iterable("gui_sbmenu.crafting.crafting_item.lore"))); + builder.set(DataComponents.LORE, ItemStackCreator.literalLoreComponents(lore).stream().map(line -> line.decoration(TextDecoration.ITALIC, false)) + .collect(Collectors.toList())); return builder; }, (click, c) -> handleCraft(click, c, recipe, amount)); @@ -109,16 +114,24 @@ private ItemStack[] getCurrentRecipeStacks(ViewContext ctx) { } private int computeGridHash(ViewContext ctx) { - // Stable & cheap hash: material id + amount per slot (no streams/allocations beyond the 9 reads). int hash = 1; for (int slot : CRAFT_SLOTS) { ItemStack item = ctx.inventory().getItemStack(slot); - int mat = item.material().id(); - hash = 31 * hash + (mat * 37 + item.amount()); + hash = 31 * hash + item.material().id(); + hash = 31 * hash + item.amount(); + String itemType = item.getTag(Tag.String("item_type")); + hash = 31 * hash + (itemType != null ? itemType.hashCode() : 0); } return hash; } + private String[] getCraftErrorMessages(SkyBlockRecipe.CraftingResult result) { + if (result == null || result.errorMessage() == null || result.errorMessage().length == 0) { + return DEFAULT_CRAFT_ERROR; + } + return result.errorMessage(); + } + private SkyBlockRecipe parseCurrentRecipe(ViewContext ctx) { return SkyBlockRecipe.parseRecipe(getCurrentRecipeStacks(ctx)); } @@ -131,45 +144,49 @@ private void handleCraft(ClickContext click, ViewContext ctx, Sky ItemType resultItemType = recipe.getResult().getAttributeHandler().getPotentialType(); boolean isShift = click.click() instanceof Click.LeftShift || click.click() instanceof Click.RightShift; + SkyBlockRecipe.CraftingResult permissionResult = recipe.getCanCraft().apply(player); + if (permissionResult == null || !permissionResult.allowed()) { + return; + } + if (!cursorItemStack.isAir() && (cursorItemType == null || !cursorItemType.equals(resultItemType))) { return; } ItemStack craftedItem = PlayerItemUpdater.playerUpdate(player, recipe.getResult().getItemStack()) - .amount(amount) - .build(); + .amount(amount) + .build(); int maxStackSize = craftedItem.material().maxStackSize(); + boolean crafted = false; if (isShift) { - int expectedGridHash = computeGridHash(ctx); - - while (true) { - if (computeGridHash(ctx) != expectedGridHash) { - break; - } + int maxCraftsByInventory = getMaxCraftsByInventory(player, craftedItem, amount); + SkyBlockItem[] simulatedItems = getCurrentRecipeAsItems(ctx); + int craftedCount = 0; + while (craftedCount < maxCraftsByInventory) { SkyBlockRecipe.CraftingResult craftResult = recipe.getCanCraft().apply(player); if (craftResult == null || !craftResult.allowed()) { break; } - if (!player.canFitItem(craftedItem)) { - break; - } - SkyBlockItem[] currentItems = getCurrentRecipeAsItems(ctx); - SkyBlockItem[] toReplace; try { - toReplace = recipe.consume(currentItems); + simulatedItems = recipe.consume(simulatedItems); } catch (Exception e) { break; } - applyConsumedGrid(player, ctx, toReplace); - expectedGridHash = computeGridHash(ctx); + craftedCount++; + } + + int totalCraftedAmount = craftedCount * amount; + if (totalCraftedAmount > 0) { + applyConsumedGrid(player, ctx, simulatedItems); + addCraftedOutput(player, craftedItem, totalCraftedAmount); + crafted = true; - player.addAndUpdateItem(craftedItem); HypixelEventHandler.callCustomEvent( - new ItemCraftEvent(player, new SkyBlockItem(craftedItem), recipe)); + new ItemCraftEvent(player, new SkyBlockItem(craftedItem.withAmount(totalCraftedAmount)), recipe)); } } else { int currentCursorAmount = cursorItemStack.isAir() ? 0 : cursorItemStack.amount(); @@ -177,26 +194,70 @@ private void handleCraft(ClickContext click, ViewContext ctx, Sky if (newAmount > maxStackSize) { return; } + + SkyBlockItem[] currentItems = getCurrentRecipeAsItems(ctx); + SkyBlockItem[] toReplace; + try { + toReplace = recipe.consume(currentItems); + } catch (Exception e) { + return; + } + applyConsumedGrid(player, ctx, toReplace); + ItemStack newCursorItem = craftedItem.withAmount(newAmount); player.getInventory().setCursorItem(newCursorItem); + crafted = true; HypixelEventHandler.callCustomEvent(new ItemCraftEvent(player, new SkyBlockItem(craftedItem), recipe)); - SkyBlockItem[] currentItems = getCurrentRecipeAsItems(ctx); - SkyBlockItem[] toReplace = recipe.consume(currentItems); - applyConsumedGrid(player, ctx, toReplace); } + if (crafted) { + syncCraftingState(ctx); + } + + ctx.inventory().update(); player.getInventory().update(); } + private int getMaxCraftsByInventory(SkyBlockPlayer player, ItemStack craftedItem, int amountPerCraft) { + if (amountPerCraft <= 0) { + return 0; + } + + int maxStackSize = craftedItem.material().maxStackSize(); + int availableSpace = 0; + for (int slot = 0; slot < 36; slot++) { + ItemStack stack = player.getInventory().getItemStack(slot); + if (stack.isAir()) { + availableSpace += maxStackSize; + continue; + } + if (stack.isSimilar(craftedItem) && stack.amount() < maxStackSize) { + availableSpace += maxStackSize - stack.amount(); + } + } + + return availableSpace / amountPerCraft; + } + + private void addCraftedOutput(SkyBlockPlayer player, ItemStack craftedItem, int totalAmount) { + player.addAndUpdateItem(craftedItem.withAmount(totalAmount)); + } + + private void syncCraftingState(ViewContext ctx) { + int newHash = computeGridHash(ctx); + SkyBlockRecipe newRecipe = SkyBlockRecipe.parseRecipe(getCurrentRecipeStacks(ctx)); + ctx.session(CraftingState.class).setState(new CraftingState(newHash, newRecipe)); + } + private void applyConsumedGrid(SkyBlockPlayer player, ViewContext ctx, SkyBlockItem[] toReplace) { for (int i = 0; i < CRAFT_SLOTS.length; i++) { if (toReplace[i] == null || toReplace[i].getItemStack().material() == Material.BEDROCK) { ctx.inventory().setItemStack(CRAFT_SLOTS[i], ItemStack.AIR); } else { ctx.inventory().setItemStack( - CRAFT_SLOTS[i], - PlayerItemUpdater.playerUpdate(player, toReplace[i].getItemStack()).build() + CRAFT_SLOTS[i], + PlayerItemUpdater.playerUpdate(player, toReplace[i].getItemStack()).build() ); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUIPets.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUIPets.java index 1fdc08d37..be5c56d2f 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUIPets.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUIPets.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu; +import net.kyori.adventure.text.Component; import net.minestom.server.component.DataComponents; import net.minestom.server.inventory.InventoryType; import net.minestom.server.inventory.click.Click; @@ -10,7 +11,10 @@ import net.swofty.commons.skyblock.item.attribute.attributes.ItemAttributePetData; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.PaginatedView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ClickContext; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; @@ -24,7 +28,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIPets extends PaginatedView { private static final int[] PAGINATED_SLOTS = { @@ -37,10 +40,7 @@ public class GUIPets extends PaginatedView { @Override public ViewConfiguration configuration() { return ViewConfiguration.withString( - (state, ctx) -> I18n.string("gui_sbmenu.pets.title", ctx.player().getLocale(), Map.of( - "page", String.valueOf(state.page() + 1), - "max_page", String.valueOf(Math.max(1, (int) Math.ceil((double) getFilteredItems(state).size() / PAGINATED_SLOTS.length))) - )), + (state, ctx) -> I18n.string("gui_sbmenu.pets.title", ctx.player().getLocale(), Component.text(String.valueOf(state.page() + 1)), Component.text(String.valueOf(Math.max(1, (int) Math.ceil((double) getFilteredItems(state).size() / PAGINATED_SLOTS.length))))), InventoryType.CHEST_6_ROW ); } @@ -124,7 +124,7 @@ protected void onItemClick(ClickContext click, ViewContext ctx, SkyBl player.getPetData().deselectCurrent(); player.getPetData().updatePetEntityImpl(player); ctx.session(PetsState.class).update(s -> (PetsState) s.withItems(getPetsFromPlayer(player))); - player.sendMessage(I18n.string("gui_sbmenu.pets.msg.deselected", l, Map.of("pet_name", item.getDisplayName()))); + player.sendMessage(I18n.string("gui_sbmenu.pets.msg.deselected", l, Component.text(item.getDisplayName()))); return; } @@ -138,7 +138,7 @@ protected void onItemClick(ClickContext click, ViewContext ctx, SkyBl player.getPetData().setEnabled(item.getAttributeHandler().getPotentialType(), true); player.getPetData().updatePetEntityImpl(player); - player.sendMessage(I18n.string("gui_sbmenu.pets.msg.selected", l, Map.of("pet_name", item.getDisplayName()))); + player.sendMessage(I18n.string("gui_sbmenu.pets.msg.selected", l, Component.text(item.getDisplayName()))); ctx.session(PetsState.class).update(s -> (PetsState) s.withItems(getPetsFromPlayer(player))); } @@ -155,14 +155,14 @@ protected void layoutCustom(ViewLayout layout, PetsState state, ViewC layout.slot(4, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); String selectedPet = player.getPetData().getEnabledPet() == null ? "§cNone" : player.getPetData().getEnabledPet().getDisplayName(); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.pets.info", Material.BONE, 1, - "gui_sbmenu.pets.info.lore", Map.of("selected_pet", selectedPet)); + return TranslatableItemStackCreator.getStack("gui_sbmenu.pets.info", Material.BONE, 1, + "gui_sbmenu.pets.info.lore", Component.text(selectedPet)); }); layout.slot(47, (s, c) -> { String status = s.convertToItem() ? "§aEnabled" : "§cDisabled"; - ItemStack.Builder itemStack = TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.pets.convert_to_item", Material.DIAMOND, 1, - "gui_sbmenu.pets.convert_to_item.lore", Map.of("status", status)); + ItemStack.Builder itemStack = TranslatableItemStackCreator.getStack("gui_sbmenu.pets.convert_to_item", Material.DIAMOND, 1, + "gui_sbmenu.pets.convert_to_item.lore", Component.text(status)); if (s.convertToItem()) ItemStackCreator.enchant(itemStack); return itemStack; @@ -170,7 +170,7 @@ protected void layoutCustom(ViewLayout layout, PetsState state, ViewC SkyBlockPlayer player = (SkyBlockPlayer) c.player(); Locale l = player.getLocale(); String status = !click.state().convertToItem() ? "§aENABLED" : "§cDISABLED"; - player.sendMessage(I18n.string("gui_sbmenu.pets.msg.conversion_toggle", l, Map.of("status", status))); + player.sendMessage(I18n.string("gui_sbmenu.pets.msg.conversion_toggle", l, Component.text(status))); c.session(PetsState.class).update(s -> s.withConvertToItem(!s.convertToItem())); }); @@ -189,7 +189,7 @@ protected void layoutCustom(ViewLayout layout, PetsState state, ViewC lore.add(I18n.string("gui_sbmenu.pets.sort.right_click", l)); lore.add(I18n.string("gui_sbmenu.pets.sort.click", l)); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.pets.sort", Material.HOPPER, 1, lore); + return TranslatableItemStackCreator.getStack("gui_sbmenu.pets.sort", Material.HOPPER, 1, lore); }, (click, c) -> { boolean isRightClick = click.click() instanceof Click.Right; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockMenu.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockMenu.java index 92fef37cb..19b70253c 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockMenu.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockMenu.java @@ -1,5 +1,7 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.minimessage.translation.Argument; import net.minestom.server.inventory.InventoryType; import net.minestom.server.inventory.click.Click; import net.minestom.server.item.Material; @@ -54,28 +56,26 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(13, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); - Locale l = player.getLocale(); + + List lore = new ArrayList<>(); + lore.add(I18n.t("gui_sbmenu.main.your_profile.view_equipment")); + lore.add(Component.space()); + PlayerStatistics statistics = player.getStatistics(); - StringBuilder statsDisplay = new StringBuilder(); List statNames = new ArrayList<>(List.of("Health", "Defense", "Speed", "Strength", "Intelligence", - "Crit Chance", "Crit Damage", "Swing Range" + "Crit Chance", "Crit Damage", "Swing Range" )); statistics.allStatistics().getOverall().forEach((statistic, value) -> { if (!value.equals(statistic.getBaseAdditiveValue()) || statNames.contains(statistic.getDisplayName())) { - if (statsDisplay.length() > 0) statsDisplay.append("\n"); - statsDisplay.append(" ").append(statistic.getFullDisplayName()).append(" §f") - .append(StringUtility.decimalify(value, 2)).append(statistic.getSuffix()); + lore.add(Component.text(" " + statistic.getFullDisplayName() + " §f" + (StringUtility.decimalify(value, 2)) + (statistic.getSuffix()))); } }); - List lore = new ArrayList<>(I18n.lore("gui_sbmenu.main.your_profile.lore", l, - Map.of("stats_display", statsDisplay.toString()))); + lore.add(Component.space()); + lore.add(I18n.t("gui_sbmenu.main.your_profile.view")); - return TranslatableItemStackCreator.getStackHead(c.player(), "gui_sbmenu.main.your_profile", - player.getPlayerSkin(), 1, - lore - ); - }, (click, c) -> { + return TranslatableItemStackCreator.getStackHead("gui_sbmenu.main.your_profile", player.getPlayerSkin(), 1, lore); + }, (_, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); player.openView(new GUISkyBlockProfile()); }); @@ -85,19 +85,18 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont SkyBlockLevelRequirement levelRequirement = player.getSkyBlockExperience().getLevel(); SkyBlockLevelRequirement nextLevel = levelRequirement.getNextLevel(); - return TranslatableItemStackCreator.getStackHead(c.player(), "gui_sbmenu.main.skyblock_leveling", - "3255327dd8e90afad681a19231665bea2bd06065a09d77ac1408837f9e0b242", 1, - "gui_sbmenu.main.skyblock_leveling.lore", Map.of( - "level_display", levelRequirement.getColor() + String.valueOf(levelRequirement), - "next_level", nextLevel == null ? "§cMAX" : String.valueOf(nextLevel), - "next_level_display", player.getSkyBlockExperience().getNextLevelDisplay() - ) + return TranslatableItemStackCreator.getStackHead("gui_sbmenu.main.skyblock_leveling", + "3255327dd8e90afad681a19231665bea2bd06065a09d77ac1408837f9e0b242", 1, + "gui_sbmenu.main.skyblock_leveling.lore", + Component.text(levelRequirement.getColor() + String.valueOf(levelRequirement)), + Component.text(nextLevel == null ? "§cMAX" : String.valueOf(nextLevel)), + Component.text(player.getSkyBlockExperience().getNextLevelDisplay()) ); }, (click, c) -> c.push(new GUISkyBlockLevels())); - layout.slot(29, (s, c) -> TranslatableItemStackCreator.getStackHead(c.player(), "gui_sbmenu.main.your_bags", - "961a918c0c49ba8d053e522cb91abc74689367b4d8aa06bfc1ba9154730985ff", 1, - "gui_sbmenu.main.your_bags.lore" + layout.slot(29, (s, c) -> TranslatableItemStackCreator.getStackHead("gui_sbmenu.main.your_bags", + "961a918c0c49ba8d053e522cb91abc74689367b4d8aa06bfc1ba9154730985ff", 1, + "gui_sbmenu.main.your_bags.lore" ), (click, c) -> { c.push(new GUIYourBags()); }); @@ -105,8 +104,8 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(30, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); String selectedPet = player.getPetData().getEnabledPet() == null ? "§cNone" : player.getPetData().getEnabledPet().getDisplayName(); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.main.pets", Material.BONE, 1, - "gui_sbmenu.main.pets.lore", Map.of("selected_pet", selectedPet) + return TranslatableItemStackCreator.getStack("gui_sbmenu.main.pets", Material.BONE, 1, + "gui_sbmenu.main.pets.lore", Component.text(selectedPet) ); }, (click, c) -> c.push(new GUIPets(), GUIPets.createInitialState((SkyBlockPlayer) c.player()))); @@ -114,57 +113,47 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont SkyBlockPlayer player = (SkyBlockPlayer) c.player(); List missionDisplay = new ArrayList<>(); SkyBlockRecipe.getMissionDisplay(missionDisplay, player.getUuid()); - StringBuilder missionDisplayStr = new StringBuilder(); - for (String line : missionDisplay) { - if (missionDisplayStr.length() > 0) missionDisplayStr.append("\n"); - missionDisplayStr.append(line); - } - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.main.recipe_book", Material.BOOK, 1, - "gui_sbmenu.main.recipe_book.lore", Map.of("mission_display", missionDisplayStr.toString())); - }, (click, c) -> { + return TranslatableItemStackCreator.getStack("gui_sbmenu.main.recipe_book", Material.BOOK, 1, + "gui_sbmenu.main.recipe_book.lore", Argument.component("display", Component.text(missionDisplay.get(0))), Argument.component("bar", Component.text(missionDisplay.get(1)))); + }, (_, c) -> { c.push(new GUIRecipeBook()); }); - layout.slot(25, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.main.storage", Material.CHEST, 1, - "gui_sbmenu.main.storage.lore" + layout.slot(25, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.main.storage", Material.CHEST, 1, + "gui_sbmenu.main.storage.lore" ), (click, c) -> c.push(new GUIStorage())); - layout.slot(23, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.main.quests", Material.WRITABLE_BOOK, 1, - "gui_sbmenu.main.quests.lore" + layout.slot(23, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.main.quests", Material.WRITABLE_BOOK, 1, + "gui_sbmenu.main.quests.lore" ), (click, c) -> c.push(new GUIMissionLog())); - layout.autoUpdating(24, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.main.calendar", Material.CLOCK, 1, getCalendarLore(ctx)), - (click, c) -> c.push(new GUICalendar()), Duration.ofSeconds(1)); + layout.autoUpdating(24, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.main.calendar", Material.CLOCK, 1, getCalendarLore(ctx)), + (click, c) -> c.push(new GUICalendar()), Duration.ofSeconds(1)); - layout.slot(19, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.main.skills", Material.DIAMOND_SWORD, 1, - "gui_sbmenu.main.skills.lore" + layout.slot(19, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.main.skills", Material.DIAMOND_SWORD, 1, + "gui_sbmenu.main.skills.lore" ), (click, c) -> c.push(new GUISkills())); layout.slot(20, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); List collectionDisplay = new ArrayList<>(); player.getCollection().getDisplay(collectionDisplay); - StringBuilder collectionDisplayStr = new StringBuilder(); - for (String line : collectionDisplay) { - if (collectionDisplayStr.length() > 0) collectionDisplayStr.append("\n"); - collectionDisplayStr.append(line); - } - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.main.collections", Material.PAINTING, 1, - "gui_sbmenu.main.collections.lore", Map.of("collection_display", collectionDisplayStr.toString())); - }, (click, c) -> { + return TranslatableItemStackCreator.getStack("gui_sbmenu.main.collections", Material.PAINTING, 1, + "gui_sbmenu.main.collections.lore", Argument.component("display", Component.text(collectionDisplay.get(0))), Argument.component("bar", Component.text(collectionDisplay.get(1)))); + }, (_, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); player.openView(new GUICollections()); }); - layout.slot(31, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.main.crafting_table", Material.CRAFTING_TABLE, 1, - "gui_sbmenu.main.crafting_table.lore" - ), (click, c) -> c.push(new GUICrafting())); + layout.slot(31, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.main.crafting_table", Material.CRAFTING_TABLE, 1, + "gui_sbmenu.main.crafting_table.lore" + ), (_, c) -> c.push(new GUICrafting())); - layout.slot(47, (s, c) -> TranslatableItemStackCreator.getStackHead(c.player(), "gui_sbmenu.main.fast_travel", - "f151cffdaf303673531a7651b36637cad912ba485643158e548d59b2ead5011", 1, - "gui_sbmenu.main.fast_travel.lore" + layout.slot(47, (s, c) -> TranslatableItemStackCreator.getStackHead("gui_sbmenu.main.fast_travel", + "f151cffdaf303673531a7651b36637cad912ba485643158e548d59b2ead5011", 1, + "gui_sbmenu.main.fast_travel.lore" ), (click, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); if (click.click() instanceof Click.Right) { @@ -177,38 +166,37 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(48, (s, c) -> { HypixelPlayer player = c.player(); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.main.profile_management", Material.NAME_TAG, 1, - "gui_sbmenu.main.profile_management.lore", Map.of( - "profile_count", String.valueOf(((SkyBlockPlayer) player).getProfiles().getProfiles().size()) - ) + return TranslatableItemStackCreator.getStack("gui_sbmenu.main.profile_management", Material.NAME_TAG, 1, + "gui_sbmenu.main.profile_management.lore", + Component.text(String.valueOf(((SkyBlockPlayer) player).getProfiles().getProfiles().size())) ); - }, (click, c) -> c.push(new GUIProfileManagement())); + }, (_, c) -> c.push(new GUIProfileManagement())); } - private static @NonNull List getCalendarLore(ViewContext ctx) { + private static @NonNull List getCalendarLore(ViewContext ctx) { Locale l = ctx.player().getLocale(); List currentEvents = SkyBlockCalendar.getCurrentEvents(); boolean multipleEvents = currentEvents.size() > 1; String date = StringUtility.ntify(SkyBlockCalendar.getDay()) + " " + SkyBlockCalendar.getMonthName() + " " + SkyBlockCalendar.getYear(); - List lore = new ArrayList<>(I18n.lore("gui_sbmenu.main.calendar.lore_header", l, Map.of("date", date))); - lore.add(""); + List lore = new ArrayList<>(List.of(I18n.iterable("gui_sbmenu.main.calendar.lore_header", Argument.component("date", Component.text(date))))); + lore.add(Component.space()); if (multipleEvents) { - lore.add(I18n.string("gui_sbmenu.main.calendar.current_events", l)); + lore.add(I18n.t("gui_sbmenu.main.calendar.current_events")); for (CalendarEvent event : currentEvents) { - lore.add(event.getDisplayName(SkyBlockCalendar.getYear())); + lore.add(Component.text(event.getDisplayName(SkyBlockCalendar.getYear()))); } } else if (currentEvents.size() == 1) { CalendarEvent currentEvent = currentEvents.getFirst(); - lore.add(I18n.string("gui_sbmenu.main.calendar.current_event", l, Map.of("event_name", currentEvent.getDisplayName(SkyBlockCalendar.getYear())))); + lore.add(I18n.t("gui_sbmenu.main.calendar.current_event", Component.text(currentEvent.getDisplayName(SkyBlockCalendar.getYear())))); long ticksRemaining = getTicksRemaining(currentEvent); - lore.add(I18n.string("gui_sbmenu.main.calendar.event_ends_in", l, Map.of("time_left", StringUtility.formatTimeLeft(ticksRemaining * 50L)))); + lore.add(I18n.t("gui_sbmenu.main.calendar.event_ends_in", Component.text(StringUtility.formatTimeLeft(ticksRemaining * 50L)))); } else { - lore.add(I18n.string("gui_sbmenu.main.calendar.no_current_events", l)); + lore.add(I18n.t("gui_sbmenu.main.calendar.no_current_events")); } - lore.add(" "); + lore.add(Component.space()); Map upcomingEvents; if (ctx.player().getToggles().get(DatapointToggles.Toggles.ToggleType.HAS_VISITED_DARK_AUCTION)) { @@ -222,13 +210,13 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont SkyBlockCalendar.EventInfo info = entry.getKey(); CalendarEvent event = entry.getValue(); - lore.add(I18n.string("gui_sbmenu.main.calendar.next_event", l, Map.of("event_name", event.getDisplayName(info.year())))); - lore.add(I18n.string("gui_sbmenu.main.calendar.next_event_starting", l, Map.of("time_left", StringUtility.formatTimeLeft(info.timeUntilBegin() * 50L)))); + lore.add(I18n.t("gui_sbmenu.main.calendar.next_event", Component.text(event.getDisplayName(info.year())))); + lore.add(I18n.t("gui_sbmenu.main.calendar.next_event_starting", Component.text(StringUtility.formatTimeLeft(info.timeUntilBegin() * 50L)))); } else { - lore.add(I18n.string("gui_sbmenu.main.calendar.no_upcoming_events", l)); + lore.add(I18n.t("gui_sbmenu.main.calendar.no_upcoming_events")); } - lore.addAll(I18n.lore("gui_sbmenu.main.calendar.lore_footer", l)); + lore.addAll(List.of(I18n.iterable("gui_sbmenu.main.calendar.lore_footer"))); return lore; } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockProfile.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockProfile.java index 0bb04f591..6b9a75fc6 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockProfile.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/GUISkyBlockProfile.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; @@ -7,16 +8,25 @@ import net.swofty.commons.skyblock.statistics.ItemStatistic; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; +import net.swofty.type.generic.i18n.I18n; +import net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.stats.GUICombatStats; +import net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.stats.GUIGatheringStats; +import net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.stats.GUIMiscStats; +import net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.stats.GUIWisdomStats; import net.swofty.type.skyblockgeneric.item.SkyBlockItem; import net.swofty.type.skyblockgeneric.item.components.StandardItemComponent; import net.swofty.type.skyblockgeneric.item.updater.NonPlayerItemUpdater; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import net.swofty.type.skyblockgeneric.user.statistics.PlayerStatistics; +import java.util.ArrayList; import java.util.List; -import java.util.Map; public class GUISkyBlockProfile extends StatelessView { @@ -37,7 +47,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (!player.getItemInMainHand().isAir()) { return ItemStackCreator.getFromStack(player.getItemInMainHand()); } else { - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profile.empty_held_item", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); + return TranslatableItemStackCreator.getStack("gui_sbmenu.profile.empty_held_item", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); } }); @@ -47,7 +57,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (!player.getHelmet().isAir()) { return ItemStackCreator.getFromStack(player.getHelmet()); } else { - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profile.empty_helmet", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); + return TranslatableItemStackCreator.getStack("gui_sbmenu.profile.empty_helmet", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); } }, (click, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); @@ -71,7 +81,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (!player.getChestplate().isAir()) { return ItemStackCreator.getFromStack(player.getChestplate()); } else { - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profile.empty_chestplate", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); + return TranslatableItemStackCreator.getStack("gui_sbmenu.profile.empty_chestplate", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); } }, (click, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); @@ -95,7 +105,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (!player.getLeggings().isAir()) { return ItemStackCreator.getFromStack(player.getLeggings()); } else { - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profile.empty_leggings", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); + return TranslatableItemStackCreator.getStack("gui_sbmenu.profile.empty_leggings", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); } }, (click, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); @@ -119,7 +129,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (!player.getBoots().isAir()) { return ItemStackCreator.getFromStack(player.getBoots()); } else { - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profile.empty_boots", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); + return TranslatableItemStackCreator.getStack("gui_sbmenu.profile.empty_boots", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); } }, (click, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); @@ -144,7 +154,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont SkyBlockItem pet = player.getPetData().getEnabledPet(); return new NonPlayerItemUpdater(pet).getUpdatedItem(); } else { - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profile.empty_pet", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); + return TranslatableItemStackCreator.getStack("gui_sbmenu.profile.empty_pet", Material.LIGHT_GRAY_STAINED_GLASS_PANE, 1); } }, (click, c) -> { //c.player().openView(new GUIPets()) @@ -154,30 +164,39 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(15, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); PlayerStatistics statistics = player.getStatistics(); - StringBuilder statsDisplay = new StringBuilder(); + List lore = new ArrayList<>(); + lore.add(I18n.t("gui_sbmenu.profile.combat_stats.lore.1")); + lore.add(I18n.t("gui_sbmenu.profile.combat_stats.lore.2")); + lore.add(Component.space()); + List stats = List.of(ItemStatistic.HEALTH, ItemStatistic.DEFENSE, ItemStatistic.STRENGTH, ItemStatistic.INTELLIGENCE, ItemStatistic.CRITICAL_CHANCE, ItemStatistic.CRITICAL_DAMAGE, ItemStatistic.BONUS_ATTACK_SPEED, ItemStatistic.ABILITY_DAMAGE, ItemStatistic.TRUE_DEFENSE, ItemStatistic.FEROCITY, ItemStatistic.HEALTH_REGENERATION, ItemStatistic.VITALITY, ItemStatistic.MENDING, ItemStatistic.SWING_RANGE); statistics.allStatistics().getOverall().forEach((statistic, value) -> { if (stats.contains(statistic)) { - if (statsDisplay.length() > 0) statsDisplay.append("\n"); - statsDisplay.append(" ").append(statistic.getFullDisplayName()).append(" §f") - .append(StringUtility.decimalify(value, 2)).append(statistic.getSuffix()); + lore.add(Component.text(" " + statistic.getFullDisplayName() + " §f" + StringUtility.decimalify(value, 2) + statistic.getSuffix())); } }); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profile.combat_stats", Material.DIAMOND_SWORD, 1, - "gui_sbmenu.profile.combat_stats.lore", Map.of("stats_display", statsDisplay.toString())); + lore.add(Component.space()); + lore.add(I18n.t("gui_common.details")); + + return TranslatableItemStackCreator.getStack("gui_sbmenu.profile.combat_stats", Material.DIAMOND_SWORD, 1, + lore); }, (click, c) -> { - //c.player().openView(new GUICombatStats())) + c.player().openView(new GUICombatStats()); }); // Gathering Stats layout.slot(16, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); PlayerStatistics statistics = player.getStatistics(); - StringBuilder statsDisplay = new StringBuilder(); + List lore = new ArrayList<>(); + lore.add(I18n.t("gui_sbmenu.profile.gathering_stats.lore.1")); + lore.add(I18n.t("gui_sbmenu.profile.gathering_stats.lore.2")); + lore.add(Component.space()); + List stats = List.of(ItemStatistic.MINING_SPEED, ItemStatistic.MINING_FORTUNE, ItemStatistic.BREAKING_POWER, ItemStatistic.PRISTINE, ItemStatistic.FORAGING_FORTUNE, ItemStatistic.FARMING_FORTUNE, ItemStatistic.MINING_SPREAD, ItemStatistic.GEMSTONE_SPREAD, ItemStatistic.HUNTER_FORTUNE, ItemStatistic.SWEEP, ItemStatistic.ORE_FORTUNE, ItemStatistic.BLOCK_FORTUNE, ItemStatistic.DWARVEN_METAL_FORTUNE, @@ -187,62 +206,72 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont statistics.allStatistics().getOverall().forEach((statistic, value) -> { if (stats.contains(statistic)) { - if (statsDisplay.length() > 0) statsDisplay.append("\n"); - statsDisplay.append(" ").append(statistic.getFullDisplayName()).append(" §f") - .append(StringUtility.decimalify(value, 2)).append(statistic.getSuffix()); + lore.add(Component.text(" " + statistic.getFullDisplayName() + " §f" + StringUtility.decimalify(value, 2) + statistic.getSuffix())); } }); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profile.gathering_stats", Material.IRON_PICKAXE, 1, - "gui_sbmenu.profile.gathering_stats.lore", Map.of("stats_display", statsDisplay.toString())); + lore.add(Component.space()); + lore.add(I18n.t("gui_common.details")); + + return TranslatableItemStackCreator.getStack("gui_sbmenu.profile.gathering_stats", Material.IRON_PICKAXE, 1, + lore); }, (click, c) -> { - // c.player().openView(new GUIGatheringStats()); + c.player().openView(new GUIGatheringStats()); }); // Wisdom Stats layout.slot(24, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); PlayerStatistics statistics = player.getStatistics(); - StringBuilder statsDisplay = new StringBuilder(); + List lore = new ArrayList<>(); + lore.add(I18n.t("gui_sbmenu.profile.wisdom_stats.lore.1")); + lore.add(I18n.t("gui_sbmenu.profile.wisdom_stats.lore.2")); + lore.add(Component.space()); + List stats = List.of(ItemStatistic.COMBAT_WISDOM, ItemStatistic.MINING_WISDOM, ItemStatistic.FARMING_WISDOM, ItemStatistic.FORAGING_WISDOM, ItemStatistic.FISHING_WISDOM, ItemStatistic.ENCHANTING_WISDOM, ItemStatistic.ALCHEMY_WISDOM, ItemStatistic.CARPENTRY_WISDOM, ItemStatistic.RUNE_CRAFTING_WISDOM, ItemStatistic.SOCIAL_WISDOM, ItemStatistic.TAMING_WISDOM, ItemStatistic.HUNTING_WISDOM); statistics.allStatistics().getOverall().forEach((statistic, value) -> { if (stats.contains(statistic)) { - if (statsDisplay.length() > 0) statsDisplay.append("\n"); - statsDisplay.append(" ").append(statistic.getFullDisplayName()).append(" §f") - .append(StringUtility.decimalify(value, 2)).append(statistic.getSuffix()); + lore.add(Component.text(" " + statistic.getFullDisplayName() + " §f" + StringUtility.decimalify(value, 2) + statistic.getSuffix())); } }); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profile.wisdom_stats", Material.BOOK, 1, - "gui_sbmenu.profile.wisdom_stats.lore", Map.of("stats_display", statsDisplay.toString())); - }, (click, c) -> { - //c.player().openView(new GUIWisdomStats()) + lore.add(Component.space()); + lore.add(I18n.t("gui_common.details")); + + return TranslatableItemStackCreator.getStack("gui_sbmenu.profile.wisdom_stats", Material.BOOK, 1, + lore); + }, (_, c) -> { + c.player().openView(new GUIWisdomStats()); }); // Misc Stats layout.slot(25, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); PlayerStatistics statistics = player.getStatistics(); - StringBuilder statsDisplay = new StringBuilder(); + List lore = new ArrayList<>(); + lore.add(I18n.t("gui_sbmenu.profile.misc_stats.lore.1")); + lore.add(I18n.t("gui_sbmenu.profile.misc_stats.lore.2")); + lore.add(Component.space()); + List stats = List.of(ItemStatistic.SPEED, ItemStatistic.MAGIC_FIND, ItemStatistic.PET_LUCK, ItemStatistic.COLD_RESISTANCE, ItemStatistic.BONUS_PEST_CHANCE, ItemStatistic.HEAT_RESISTANCE, ItemStatistic.FEAR, ItemStatistic.PULL, ItemStatistic.RESPIRATION, ItemStatistic.PRESSURE_RESISTANCE); statistics.allStatistics().getOverall().forEach((statistic, value) -> { if (stats.contains(statistic)) { - if (statsDisplay.length() > 0) statsDisplay.append("\n"); - statsDisplay.append(" ").append(statistic.getFullDisplayName()).append(" §f") - .append(StringUtility.decimalify(value, 2)).append(statistic.getSuffix()); + lore.add(Component.text(" " + statistic.getFullDisplayName() + " §f" + StringUtility.decimalify(value, 2) + statistic.getSuffix())); } }); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profile.misc_stats", Material.CLOCK, 1, - "gui_sbmenu.profile.misc_stats.lore", Map.of("stats_display", statsDisplay.toString())); - }, (click, c) -> { - //c.player().openView(new GUIMiscStats()) + lore.add(Component.space()); + lore.add(I18n.t("gui_common.details")); + + return TranslatableItemStackCreator.getStack("gui_sbmenu.profile.misc_stats", Material.CLOCK, 1, lore); + }, (_, c) -> { + c.player().openView(new GUIMiscStats()); }); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIAccessoryBag.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIAccessoryBag.java index 128d7b1c4..68c29d3a0 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIAccessoryBag.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIAccessoryBag.java @@ -1,12 +1,17 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.bags; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.StatefulView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; +import net.swofty.type.generic.gui.v2.ViewSession; import net.swofty.type.generic.gui.v2.context.ViewContext; +import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.collection.CustomCollectionAward; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointAccessoryBag; @@ -14,7 +19,6 @@ import net.swofty.type.skyblockgeneric.item.components.AccessoryComponent; import net.swofty.type.skyblockgeneric.item.updater.PlayerItemUpdater; import net.swofty.type.skyblockgeneric.levels.SkyBlockLevelCause; -import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.Map; @@ -42,10 +46,7 @@ public ViewConfiguration configuration() { SkyBlockPlayer player = (SkyBlockPlayer) ctx.player(); int totalSlots = getTotalSlots(player); int totalPages = Math.max(1, (int) Math.ceil((double) totalSlots / 45)); - return I18n.string("gui_sbmenu.bags.accessory.title", ctx.player().getLocale(), Map.of( - "page", String.valueOf(state.page() + 1), - "max_page", String.valueOf(totalPages) - )); + return I18n.string("gui_sbmenu.bags.accessory.title", ctx.player().getLocale(), Component.text(String.valueOf(state.page() + 1)), Component.text(String.valueOf(totalPages))); }, InventoryType.CHEST_6_ROW ); @@ -92,20 +93,20 @@ public void layout(ViewLayout layout, AccessoryBagState state int slotIndex = i + startIndex; CustomCollectionAward nextUpgrade = getUpgradeNeededForSlotIndex(slotIndex); if (nextUpgrade != null) { - layout.slot(i, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.accessory.locked", Material.RED_STAINED_GLASS_PANE, 1, - "gui_sbmenu.bags.accessory.locked.lore", Map.of("upgrade_name", nextUpgrade.getDisplay()))); + layout.slot(i, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.accessory.locked", Material.RED_STAINED_GLASS_PANE, 1, + "gui_sbmenu.bags.accessory.locked.lore", Component.text(nextUpgrade.getDisplay()))); } } // Previous page if (page > 0) { - layout.slot(45, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.accessory.previous_page", Material.ARROW, 1), + layout.slot(45, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.accessory.previous_page", Material.ARROW, 1), (click, c) -> c.session(AccessoryBagState.class).update(s -> s.withPage(s.page() - 1))); } // Next page if (page < totalPages - 1) { - layout.slot(53, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.accessory.next_page", Material.ARROW, 1), + layout.slot(53, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.accessory.next_page", Material.ARROW, 1), (click, c) -> c.session(AccessoryBagState.class).update(s -> s.withPage(s.page() + 1))); } } @@ -125,7 +126,7 @@ public boolean onBottomClick(net.swofty.type.generic.gui.v2.context.ClickContext return true; } - player.sendMessage(I18n.string("gui_sbmenu.bags.accessory.msg.cannot_put", player.getLocale())); + player.sendMessage(I18n.t("gui_sbmenu.bags.accessory.msg.cannot_put")); return false; } @@ -189,4 +190,4 @@ public AccessoryBagState withPage(int newPage) { return new AccessoryBagState(newPage); } } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIQuiver.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIQuiver.java index a704563f5..077fbfb25 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIQuiver.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIQuiver.java @@ -1,17 +1,21 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.bags; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.StatefulView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; +import net.swofty.type.generic.gui.v2.ViewSession; import net.swofty.type.generic.gui.v2.context.ViewContext; +import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.collection.CustomCollectionAward; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointQuiver; import net.swofty.type.skyblockgeneric.item.SkyBlockItem; import net.swofty.type.skyblockgeneric.item.updater.PlayerItemUpdater; -import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.Map; @@ -51,8 +55,8 @@ public void layout(ViewLayout layout, QuiverState state, ViewContex for (int i = 0; i < entry.getValue(); i++) { int slotIndex = i + rawAmountOfSlots; if (slotIndex < 36) { - layout.slot(slotIndex, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.quiver.locked_slot", Material.RED_STAINED_GLASS_PANE, 1, - "gui_sbmenu.bags.quiver.locked_slot.lore", Map.of("upgrade_name", entry.getKey().getDisplay()))); + layout.slot(slotIndex, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.quiver.locked_slot", Material.RED_STAINED_GLASS_PANE, 1, + "gui_sbmenu.bags.quiver.locked_slot.lore", Component.text(entry.getKey().getDisplay()))); } } rawAmountOfSlots += entry.getValue(); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUISack.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUISack.java index 2b955e409..fc67e1d14 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUISack.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUISack.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.bags; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.inventory.click.Click; import net.minestom.server.item.ItemStack; @@ -8,20 +9,22 @@ import net.swofty.commons.skyblock.item.ItemType; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.StatefulView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ClickContext; import net.swofty.type.generic.gui.v2.context.ViewContext; +import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.item.SkyBlockItem; import net.swofty.type.skyblockgeneric.item.components.SackComponent; import net.swofty.type.skyblockgeneric.item.updater.PlayerItemUpdater; -import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUISack implements StatefulView { private final ItemType itemTypeLinker; @@ -84,7 +87,7 @@ public void layout(ViewLayout layout, SackState state, ViewContext ct }; if (!closeGUIButton) { - layout.slot(backSlot, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.sack.go_back", Material.ARROW, 1, + layout.slot(backSlot, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.sack.go_back", Material.ARROW, 1, "gui_sbmenu.bags.sack.go_back.lore"), (click, c) -> c.player().openView(new GUISackOfSacks())); } else { @@ -119,11 +122,7 @@ public void layout(ViewLayout layout, SackState state, ViewContext ct Integer amount = p.getSackItems().getAmount(linker); String color = (amount == finalMaxStorage) ? "§a" : "§e"; lore.add(""); - lore.add(I18n.string("gui_sbmenu.bags.sack.stored", l, Map.of( - "color", color, - "amount", String.valueOf(amount), - "max", StringUtility.shortenNumber(StringUtility.roundTo(finalMaxStorage, 0)) - ))); + lore.add(I18n.string("gui_sbmenu.bags.sack.stored", l, Component.text(color), Component.text(String.valueOf(amount)), Component.text(StringUtility.shortenNumber(StringUtility.roundTo(finalMaxStorage, 0))))); lore.add(""); if (amount != 0) { lore.add(I18n.string("gui_sbmenu.bags.sack.right_click_stack", l)); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUISackOfSacks.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUISackOfSacks.java index 972a9b252..459c627d2 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUISackOfSacks.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUISackOfSacks.java @@ -1,22 +1,26 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.bags; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.inventory.click.Click; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.commons.skyblock.item.ItemType; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.StatefulView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; +import net.swofty.type.generic.gui.v2.ViewSession; import net.swofty.type.generic.gui.v2.context.ClickContext; import net.swofty.type.generic.gui.v2.context.ViewContext; +import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.collection.CustomCollectionAward; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointSackOfSacks; import net.swofty.type.skyblockgeneric.item.SkyBlockItem; import net.swofty.type.skyblockgeneric.item.components.SackComponent; import net.swofty.type.skyblockgeneric.item.updater.PlayerItemUpdater; -import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.Map; @@ -84,13 +88,13 @@ public void layout(ViewLayout layout, SackOfSacksState state, for (int i = totalSlots; i < slotsPerPage; i++) { CustomCollectionAward nextUpgrade = getUpgradeNeededForSlotIndex(i); if (nextUpgrade != null) { - layout.slot(i, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.sack_of_sacks.locked_slot", Material.RED_STAINED_GLASS_PANE, 1, - "gui_sbmenu.bags.sack_of_sacks.locked_slot.lore", Map.of("upgrade_name", nextUpgrade.getDisplay()))); + layout.slot(i, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.sack_of_sacks.locked_slot", Material.RED_STAINED_GLASS_PANE, 1, + "gui_sbmenu.bags.sack_of_sacks.locked_slot.lore", Component.text(nextUpgrade.getDisplay()))); } } // Insert inventory button - layout.slot(38, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.sack_of_sacks.insert_inventory", Material.CHEST, 1, + layout.slot(38, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.sack_of_sacks.insert_inventory", Material.CHEST, 1, "gui_sbmenu.bags.sack_of_sacks.insert_inventory.lore"), (click, c) -> { SkyBlockPlayer p = (SkyBlockPlayer) c.player(); @@ -122,7 +126,7 @@ public boolean onBottomClick(ClickContext click, ViewContext c return true; } - player.sendMessage(I18n.string("gui_sbmenu.bags.sack_of_sacks.msg.cannot_put", player.getLocale())); + player.sendMessage(I18n.t("gui_sbmenu.bags.sack_of_sacks.msg.cannot_put")); return false; } @@ -167,4 +171,4 @@ private boolean isItemAllowed(SkyBlockItem item) { } public record SackOfSacksState(int placeholder) {} -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIYourBags.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIYourBags.java index baf344456..88be90e96 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIYourBags.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/bags/GUIYourBags.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.bags; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; import net.swofty.commons.StringUtility; @@ -13,8 +14,6 @@ import net.swofty.type.skyblockgeneric.collection.CustomCollectionAward; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.Map; - public class GUIYourBags extends StatelessView { @Override @@ -32,43 +31,43 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont // Sack of Sacks if (player.hasCustomCollectionAward(CustomCollectionAward.SACK_OF_SACKS)) { - layout.slot(20, (s, c) -> TranslatableItemStackCreator.getStackHead(c.player(), "gui_sbmenu.bags.sack_of_sacks.unlocked", + layout.slot(20, (s, c) -> TranslatableItemStackCreator.getStackHead("gui_sbmenu.bags.sack_of_sacks.unlocked", "80a077e248d142772ea800864f8c578b9d36885b29daf836b64a706882b6ec10", 1, "gui_sbmenu.bags.sack_of_sacks.unlocked.lore"), (click, c) -> c.player().openView(new GUISackOfSacks())); } else { - layout.slot(20, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.sack_of_sacks.locked", Material.GRAY_DYE, 1, + layout.slot(20, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.sack_of_sacks.locked", Material.GRAY_DYE, 1, "gui_sbmenu.bags.sack_of_sacks.locked.lore")); } // Fishing Bag if (player.hasCustomCollectionAward(CustomCollectionAward.FISHING_BAG)) { - layout.slot(21, (s, c) -> TranslatableItemStackCreator.getStackHead(c.player(), "gui_sbmenu.bags.fishing_bag.unlocked", + layout.slot(21, (s, c) -> TranslatableItemStackCreator.getStackHead("gui_sbmenu.bags.fishing_bag.unlocked", "eb8e297df6b8dffcf135dba84ec792d420ad8ecb458d144288572a84603b1631", 1, "gui_sbmenu.bags.fishing_bag.unlocked.lore")); } else { - layout.slot(21, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.fishing_bag.locked", Material.GRAY_DYE, 1, + layout.slot(21, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.fishing_bag.locked", Material.GRAY_DYE, 1, "gui_sbmenu.bags.fishing_bag.locked.lore")); } // Potion Bag if (player.hasCustomCollectionAward(CustomCollectionAward.POTION_BAG)) { - layout.slot(22, (s, c) -> TranslatableItemStackCreator.getStackHead(c.player(), "gui_sbmenu.bags.potion_bag.unlocked", + layout.slot(22, (s, c) -> TranslatableItemStackCreator.getStackHead("gui_sbmenu.bags.potion_bag.unlocked", "9f8b82427b260d0a61e6483fc3b2c35a585851e08a9a9df372548b4168cc817c", 1, "gui_sbmenu.bags.potion_bag.unlocked.lore")); } else { - layout.slot(22, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.potion_bag.locked", Material.GRAY_DYE, 1, + layout.slot(22, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.potion_bag.locked", Material.GRAY_DYE, 1, "gui_sbmenu.bags.potion_bag.locked.lore")); } // Quiver if (player.hasCustomCollectionAward(CustomCollectionAward.QUIVER)) { - layout.slot(23, (s, c) -> TranslatableItemStackCreator.getStackHead(c.player(), "gui_sbmenu.bags.quiver.unlocked", + layout.slot(23, (s, c) -> TranslatableItemStackCreator.getStackHead("gui_sbmenu.bags.quiver.unlocked", "396ce13ff6155fdf3235d8d22174c5de4bf5512f1adeda1afa3fc28180f3f7", 1, "gui_sbmenu.bags.quiver.unlocked.lore"), (click, c) -> c.player().openView(new GUIQuiver())); } else { - layout.slot(23, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.quiver.locked", Material.GRAY_DYE, 1, + layout.slot(23, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.quiver.locked", Material.GRAY_DYE, 1, "gui_sbmenu.bags.quiver.locked.lore")); } @@ -76,14 +75,13 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (player.hasCustomCollectionAward(CustomCollectionAward.ACCESSORY_BAG)) { layout.slot(24, (s, c) -> { SkyBlockPlayer p = (SkyBlockPlayer) c.player(); - return TranslatableItemStackCreator.getStackHead(c.player(), "gui_sbmenu.bags.accessory_bag.unlocked", + return TranslatableItemStackCreator.getStackHead("gui_sbmenu.bags.accessory_bag.unlocked", "396ce13ff6155fdf3235d8d22174c5de4bf5512f1adeda1afa3fc28180f3f7", 1, - "gui_sbmenu.bags.accessory_bag.unlocked.lore", Map.of( - "magical_power", StringUtility.commaify(p.getMagicalPower()) - )); + "gui_sbmenu.bags.accessory_bag.unlocked.lore", + Component.text(StringUtility.commaify(p.getMagicalPower()))); }, (click, c) -> c.player().openView(new GUIAccessoryBag())); } else { - layout.slot(24, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.bags.accessory_bag.locked", Material.GRAY_DYE, 1, + layout.slot(24, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.bags.accessory_bag.locked", Material.GRAY_DYE, 1, "gui_sbmenu.bags.accessory_bag.locked.lore")); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUILevelsGuide.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUILevelsGuide.java index 27b57fd69..a8891a06b 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUILevelsGuide.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUILevelsGuide.java @@ -1,11 +1,16 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.levels; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; import net.swofty.commons.StringUtility; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.levels.LevelsGuide; @@ -14,7 +19,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUILevelsGuide extends StatelessView { private final LevelsGuide guide; @@ -36,7 +40,7 @@ public GUILevelsGuide(LevelsGuide guide) { @Override public ViewConfiguration configuration() { return ViewConfiguration.withString( - (state, ctx) -> I18n.string("gui_sbmenu.levels.guide.title", ctx.player().getLocale(), Map.of("guide_name", StringUtility.toNormalCase(guide.name()))), + (state, ctx) -> I18n.string("gui_sbmenu.levels.guide.title", ctx.player().getLocale(), Component.text(StringUtility.toNormalCase(guide.name()))), InventoryType.CHEST_6_ROW); } @@ -51,7 +55,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont } // Guide info - layout.slot(50, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.levels.guide.info", Material.REDSTONE_TORCH, 1, + layout.slot(50, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.levels.guide.info", Material.REDSTONE_TORCH, 1, "gui_sbmenu.levels.guide.info.lore")); // Task items @@ -66,7 +70,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont List lore = new ArrayList<>(); if (task.getCauses().size() > 1) { - lore.add(I18n.string("gui_sbmenu.levels.guide.tasks", l, Map.of("count", String.valueOf(task.getCauses().size())))); + lore.add(I18n.string("gui_sbmenu.levels.guide.tasks", l, Component.text(String.valueOf(task.getCauses().size())))); lore.add(""); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUISkyBlockLevel.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUISkyBlockLevel.java index 647f96d99..419543b61 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUISkyBlockLevel.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUISkyBlockLevel.java @@ -1,7 +1,12 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.levels; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.levels.SkyBlockLevelRequirement; @@ -32,7 +37,7 @@ public GUISkyBlockLevel(SkyBlockLevelRequirement levelRequirement) { @Override public ViewConfiguration configuration() { return ViewConfiguration.withString( - (state, ctx) -> I18n.string("gui_sbmenu.levels.level.title", ctx.player().getLocale(), Map.of("level", String.valueOf(levelRequirement.asInt()))), + (state, ctx) -> I18n.string("gui_sbmenu.levels.level.title", ctx.player().getLocale(), Component.text(String.valueOf(levelRequirement.asInt()))), InventoryType.CHEST_4_ROW); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUISkyBlockLevels.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUISkyBlockLevels.java index 63580e540..df34b583e 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUISkyBlockLevels.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/GUISkyBlockLevels.java @@ -1,11 +1,16 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.levels; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; import net.swofty.type.generic.data.datapoints.DatapointToggles; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.levels.emblem.GUIEmblems; @@ -18,7 +23,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUISkyBlockLevels extends StatelessView { @@ -39,11 +43,11 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont Locale l = player.getLocale(); String status = player.getToggles().get(DatapointToggles.Toggles.ToggleType.SKYBLOCK_LEVELS_IN_CHAT) ? I18n.string("gui_sbmenu.levels.main.chat_toggle.enabled", l) : I18n.string("gui_sbmenu.levels.main.chat_toggle.disabled", l); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.levels.main.chat_toggle", + return TranslatableItemStackCreator.getStack("gui_sbmenu.levels.main.chat_toggle", player.getToggles().get(DatapointToggles.Toggles.ToggleType.SKYBLOCK_LEVELS_IN_CHAT) ? Material.LIME_DYE : Material.GRAY_DYE, 1, - "gui_sbmenu.levels.main.chat_toggle.lore", Map.of("status", status)); + "gui_sbmenu.levels.main.chat_toggle.lore", Component.text(status)); }, (click, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); Locale l = player.getLocale(); @@ -65,8 +69,8 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont display.append(displayList.get(j)); if (j < displayList.size() - 1) display.append("\n"); } - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.levels.main.level_rewards", Material.CHEST, 1, - "gui_sbmenu.levels.main.level_rewards.lore", Map.of("display", display.toString())); + return TranslatableItemStackCreator.getStack("gui_sbmenu.levels.main.level_rewards", Material.CHEST, 1, + "gui_sbmenu.levels.main.level_rewards.lore", Component.text(display.toString())); }, (click, c) -> c.player().openView(new GUILevelRewards())); // Your SkyBlock Level Ranking @@ -76,21 +80,21 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont int completedChallenges = player.getSkyBlockExperience().getCompletedExperienceCauses().size(); int totalChallenges = SkyBlockLevelCause.getAmountOfCauses(); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.levels.main.ranking", + return TranslatableItemStackCreator.getStack("gui_sbmenu.levels.main.ranking", Material.PAINTING, 1, - "gui_sbmenu.levels.main.ranking.lore", Map.of( - "level_display", level.getColor() + level.toString(), - "xp", String.valueOf(Math.round(player.getSkyBlockExperience().getTotalXP())), - "percent", new java.text.DecimalFormat("##.##").format((double) completedChallenges / totalChallenges * 100))); + "gui_sbmenu.levels.main.ranking.lore", + Component.text(level.getColor() + level.toString()), + Component.text(String.valueOf(Math.round(player.getSkyBlockExperience().getTotalXP()))), + Component.text(new java.text.DecimalFormat("##.##").format((double) completedChallenges / totalChallenges * 100))); }); // SkyBlock Guide - layout.slot(25, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.levels.main.guide", Material.FILLED_MAP, 1, + layout.slot(25, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.levels.main.guide", Material.FILLED_MAP, 1, "gui_sbmenu.levels.main.guide.lore"), (click, c) -> c.player().openView(new GUILevelsGuide(LevelsGuide.STARTER))); // Prefix Emblems - layout.slot(43, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.levels.main.emblems", Material.NAME_TAG, 1, + layout.slot(43, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.levels.main.emblems", Material.NAME_TAG, 1, "gui_sbmenu.levels.main.emblems.lore"), (click, c) -> c.player().openView(new GUIEmblems())); @@ -136,7 +140,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont } lore.add(I18n.string("gui_sbmenu.levels.main.click_to_view", l)); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.levels.main.level", l, Map.of("level", String.valueOf(level.asInt()))), material, 1, lore); + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.levels.main.level", l, Component.text(String.valueOf(level.asInt()))), material, 1, lore); }, (click, c) -> c.player().openView(new GUISkyBlockLevel(level))); } @@ -152,13 +156,11 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont lore.add(I18n.string("gui_sbmenu.levels.main.rewards", l)); currentMilestone.getUnlocks().forEach(unlock -> lore.addAll(unlock.getDisplay(p, currentMilestone.asInt()))); lore.add(" "); - lore.add(I18n.string("gui_sbmenu.levels.main.xp_left", l, Map.of( - "xp", String.valueOf((long) (currentMilestone.getCumulativeExperience() - p.getSkyBlockExperience().getTotalXP())), - "percent", String.valueOf((int) (p.getSkyBlockExperience().getTotalXP() / currentMilestone.getCumulativeExperience() * 100))))); + lore.add(I18n.string("gui_sbmenu.levels.main.xp_left", l, Component.text(String.valueOf((long) (currentMilestone.getCumulativeExperience() - p.getSkyBlockExperience().getTotalXP()))), Component.text(String.valueOf((int) (p.getSkyBlockExperience().getTotalXP() / currentMilestone.getCumulativeExperience() * 100))))); lore.add(" "); lore.add(I18n.string("gui_sbmenu.levels.main.click_to_view", l)); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.levels.main.level", l, Map.of("level", String.valueOf(currentMilestone.asInt()))), Material.PURPLE_STAINED_GLASS_PANE, 1, lore); + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.levels.main.level", l, Component.text(String.valueOf(currentMilestone.asInt()))), Material.PURPLE_STAINED_GLASS_PANE, 1, lore); }, (click, c) -> c.player().openView(new GUISkyBlockLevel(currentMilestone))); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/rewards/GUILevelRewards.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/rewards/GUILevelRewards.java index a1fef09da..8f52135b5 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/rewards/GUILevelRewards.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/levels/rewards/GUILevelRewards.java @@ -1,10 +1,14 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.levels.rewards; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointSkyBlockExperience; @@ -37,8 +41,8 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont SkyBlockPlayer player = (SkyBlockPlayer) c.player(); Locale l = player.getLocale(); DatapointSkyBlockExperience.PlayerSkyBlockExperience experience = player.getSkyBlockExperience(); - List lore = new ArrayList<>(); - lore.addAll(I18n.lore("gui_sbmenu.levels.rewards.feature.lore", l)); + List lore = new ArrayList<>(); + lore.addAll(List.of(I18n.iterable("gui_sbmenu.levels.rewards.feature.lore"))); lore.add(" "); lore.add(I18n.string("gui_sbmenu.levels.rewards.next_reward", l)); @@ -47,7 +51,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont lore.add(I18n.string("gui_sbmenu.levels.rewards.no_more", l)); } else { nextAward.getValue().forEach(award -> lore.add("§7" + award.getDisplay())); - lore.add(I18n.string("gui_sbmenu.levels.rewards.at_level", l, Map.of("level", String.valueOf(nextAward.getKey())))); + lore.add(I18n.string("gui_sbmenu.levels.rewards.at_level", l, Component.text(String.valueOf(nextAward.getKey())))); } lore.add(" "); @@ -56,15 +60,15 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont lore.add(" "); lore.add(I18n.string("gui_sbmenu.levels.rewards.click_to_view", l)); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.levels.rewards.feature", Material.NETHER_STAR, 1, lore); + return TranslatableItemStackCreator.getStack("gui_sbmenu.levels.rewards.feature", Material.NETHER_STAR, 1, lore); }, (click, c) -> c.player().openView(new GUILevelFeatureRewards())); // Prefix Color Rewards layout.slot(12, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); Locale l = player.getLocale(); - List lore = new ArrayList<>(); - lore.addAll(I18n.lore("gui_sbmenu.levels.rewards.prefix.lore", l)); + List lore = new ArrayList<>(); + lore.addAll(List.of(I18n.iterable("gui_sbmenu.levels.rewards.prefix.lore"))); lore.add(" "); lore.add(I18n.string("gui_sbmenu.levels.rewards.next_reward", l)); @@ -74,7 +78,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont lore.add(I18n.string("gui_sbmenu.levels.rewards.no_more", l)); } else { lore.add(nextPrefix.getValue() + nextPrefix.getKey().getPrefixDisplay()); - lore.add(I18n.string("gui_sbmenu.levels.rewards.at_level", l, Map.of("level", String.valueOf(nextPrefix.getKey().asInt())))); + lore.add(I18n.string("gui_sbmenu.levels.rewards.at_level", l, Component.text(String.valueOf(nextPrefix.getKey().asInt())))); } lore.add(" "); lore.addAll(getAsDisplay( @@ -84,15 +88,15 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont lore.add(" "); lore.add(I18n.string("gui_sbmenu.levels.rewards.click_to_view", l)); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.levels.rewards.prefix", Material.GRAY_DYE, 1, lore); + return TranslatableItemStackCreator.getStack("gui_sbmenu.levels.rewards.prefix", Material.GRAY_DYE, 1, lore); }, (click, c) -> c.player().openView(new GUILevelPrefixRewards())); // Emblem Rewards layout.slot(13, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); Locale l = player.getLocale(); - List lore = new ArrayList<>(); - lore.addAll(I18n.lore("gui_sbmenu.levels.rewards.emblem.lore", l)); + List lore = new ArrayList<>(); + lore.addAll(List.of(I18n.iterable("gui_sbmenu.levels.rewards.emblem.lore"))); lore.add(" "); lore.add(I18n.string("gui_sbmenu.levels.rewards.next_reward", l)); @@ -108,7 +112,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont lore.add(I18n.string("gui_sbmenu.levels.rewards.no_more", l)); } else { lore.add("§f" + nextEmblem.displayName() + " " + nextEmblem.emblem()); - lore.add(I18n.string("gui_sbmenu.levels.rewards.at_level", l, Map.of("level", String.valueOf(((LevelCause) nextEmblem.cause()).getLevel())))); + lore.add(I18n.string("gui_sbmenu.levels.rewards.at_level", l, Component.text(String.valueOf(((LevelCause) nextEmblem.cause()).getLevel())))); } lore.add(" "); @@ -119,7 +123,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont lore.add(" "); lore.add(I18n.string("gui_sbmenu.levels.rewards.click_to_view", l)); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.levels.rewards.emblem", Material.NAME_TAG, 1, lore); + return TranslatableItemStackCreator.getStack("gui_sbmenu.levels.rewards.emblem", Material.NAME_TAG, 1, lore); }, (click, c) -> c.player().openView(new GUILevelEmblemRewards())); // Statistic Rewards @@ -127,8 +131,9 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont SkyBlockPlayer player = (SkyBlockPlayer) c.player(); SkyBlockLevelRequirement nextLevel = player.getSkyBlockExperience().getLevel().getNextLevel(); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.levels.rewards.statistic", Material.DIAMOND_HELMET, 1, - "gui_sbmenu.levels.rewards.statistic.lore", Map.of("next_level", nextLevel == null ? "§cMAX" : String.valueOf(nextLevel.asInt()))); + return TranslatableItemStackCreator.getStack("gui_sbmenu.levels.rewards.statistic", Material.DIAMOND_HELMET, 1, + "gui_sbmenu.levels.rewards.statistic.lore", + Component.text(nextLevel == null ? "§cMAX" : String.valueOf(nextLevel.asInt()))); }); } @@ -152,7 +157,7 @@ public static List getAsDisplay(int unlocked, int total) { List toReturn = new ArrayList<>(); String unlockedPercentage = String.format("%.2f", (unlocked / (double) total) * 100); - toReturn.add(I18n.string("gui_sbmenu.levels.rewards.unlocked", Map.of("percent", unlockedPercentage))); + toReturn.add(I18n.string("gui_sbmenu.levels.rewards.unlocked", Component.text(unlockedPercentage))); String baseLoadingBar = "─────────────────"; int maxBarLength = baseLoadingBar.length(); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileCreate.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileCreate.java index f799d3139..d3c51eeb0 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileCreate.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileCreate.java @@ -1,6 +1,7 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.profiles; import lombok.SneakyThrows; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; import net.swofty.commons.ServerType; @@ -11,7 +12,11 @@ import net.swofty.type.generic.event.actions.data.ActionPlayerDataSave; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; @@ -19,7 +24,6 @@ import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import org.bson.Document; -import java.util.Map; import java.util.UUID; public class GUIProfileCreate extends StatelessView { @@ -36,8 +40,8 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont String profileName = SkyBlockPlayerProfiles.getRandomName(); - layout.slot(11, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profiles.create.confirm", Material.GREEN_TERRACOTTA, 1, - "gui_sbmenu.profiles.create.confirm.lore", Map.of("profile_name", profileName)), + layout.slot(11, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.profiles.create.confirm", Material.GREEN_TERRACOTTA, 1, + "gui_sbmenu.profiles.create.confirm.lore", Component.text(profileName)), (click, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); SkyBlockPlayerProfiles profiles = player.getProfiles(); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileManagement.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileManagement.java index 8141403a0..75392d6cd 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileManagement.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileManagement.java @@ -1,18 +1,23 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.profiles; import lombok.SneakyThrows; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; -import net.swofty.commons.skyblock.SkyBlockPlayerProfiles; import net.swofty.commons.StringUtility; +import net.swofty.commons.skyblock.SkyBlockPlayerProfiles; import net.swofty.type.generic.data.datapoints.DatapointBoolean; import net.swofty.type.generic.data.datapoints.DatapointDouble; +import net.swofty.type.generic.data.datapoints.DatapointLong; import net.swofty.type.generic.data.datapoints.DatapointString; import net.swofty.type.generic.data.mongodb.ProfilesDatabase; -import net.swofty.type.generic.data.datapoints.DatapointLong; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; @@ -50,7 +55,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (profileIds.size() <= profileCount) { // Empty profile slot - layout.slot(slot, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profiles.empty_slot", Material.OAK_BUTTON, 1, + layout.slot(slot, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.profiles.empty_slot", Material.OAK_BUTTON, 1, "gui_sbmenu.profiles.empty_slot.lore"), (click, c) -> c.player().openView(new GUIProfileSelectMode())); continue; @@ -83,13 +88,13 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont lore.add(I18n.string("gui_sbmenu.profiles.selected.playing", l)); String profileName = finalDataHandler.get(SkyBlockDataHandler.Data.PROFILE_NAME, DatapointString.class).getValue(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.profiles.selected", l, java.util.Map.of("profile_name", profileName)), Material.EMERALD_BLOCK, 1, lore); + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.profiles.selected", l, Component.text(profileName)), Material.EMERALD_BLOCK, 1, lore); }, (click, c) -> { SkyBlockPlayer p = (SkyBlockPlayer) c.player(); Locale l = p.getLocale(); String profileName = finalDataHandler.get(SkyBlockDataHandler.Data.PROFILE_NAME, DatapointString.class).getValue(); - p.sendMessage(I18n.string("gui_sbmenu.profiles.msg.playing_on", l, java.util.Map.of("profile_name", profileName))); - p.sendMessage(I18n.string("gui_sbmenu.profiles.msg.switch_first", l)); + p.sendMessage(I18n.t("gui_sbmenu.profiles.msg.playing_on", Component.text(profileName))); + p.sendMessage(I18n.t("gui_sbmenu.profiles.msg.switch_first")); }); } else { layout.slot(slot, (s, c) -> { @@ -101,7 +106,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont lore.add(I18n.string("gui_sbmenu.profiles.unselected.click", l)); String profileName = finalDataHandler.get(SkyBlockDataHandler.Data.PROFILE_NAME, DatapointString.class).getValue(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.profiles.unselected", l, java.util.Map.of("profile_name", profileName)), Material.GRASS_BLOCK, 1, lore); + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.profiles.unselected", l, Component.text(profileName)), Material.GRASS_BLOCK, 1, lore); }, (click, c) -> c.player().openView(new GUIProfileSelect(profileId))); } } @@ -125,13 +130,13 @@ public static List updateLore(UUID playerUuid, SkyBlockDataHandler handl Double coins = handler.get(SkyBlockDataHandler.Data.COINS, DatapointDouble.class).getValue(); if (coins > 0) { - lore.add(I18n.string("gui_sbmenu.profiles.purse_coins", java.util.Map.of("coins", String.valueOf(coins)))); + lore.add(I18n.string("gui_sbmenu.profiles.purse_coins", Component.text(String.valueOf(coins)))); } Long createdTime = handler.get(SkyBlockDataHandler.Data.CREATED, DatapointLong.class).getValue(); String age = StringUtility.profileAge(System.currentTimeMillis() - createdTime); - lore.add(I18n.string("gui_sbmenu.profiles.age", java.util.Map.of("age", age))); + lore.add(I18n.string("gui_sbmenu.profiles.age", Component.text(age))); return lore; } -} \ No newline at end of file +} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileSelect.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileSelect.java index 40cbbb789..885bebed8 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileSelect.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileSelect.java @@ -1,6 +1,7 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.profiles; import com.mongodb.client.model.Filters; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; import net.swofty.commons.ServerType; @@ -9,17 +10,18 @@ import net.swofty.type.generic.data.mongodb.ProfilesDatabase; import net.swofty.type.generic.data.mongodb.UserDatabase; import net.swofty.type.generic.event.actions.data.ActionPlayerDataSave; -import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; +import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; import net.swofty.type.skyblockgeneric.data.monogdb.CoopDatabase; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import net.swofty.type.generic.i18n.I18n; - -import java.util.Map; import java.util.UUID; public class GUIProfileSelect extends StatelessView { @@ -51,8 +53,10 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont switchingTo = "Unknown"; } - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profiles.select.switch", Material.GRASS_BLOCK, 1, - "gui_sbmenu.profiles.select.switch.lore", Map.of("current", currentProfile, "switching_to", switchingTo)); + return TranslatableItemStackCreator.getStack("gui_sbmenu.profiles.select.switch", Material.GRASS_BLOCK, 1, + "gui_sbmenu.profiles.select.switch.lore", + Component.text(currentProfile), + Component.text(switchingTo)); }, (click, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); SkyBlockPlayerProfiles profiles = player.getProfiles(); @@ -69,14 +73,14 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont }); // Delete Profile - layout.slot(15, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profiles.select.delete", Material.RED_STAINED_GLASS, 1, + layout.slot(15, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.profiles.select.delete", Material.RED_STAINED_GLASS, 1, "gui_sbmenu.profiles.select.delete.lore"), (click, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); java.util.Locale l = player.getLocale(); if (CoopDatabase.getFromMemberProfile(profileUuid) != null) { - player.sendMessage(I18n.string("gui_sbmenu.profiles.select.msg.cannot_delete_coop", l)); - player.sendMessage(I18n.string("gui_sbmenu.profiles.select.msg.coop_leave", l)); + player.sendMessage(I18n.t("gui_sbmenu.profiles.select.msg.cannot_delete_coop")); + player.sendMessage(I18n.t("gui_sbmenu.profiles.select.msg.coop_leave")); return; } @@ -85,10 +89,9 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont try { SkyBlockDataHandler handler = SkyBlockDataHandler.createFromProfileOnly(new ProfilesDatabase(profileUuid.toString()).getDocument()); - player.sendMessage(I18n.string("gui_sbmenu.profiles.select.msg.deleted", l, Map.of("profile_name", - handler.get(SkyBlockDataHandler.Data.PROFILE_NAME, DatapointString.class).getValue()))); + player.sendMessage(I18n.t("gui_sbmenu.profiles.select.msg.deleted", Component.text(handler.get(SkyBlockDataHandler.Data.PROFILE_NAME, DatapointString.class).getValue()))); } catch (Exception e) { - player.sendMessage(I18n.string("gui_sbmenu.profiles.select.msg.deleted_generic", l)); + player.sendMessage(I18n.t("gui_sbmenu.profiles.select.msg.deleted_generic")); } ProfilesDatabase.collection.deleteOne(Filters.eq("_id", profileUuid.toString())); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileSelectMode.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileSelectMode.java index b3a8e17d5..f492ede51 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileSelectMode.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/profiles/GUIProfileSelectMode.java @@ -3,7 +3,11 @@ import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; @@ -19,12 +23,12 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont Components.fill(layout); Components.back(layout, 31, ctx); - layout.slot(11, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profiles.mode.classic", Material.GRASS_BLOCK, 1, + layout.slot(11, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.profiles.mode.classic", Material.GRASS_BLOCK, 1, "gui_sbmenu.profiles.mode.classic.lore"), (click, c) -> c.player().openView(new GUIProfileCreate())); - layout.slot(15, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.profiles.mode.special", Material.BLAZE_POWDER, 1, + layout.slot(15, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.profiles.mode.special", Material.BLAZE_POWDER, 1, "gui_sbmenu.profiles.mode.special.lore"), - (click, c) -> c.player().sendMessage(I18n.string("gui_sbmenu.profiles.mode.msg.unavailable", c.player().getLocale()))); + (click, c) -> c.player().sendMessage(I18n.t("gui_sbmenu.profiles.mode.msg.unavailable"))); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIFairySoulsGuide.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIFairySoulsGuide.java index 2ab90e388..e03100b5e 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIFairySoulsGuide.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIFairySoulsGuide.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.questlog; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.v2.Components; @@ -9,13 +10,10 @@ import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; - -import java.util.Locale; -import net.swofty.type.skyblockgeneric.data.monogdb.FairySoulDatabase; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import net.swofty.type.skyblockgeneric.user.fairysouls.FairySoulZone; -import java.util.Map; +import java.util.Locale; public class GUIFairySoulsGuide extends StatelessView { private static final int[] LOCATION_SLOTS = { @@ -51,12 +49,12 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont player.getFairySoulHandler().getMax(FairySoulZone.MISC_GLACITE_MINESHAFTS); return ItemStackCreator.getStackHead(I18n.string("gui_sbmenu.questlog.fairy_souls_guide.miscellaneous", l), "126ec1ca185b47aad39f931db8b0a8500ded86a127a204886ed4b3783ad1775c", 1, - I18n.string("gui_sbmenu.questlog.fairy_souls_guide.fairy_souls_count", l, Map.of("found", String.valueOf(obtainedSouls), "total", String.valueOf(totalSouls))), - I18n.string("gui_sbmenu.questlog.fairy_souls_guide.dungeons", l, Map.of("count", String.valueOf(player.getFairySoulHandler().getMax(FairySoulZone.MISC_DUNGEONS)))), - I18n.string("gui_sbmenu.questlog.fairy_souls_guide.fishing", l, Map.of("count", String.valueOf(player.getFairySoulHandler().getMax(FairySoulZone.MISC_FISHING)))), - I18n.string("gui_sbmenu.questlog.fairy_souls_guide.garden", l, Map.of("count", String.valueOf(player.getFairySoulHandler().getMax(FairySoulZone.MISC_GARDEN)))), - I18n.string("gui_sbmenu.questlog.fairy_souls_guide.placeable", l, Map.of("count", String.valueOf(player.getFairySoulHandler().getMax(FairySoulZone.MISC_PLACEABLE)))), - I18n.string("gui_sbmenu.questlog.fairy_souls_guide.glacite_mineshafts", l, Map.of("count", String.valueOf(player.getFairySoulHandler().getMax(FairySoulZone.MISC_GLACITE_MINESHAFTS))))); + I18n.string("gui_sbmenu.questlog.fairy_souls_guide.fairy_souls_count", l, Component.text(String.valueOf(obtainedSouls)), Component.text(String.valueOf(totalSouls))), + I18n.string("gui_sbmenu.questlog.fairy_souls_guide.dungeons", l, Component.text(String.valueOf(player.getFairySoulHandler().getMax(FairySoulZone.MISC_DUNGEONS)))), + I18n.string("gui_sbmenu.questlog.fairy_souls_guide.fishing", l, Component.text(String.valueOf(player.getFairySoulHandler().getMax(FairySoulZone.MISC_FISHING)))), + I18n.string("gui_sbmenu.questlog.fairy_souls_guide.garden", l, Component.text(String.valueOf(player.getFairySoulHandler().getMax(FairySoulZone.MISC_GARDEN)))), + I18n.string("gui_sbmenu.questlog.fairy_souls_guide.placeable", l, Component.text(String.valueOf(player.getFairySoulHandler().getMax(FairySoulZone.MISC_PLACEABLE)))), + I18n.string("gui_sbmenu.questlog.fairy_souls_guide.glacite_mineshafts", l, Component.text(String.valueOf(player.getFairySoulHandler().getMax(FairySoulZone.MISC_GLACITE_MINESHAFTS))))); }); FairySouls[] allFairySouls = FairySouls.values(); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIMissionLog.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIMissionLog.java index e88fbfc4c..f049870cf 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIMissionLog.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/questlog/GUIMissionLog.java @@ -1,12 +1,12 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.questlog; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.commons.StringUtility; import net.swofty.type.generic.gui.inventory.ItemStackCreator; import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; -import net.swofty.type.generic.gui.v2.*; import net.swofty.type.generic.gui.v2.Components; import net.swofty.type.generic.gui.v2.DefaultState; import net.swofty.type.generic.gui.v2.StatelessView; @@ -49,7 +49,7 @@ public GUIMissionLog(boolean showCompleted) { @Override public ViewConfiguration configuration() { return ViewConfiguration.withString( - (state, ctx) -> I18n.string("gui_sbmenu.questlog.title", ctx.player().getLocale(), Map.of("suffix", showCompleted ? "(Completed)" : "")), + (state, ctx) -> I18n.string("gui_sbmenu.questlog.title", ctx.player().getLocale(), Component.text(showCompleted ? "(Completed)" : "")), InventoryType.CHEST_6_ROW); } @@ -61,30 +61,30 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(4, (s, c) -> { Locale l = c.player().getLocale(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.questlog.info", l, Map.of("suffix", showCompleted ? "(Completed)" : "")), - Material.WRITABLE_BOOK, 1, I18n.lore("gui_sbmenu.questlog.info.lore", l)); + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.questlog.info", l, Component.text(showCompleted ? "(Completed)" : "")), + Material.WRITABLE_BOOK, 1, I18n.iterable("gui_sbmenu.questlog.info.lore")); }); // Fairy Souls layout.slot(10, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); - return TranslatableItemStackCreator.getStackHead(c.player(), "gui_sbmenu.questlog.fairy_souls", + return TranslatableItemStackCreator.getStackHead("gui_sbmenu.questlog.fairy_souls", "b96923ad247310007f6ae5d326d847ad53864cf16c3565a181dc8e6b20be2387", 1, - "gui_sbmenu.questlog.fairy_souls.lore", Map.of("found", String.valueOf(player.getFairySoulHandler().getTotalFoundFairySouls()), "total", String.valueOf(FairySoulDatabase.getAllSouls().size()))); + "gui_sbmenu.questlog.fairy_souls.lore", Component.text(String.valueOf(player.getFairySoulHandler().getTotalFoundFairySouls())), Component.text(String.valueOf(FairySoulDatabase.getAllSouls().size()))); }, (_, c) -> { c.push(new GUIFairySoulsGuide()); }); // Toggle completed/ongoing if (showCompleted) { - layout.slot(50, (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.questlog.ongoing_quests", Material.BOOK, 1, + layout.slot(50, (s, c) -> TranslatableItemStackCreator.getStack("gui_sbmenu.questlog.ongoing_quests", Material.BOOK, 1, "gui_sbmenu.questlog.ongoing_quests.lore"), (click, c) -> c.replace(new GUIMissionLog(false))); } else { layout.slot(50, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); - return TranslatableItemStackCreator.getStack(c.player(), "gui_sbmenu.questlog.completed_quests", Material.BOOK, 1, - "gui_sbmenu.questlog.completed_quests.lore", Map.of("count", String.valueOf(player.getMissionData().getCompletedMissions().size()))); + return TranslatableItemStackCreator.getStack("gui_sbmenu.questlog.completed_quests", Material.BOOK, 1, + "gui_sbmenu.questlog.completed_quests.lore", Component.text(String.valueOf(player.getMissionData().getCompletedMissions().size()))); }, (_, c) -> c.replace(new GUIMissionLog(true))); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIMinionRecipes.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIMinionRecipes.java index 31126eb65..fa3d487ac 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIMinionRecipes.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIMinionRecipes.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.recipe; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.swofty.commons.StringUtility; import net.swofty.commons.skyblock.item.attribute.attributes.ItemAttributeMinionData; @@ -35,7 +36,7 @@ public GUIMinionRecipes(MinionRegistry minionRegistry) { @Override public ViewConfiguration configuration() { return ViewConfiguration.withString( - (state, ctx) -> I18n.string("gui_sbmenu.recipe.minion.title", ctx.player().getLocale(), Map.of("minion_name", StringUtility.toNormalCase(minionRegistry.toString()))), + (state, ctx) -> I18n.string("gui_sbmenu.recipe.minion.title", ctx.player().getLocale(), Component.text(StringUtility.toNormalCase(minionRegistry.toString()))), InventoryType.CHEST_6_ROW); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipe.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipe.java index f118522ff..c7122bc38 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipe.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipe.java @@ -8,7 +8,11 @@ import net.minestom.server.item.Material; import net.swofty.commons.skyblock.item.ItemType; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.item.SkyBlockItem; @@ -43,8 +47,8 @@ public GUIRecipe(SkyBlockItem item, int recipeIndex) { public ViewConfiguration configuration() { ItemType type = item.getAttributeHandler().getPotentialType(); String name = type != null ? type.getDisplayName() : "Unknown"; - return ViewConfiguration.withString( - (state, ctx) -> I18n.string("gui_sbmenu.recipe.view.title", ctx.player().getLocale(), java.util.Map.of("item_name", name)), + return ViewConfiguration.withTitle( + (_, _) -> I18n.t("gui_sbmenu.recipe.view.title", Component.text(name)), InventoryType.CHEST_6_ROW); } @@ -55,11 +59,8 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont Components.close(layout, 49); Components.back(layout, 48, ctx); - layout.slot(23, (s, c) -> { - java.util.Locale l = c.player().getLocale(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.view.crafting_table", l), Material.CRAFTING_TABLE, 1, - I18n.lore("gui_sbmenu.recipe.view.crafting_table.lore", l)); - }); + layout.slot(23, (s, c) -> ItemStackCreator.getStack(I18n.t("gui_sbmenu.recipe.view.crafting_table"), Material.CRAFTING_TABLE, 1, + I18n.iterable("gui_sbmenu.recipe.view.crafting_table.lore"))); ItemType itemTypeLinker = item.getAttributeHandler().getPotentialType(); if (item.toConfigurableItem() == null) { @@ -77,9 +78,8 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont // Next recipe button if (recipes.size() > actualRecipeIndex + 1) { layout.slot(32, (s, c) -> { - java.util.Locale l = c.player().getLocale(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.view.next", l), Material.ARROW, 1, - I18n.lore("gui_sbmenu.recipe.view.next.lore", l)); + return ItemStackCreator.getStack(I18n.t("gui_sbmenu.recipe.view.next"), Material.ARROW, 1, + I18n.iterable("gui_sbmenu.recipe.view.next.lore")); }, (click, c) -> { c.push(new GUIRecipe(item, actualRecipeIndex + 1)); @@ -89,9 +89,8 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont // Previous recipe button if (actualRecipeIndex > 0) { layout.slot(14, (s, c) -> { - java.util.Locale l = c.player().getLocale(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.view.previous", l), Material.ARROW, 1, - I18n.lore("gui_sbmenu.recipe.view.previous.lore", l)); + return ItemStackCreator.getStack(I18n.t("gui_sbmenu.recipe.view.previous"), Material.ARROW, 1, + I18n.iterable("gui_sbmenu.recipe.view.previous.lore")); }, (click, c) -> { c.push(new GUIRecipe(item, actualRecipeIndex - 1)); @@ -120,7 +119,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont List existingLore = builder.build().get(DataComponents.LORE); ArrayList lore = existingLore != null ? new ArrayList<>(existingLore) : new ArrayList<>(); lore.add(Component.text(" ")); - lore.add(Component.text(I18n.string("gui_sbmenu.recipe.view.click_to_view", player.getLocale()))); + lore.add(I18n.t("gui_sbmenu.recipe.view.click_to_view")); builder.set(DataComponents.LORE, lore); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeBook.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeBook.java index 563161d63..12bf8ef13 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeBook.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeBook.java @@ -1,11 +1,16 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.recipe; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; import net.swofty.commons.StringUtility; import net.swofty.type.generic.gui.HypixelSignGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.item.crafting.ShapedRecipe; @@ -14,10 +19,8 @@ import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIRecipeBook extends StatelessView { private static final int[] CATEGORY_SLOTS = { @@ -43,7 +46,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(51, (_, c) -> { Locale l = c.player().getLocale(); return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.search", l), Material.OAK_SIGN, 1, - I18n.lore("gui_sbmenu.recipe.book.search.lore", l)); + I18n.iterable("gui_sbmenu.recipe.book.search.lore")); }, (_, c) -> { new HypixelSignGUI(c.player()).open(new String[]{"Enter query", ""}).thenAccept(line -> { if (line == null) { @@ -65,7 +68,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (j < missionLore.size() - 1) missionDisplay.append("\n"); } return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.info", l), Material.BOOK, 1, - I18n.lore("gui_sbmenu.recipe.book.info.lore", l, Map.of("mission_display", missionDisplay.toString()))); + I18n.iterable("gui_sbmenu.recipe.book.info.lore", Component.text(missionDisplay.toString()))); }); for (int i = 0; i < CATEGORY_SLOTS.length && i < SkyBlockRecipe.RecipeType.values().length; i++) { @@ -102,9 +105,9 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont String progressBar = completedLoadingBar + uncompletedLoadingBar + "§r §e" + allowedRecipes.size() + "§6/§e" + typeRecipes.size(); String categoryName = StringUtility.toNormalCase(type.name()); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.category", l, Map.of("category_name", categoryName)), + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.category", l, Component.text(categoryName)), type.getMaterial(), 1, - I18n.lore("gui_sbmenu.recipe.book.category.lore", l, Map.of("category_name", categoryName, "percent", unlockedPercentage, "progress_bar", progressBar))); + I18n.iterable("gui_sbmenu.recipe.book.category.lore", Component.text(categoryName), Component.text(unlockedPercentage), Component.text(progressBar))); }, (_, c) -> c.push(new GUIRecipeCategory(type), GUIRecipeCategory.createInitialState((SkyBlockPlayer) c.player(), type))); } @@ -148,9 +151,9 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont completedLoadingBar.length() - formattingCodeLength, maxBarLength)); String progressBar = completedLoadingBar + uncompletedLoadingBar + "§r §e" + allowedRecipes.size() + "§6/§e" + typeRecipes.size(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.category", l, Map.of("category_name", categoryName)), + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.category", l, Component.text(categoryName)), type.getMaterial(), 1, - I18n.lore("gui_sbmenu.recipe.book.category.lore", l, Map.of("category_name", categoryName, "percent", unlockedPercentage, "progress_bar", progressBar))); + I18n.iterable("gui_sbmenu.recipe.book.category.lore", Component.text(categoryName), Component.text(unlockedPercentage), Component.text(progressBar))); }, (click, c) -> c.push(new GUIRecipeSlayers())); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeCategory.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeCategory.java index 9d2ed6ed8..d67f1f16f 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeCategory.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeCategory.java @@ -27,7 +27,6 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -49,7 +48,7 @@ public GUIRecipeCategory(SkyBlockRecipe.RecipeType type) { @Override public ViewConfiguration configuration() { return ViewConfiguration.withString( - (state, ctx) -> I18n.string("gui_sbmenu.recipe.category.title", ctx.player().getLocale(), Map.of("page", String.valueOf(state.page() + 1), "max_page", String.valueOf(Math.max(1, (int) Math.ceil((double) getFilteredItems(state).size() / PAGINATED_SLOTS.length))), "category_name", StringUtility.toNormalCase(type.name()))), + (state, ctx) -> I18n.string("gui_sbmenu.recipe.category.title", ctx.player().getLocale(), Component.text(String.valueOf(state.page() + 1)), Component.text(String.valueOf(Math.max(1, (int) Math.ceil((double) getFilteredItems(state).size() / PAGINATED_SLOTS.length)))), Component.text(StringUtility.toNormalCase(type.name()))), InventoryType.CHEST_6_ROW ); } @@ -146,9 +145,9 @@ protected void layoutCustom(ViewLayout layout, RecipeCatego )); String progressBar = completedLoadingBar + uncompletedLoadingBar + "§r §e" + allowedRecipes.size() + "§6/§e" + typeRecipes.size(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.category.info", l, Map.of("category_name", categoryName)), + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.category.info", l, Component.text(categoryName)), type.getMaterial(), 1, - I18n.lore("gui_sbmenu.recipe.category.info.lore", l, Map.of("category_name", categoryName, "percent", unlockedPercentage, "progress_bar", progressBar))); + I18n.iterable("gui_sbmenu.recipe.category.info.lore", Component.text(categoryName), Component.text(unlockedPercentage), Component.text(progressBar))); }); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeSlayers.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeSlayers.java index f5f6f3c8d..3d7ca7d90 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeSlayers.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUIRecipeSlayers.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.recipe; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.swofty.commons.StringUtility; import net.swofty.type.generic.gui.inventory.ItemStackCreator; @@ -18,7 +19,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIRecipeSlayers extends StatelessView { @@ -86,9 +86,9 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont )); String progressBar = completedLoadingBar + uncompletedLoadingBar + "§r §e" + allowedRecipes.size() + "§6/§e" + typeRecipes.size(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.category", l, Map.of("category_name", categoryName)), + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.category", l, Component.text(categoryName)), type.getMaterial(), 1, - I18n.lore("gui_sbmenu.recipe.book.category.lore", l, Map.of("category_name", categoryName, "percent", unlockedPercentage, "progress_bar", progressBar))); + I18n.iterable("gui_sbmenu.recipe.book.category.lore", Component.text(categoryName), Component.text(unlockedPercentage), Component.text(progressBar))); }); // Category items @@ -132,9 +132,9 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont )); String progressBar = completedLoadingBar + uncompletedLoadingBar + "§r §e" + allowedRecipes.size() + "§6/§e" + typeRecipes.size(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.category", l, Map.of("category_name", categoryName)), + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.category", l, Component.text(categoryName)), type.getMaterial(), 1, - I18n.lore("gui_sbmenu.recipe.book.category.lore", l, Map.of("category_name", categoryName, "percent", unlockedPercentage, "progress_bar", progressBar))); + I18n.iterable("gui_sbmenu.recipe.book.category.lore", Component.text(categoryName), Component.text(unlockedPercentage), Component.text(progressBar))); }, (_, c) -> c.push(new GUIRecipeCategory(type), GUIRecipeCategory.createInitialState((SkyBlockPlayer) c.player(), type))); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUISearchRecipe.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUISearchRecipe.java index 9b69f3eee..4550ec866 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUISearchRecipe.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/recipe/GUISearchRecipe.java @@ -10,7 +10,11 @@ import net.swofty.commons.skyblock.item.ItemType; import net.swofty.type.generic.gui.HypixelSignGUI; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.Layouts; +import net.swofty.type.generic.gui.v2.PaginatedView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ClickContext; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; @@ -25,7 +29,6 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; -import java.util.Map; import java.util.stream.Collectors; public class GUISearchRecipe extends PaginatedView, GUISearchRecipe.SearchState> { @@ -91,7 +94,7 @@ public void layout(ViewLayout layout, SearchState state, ViewContex layout.slot(50, (_, c) -> { Locale l = c.player().getLocale(); return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.book.search", l), Material.OAK_SIGN, 1, - I18n.lore("gui_sbmenu.recipe.book.search.lore", l)); + I18n.iterable("gui_sbmenu.recipe.book.search.lore")); }, (_, c) -> { new HypixelSignGUI(c.player()).open(new String[]{I18n.string("gui_sbmenu.recipe.search.sign_prompt", c.player().getLocale())}).thenAccept(line -> { if (line == null) { @@ -107,7 +110,7 @@ public void layout(ViewLayout layout, SearchState state, ViewContex layout.slot(22, (searchState, c) -> { Locale l = c.player().getLocale(); return ItemStackCreator.getStack(I18n.string("gui_sbmenu.recipe.search.no_results", l), Material.BARRIER, 1, - I18n.lore("gui_sbmenu.recipe.search.no_results.lore", l, Map.of("query", searchState.query()))); + I18n.iterable("gui_sbmenu.recipe.search.no_results.lore", Component.text(searchState.query()))); }); } } @@ -119,7 +122,7 @@ protected boolean shouldFilterFromSearch(SearchState state, SkyBlockRecipe it @Override public ViewConfiguration configuration() { - return ViewConfiguration.withString((state, ctx) -> I18n.string("gui_sbmenu.recipe.search.title", ctx.player().getLocale(), Map.of("query", state.query(), "page", String.valueOf(state.page() + 1), "max_page", String.valueOf(Math.max(1, (int) Math.ceil((double) state.items().size() / DEFAULT_SLOTS.length))))), InventoryType.CHEST_6_ROW); + return ViewConfiguration.withString((state, ctx) -> I18n.string("gui_sbmenu.recipe.search.title", ctx.player().getLocale(), Component.text(state.query()), Component.text(String.valueOf(state.page() + 1)), Component.text(String.valueOf(Math.max(1, (int) Math.ceil((double) state.items().size() / DEFAULT_SLOTS.length))))), InventoryType.CHEST_6_ROW); } public static SearchState createInitialState(String query) { diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/skills/GUISkillCategory.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/skills/GUISkillCategory.java index f11a641e5..d2326ed42 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/skills/GUISkillCategory.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/skills/GUISkillCategory.java @@ -1,11 +1,16 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.skills; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.Material; import net.swofty.commons.StringUtility; import net.swofty.type.generic.data.datapoints.DatapointToggles; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointSkills; @@ -17,7 +22,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class GUISkillCategory extends StatelessView { private static final int[] DISPLAY_SLOTS = { @@ -35,7 +39,7 @@ public GUISkillCategory(SkillCategories category, int page) { @Override public ViewConfiguration configuration() { return ViewConfiguration.withString( - (state, ctx) -> I18n.string("gui_sbmenu.skills.category.title", ctx.player().getLocale(), Map.of("category_name", category.toString())), + (state, ctx) -> I18n.string("gui_sbmenu.skills.category.title", ctx.player().getLocale(), Component.text(category.toString())), InventoryType.CHEST_6_ROW); } @@ -67,19 +71,20 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(0, (s, c) -> { SkyBlockPlayer p = (SkyBlockPlayer) c.player(); Locale l = p.getLocale(); - List lore = new ArrayList<>(category.asCategory().getDescription()); - lore.add(" "); + List baseLore = new ArrayList<>(category.asCategory().getDescription()); + baseLore.add(" "); Integer next = p.getSkills().getNextLevel(category); if (next == null) { - lore.add(I18n.string("gui_sbmenu.skills.category.max_level", l)); + baseLore.add(I18n.string("gui_sbmenu.skills.category.max_level", l)); } else { - p.getSkills().getDisplay(lore, category, category.asCategory().getReward(next).requirement(), + p.getSkills().getDisplay(baseLore, category, category.asCategory().getReward(next).requirement(), "§7Progress to Level " + StringUtility.getAsRomanNumeral(next) + ": "); } - lore.add(" "); - lore.addAll(I18n.lore("gui_sbmenu.skills.category.increase_level", l, Map.of("category_name", category.toString()))); + baseLore.add(" "); + List lore = new ArrayList<>(baseLore); + lore.addAll(List.of(I18n.iterable("gui_sbmenu.skills.category.increase_level", Component.text(category.toString())))); return ItemStackCreator.getStack("§a" + category + " Skill", category.asCategory().getDisplayIcon(), 1, lore); @@ -92,7 +97,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(50, (s, c) -> { Locale l = c.player().getLocale(); return ItemStackCreator.getStack(I18n.string("gui_sbmenu.skills.category.next_page", l), Material.ARROW, 1, - I18n.lore("gui_sbmenu.skills.category.next_page.lore", l)); + I18n.iterable("gui_sbmenu.skills.category.next_page.lore")); }, (click, c) -> c.replace(new GUISkillCategory(category, page + 1))); } @@ -102,7 +107,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(48, (s, c) -> { Locale l = c.player().getLocale(); return ItemStackCreator.getStack(I18n.string("gui_sbmenu.skills.category.previous_page", l), Material.ARROW, 1, - I18n.lore("gui_sbmenu.skills.category.previous_page.lore", l)); + I18n.iterable("gui_sbmenu.skills.category.previous_page.lore")); }, (click, c) -> c.replace(new GUISkillCategory(category, page - 1))); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/skills/GUISkills.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/skills/GUISkills.java index 2364377f4..b03d6a4f5 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/skills/GUISkills.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/skills/GUISkills.java @@ -4,7 +4,11 @@ import net.minestom.server.item.Material; import net.swofty.commons.StringUtility; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.skill.SkillCategories; @@ -12,6 +16,7 @@ import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.ArrayList; +import java.util.List; import java.util.Locale; public class GUISkills extends StatelessView { @@ -34,7 +39,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(4, (s, c) -> { Locale l = c.player().getLocale(); return ItemStackCreator.getStack(I18n.string("gui_sbmenu.skills.main.info", l), Material.DIAMOND_SWORD, 1, - I18n.lore("gui_sbmenu.skills.main.info.lore", l)); + I18n.iterable("gui_sbmenu.skills.main.info.lore")); }); SkillCategories[] allCategories = SkillCategories.values(); @@ -46,31 +51,34 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(slot, (s, c) -> { SkyBlockPlayer player = (SkyBlockPlayer) c.player(); Locale l = player.getLocale(); - ArrayList lore = new ArrayList<>(); + ArrayList lore = new ArrayList<>(); if (category == SkillCategories.CARPENTRY && !player.getMissionData().hasCompleted("give_wool_to_carpenter")) { - lore.addAll(I18n.lore("gui_sbmenu.skills.main.carpentry_locked.lore", l)); + lore.addAll(List.of(I18n.iterable("gui_sbmenu.skills.main.carpentry_locked.lore"))); } else { - lore.addAll(skillCategory.getDescription()); - lore.add(" "); + ArrayList textLore = new ArrayList<>(); + textLore.addAll(skillCategory.getDescription()); + textLore.add(" "); Integer nextLevel = player.getSkills().getNextLevel(category); if (nextLevel != null) { - player.getSkills().getDisplay(lore, category, skillCategory.getRewards()[nextLevel - 1].requirement(), + player.getSkills().getDisplay(textLore, category, skillCategory.getRewards()[nextLevel - 1].requirement(), "§7Progress to Level " + StringUtility.getAsRomanNumeral(nextLevel) + ": "); - lore.add(" "); + textLore.add(" "); SkillCategory.SkillReward[] rewards = skillCategory.getRewards(); SkillCategory.SkillReward reward = rewards[nextLevel - 1]; - reward.getDisplay(lore); + reward.getDisplay(textLore); } else { - lore.add(I18n.string("gui_sbmenu.skills.main.max_level", l)); + textLore.add(I18n.string("gui_sbmenu.skills.main.max_level", l)); } - lore.add(" "); - lore.add(I18n.string("gui_sbmenu.skills.main.click_to_view", l)); + textLore.add(" "); + textLore.add(I18n.string("gui_sbmenu.skills.main.click_to_view", l)); + + lore.addAll(textLore); } return ItemStackCreator.getStack( diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorage.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorage.java index ca4dafeb7..292223369 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorage.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorage.java @@ -1,12 +1,17 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.storage; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.inventory.click.Click; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.commons.skyblock.item.UnderstandableSkyBlockItem; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ClickContext; import net.swofty.type.generic.gui.v2.context.ViewContext; import net.swofty.type.generic.i18n.I18n; @@ -38,13 +43,13 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(4, (s, c) -> { Locale l = c.player().getLocale(); return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.ender_chest", l), Material.ENDER_CHEST, 1, - I18n.lore("gui_sbmenu.storage.ender_chest.lore", l)); + I18n.iterable("gui_sbmenu.storage.ender_chest.lore")); }); layout.slot(22, (s, c) -> { Locale l = c.player().getLocale(); return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.backpacks", l), Material.CHEST, 1, - I18n.lore("gui_sbmenu.storage.backpacks.lore", l)); + I18n.iterable("gui_sbmenu.storage.backpacks.lore")); }); SkyBlockPlayer player = (SkyBlockPlayer) ctx.player(); @@ -69,13 +74,13 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (!playerStorage.hasPage(page)) return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.locked_page", l), Material.RED_STAINED_GLASS_PANE, 1, - I18n.lore("gui_sbmenu.storage.locked_page.lore", l)); + I18n.iterable("gui_sbmenu.storage.locked_page.lore")); Material material = playerStorage.getPage(page).display; - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.ender_chest_page", l, Map.of("page", String.valueOf(page))), + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.ender_chest_page", l, Component.text(String.valueOf(page))), material, page, - I18n.lore("gui_sbmenu.storage.ender_chest_page.lore", l)); + I18n.iterable("gui_sbmenu.storage.ender_chest_page.lore")); }, (click, c) -> { SkyBlockPlayer p = (SkyBlockPlayer) c.player(); DatapointStorage.PlayerStorage playerStorage = p.getSkyblockDataHandler().get( @@ -104,9 +109,9 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (backpacks.getUnlockedSlots() < slot) { layout.slot(backpackSlot, (s, c) -> { Locale l = c.player().getLocale(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.locked_backpack", l, Map.of("slot", String.valueOf(slot))), + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.locked_backpack", l, Component.text(String.valueOf(slot))), Material.GRAY_DYE, 1, - I18n.lore("gui_sbmenu.storage.locked_backpack.lore", l)); + I18n.iterable("gui_sbmenu.storage.locked_backpack.lore")); }); continue; } @@ -114,9 +119,9 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont if (!backpackItems.containsKey(slot)) { layout.slot(backpackSlot, (s, c) -> { Locale l = c.player().getLocale(); - return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.empty_backpack", l, Map.of("slot", String.valueOf(slot))), + return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.empty_backpack", l, Component.text(String.valueOf(slot))), Material.BROWN_STAINED_GLASS_PANE, slot, - I18n.lore("gui_sbmenu.storage.empty_backpack.lore", l)); + I18n.iterable("gui_sbmenu.storage.empty_backpack.lore")); }, (click, c) -> handleEmptyBackpackSlotClick(click, c, slot)); continue; @@ -130,12 +135,9 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont String itemName = item.getAttributeHandler().getRarity().getColor() + item.getAttributeHandler().getPotentialType().getDisplayName(); String slots = String.valueOf(item.getComponent(BackpackComponent.class).getRows() * 9); - return ItemStackCreator.getStackHead(I18n.string("gui_sbmenu.storage.backpack_slot", l, Map.of("slot", String.valueOf(slot))), + return ItemStackCreator.getStackHead(I18n.string("gui_sbmenu.storage.backpack_slot", l, Component.text(String.valueOf(slot))), item.getComponent(SkullHeadComponent.class).getSkullTexture(item), slot, - I18n.lore("gui_sbmenu.storage.backpack_slot.lore", l, Map.of( - "item_name", itemName, - "slots", slots - ))); + I18n.iterable("gui_sbmenu.storage.backpack_slot.lore", Component.text(itemName), Component.text(slots))); }, (click, c) -> { SkyBlockPlayer p = (SkyBlockPlayer) c.player(); DatapointBackpacks.PlayerBackpacks playerBackpacks = p.getSkyblockDataHandler().get( @@ -149,11 +151,11 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont && !backpackItem.getAttributeHandler().getBackpackData().items() .stream() .map(SkyBlockItem::new).allMatch(SkyBlockItem::isNA)) { - p.sendMessage(I18n.string("gui_sbmenu.storage.msg.not_empty", p.getLocale(), Map.of("slot", String.valueOf(slot)))); + p.sendMessage(I18n.string("gui_sbmenu.storage.msg.not_empty", p.getLocale(), Component.text(String.valueOf(slot)))); return; } - p.sendMessage(I18n.string("gui_sbmenu.storage.msg.removed", p.getLocale(), Map.of("slot", String.valueOf(slot)))); + p.sendMessage(I18n.string("gui_sbmenu.storage.msg.removed", p.getLocale(), Component.text(String.valueOf(slot)))); p.getInventory().setCursorItem(PlayerItemUpdater.playerUpdate(p, backpackItem.getItemStack()).build()); playerBackpackItems.remove(slot); @@ -184,7 +186,7 @@ private void handleEmptyBackpackSlotClick(ClickContext click, View ); Locale l = player.getLocale(); - player.sendMessage(I18n.string("gui_sbmenu.storage.msg.placing", l, Map.of("slot", String.valueOf(slot)))); + player.sendMessage(I18n.string("gui_sbmenu.storage.msg.placing", l, Component.text(String.valueOf(slot)))); player.sendMessage(I18n.string("gui_sbmenu.storage.msg.success", l)); player.getInventory().setCursorItem(ItemStack.AIR); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorageBackpackPage.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorageBackpackPage.java index 84e40a034..6dfa8e7dc 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorageBackpackPage.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorageBackpackPage.java @@ -6,16 +6,21 @@ import net.minestom.server.item.Material; import net.swofty.commons.StringUtility; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; +import net.swofty.type.generic.gui.v2.ViewSession; import net.swofty.type.generic.gui.v2.context.ClickContext; import net.swofty.type.generic.gui.v2.context.ViewContext; +import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.utility.MathUtility; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointBackpacks; import net.swofty.type.skyblockgeneric.item.SkyBlockItem; import net.swofty.type.skyblockgeneric.item.components.BackpackComponent; import net.swofty.type.skyblockgeneric.item.updater.NonPlayerItemUpdater; import net.swofty.type.skyblockgeneric.item.updater.PlayerItemUpdater; -import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; public class GUIStorageBackpackPage extends StatelessView { @@ -55,7 +60,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(1, (s, c) -> { java.util.Locale l = c.player().getLocale(); return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.backpack_page.go_back", l), Material.ARROW, 1, - I18n.lore("gui_sbmenu.storage.backpack_page.go_back.lore", l)); + I18n.iterable("gui_sbmenu.storage.backpack_page.go_back.lore")); }, (click, c) -> { saveItems((SkyBlockPlayer) c.player(), c); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorageIconSelection.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorageIconSelection.java index cfa6b644f..7f30e398b 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorageIconSelection.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStorageIconSelection.java @@ -1,23 +1,26 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.storage; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.commons.StringUtility; import net.swofty.commons.skyblock.item.ItemType; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.PaginatedView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; import net.swofty.type.generic.gui.v2.context.ClickContext; import net.swofty.type.generic.gui.v2.context.ViewContext; +import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.user.HypixelPlayer; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointStorage; -import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.ArrayList; import java.util.List; -import java.util.Map; public class GUIStorageIconSelection extends PaginatedView { private static final int[] PAGINATED_SLOTS = { @@ -38,7 +41,7 @@ public ViewConfiguration configuration() { return ViewConfiguration.withString( (state, ctx) -> { int totalPages = Math.max(1, (int) Math.ceil((double) getFilteredItems(state).size() / PAGINATED_SLOTS.length)); - return I18n.string("gui_sbmenu.storage.icon.title", ctx.player().getLocale(), Map.of("page", String.valueOf(state.page() + 1), "max_page", String.valueOf(totalPages))); + return I18n.string("gui_sbmenu.storage.icon.title", ctx.player().getLocale(), Component.text(String.valueOf(state.page() + 1)), Component.text(String.valueOf(totalPages))); }, InventoryType.CHEST_6_ROW ); @@ -77,7 +80,7 @@ protected ItemStack.Builder renderItem(Material item, int index, HypixelPlayer p (item == Material.BARRIER ? I18n.string("gui_sbmenu.storage.icon.reset", l) : StringUtility.toNormalCase(item.name().replace("minecraft:", ""))), item, 1, - I18n.lore("gui_sbmenu.storage.icon.lore", l)); + I18n.iterable("gui_sbmenu.storage.icon.lore")); } @Override diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStoragePage.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStoragePage.java index 4a0f491d9..c7b4d264f 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStoragePage.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/sbmenu/storage/GUIStoragePage.java @@ -1,21 +1,25 @@ package net.swofty.type.skyblockgeneric.gui.inventories.sbmenu.storage; +import net.kyori.adventure.text.Component; import net.minestom.server.inventory.InventoryType; import net.minestom.server.item.ItemStack; import net.minestom.server.item.Material; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.v2.*; +import net.swofty.type.generic.gui.v2.Components; +import net.swofty.type.generic.gui.v2.DefaultState; +import net.swofty.type.generic.gui.v2.StatelessView; +import net.swofty.type.generic.gui.v2.ViewConfiguration; +import net.swofty.type.generic.gui.v2.ViewLayout; +import net.swofty.type.generic.gui.v2.ViewSession; import net.swofty.type.generic.gui.v2.context.ClickContext; import net.swofty.type.generic.gui.v2.context.ViewContext; +import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointStorage; import net.swofty.type.skyblockgeneric.item.SkyBlockItem; import net.swofty.type.skyblockgeneric.item.updater.PlayerItemUpdater; -import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.Map; - public class GUIStoragePage extends StatelessView { private final int page; @@ -30,7 +34,7 @@ public ViewConfiguration configuration() { SkyBlockPlayer player = (SkyBlockPlayer) ctx.player(); int highestPage = player.getSkyblockDataHandler().get(SkyBlockDataHandler.Data.STORAGE, DatapointStorage.class) .getValue().getHighestPage(); - return I18n.string("gui_sbmenu.storage.page.title", player.getLocale(), Map.of("page", String.valueOf(page), "max_page", String.valueOf(highestPage))); + return I18n.string("gui_sbmenu.storage.page.title", player.getLocale(), Component.text(String.valueOf(page)), Component.text(String.valueOf(highestPage))); }, InventoryType.CHEST_6_ROW ); @@ -52,7 +56,7 @@ public void layout(ViewLayout layout, DefaultState state, ViewCont layout.slot(1, (s, c) -> { java.util.Locale l = c.player().getLocale(); return ItemStackCreator.getStack(I18n.string("gui_sbmenu.storage.page.go_back", l), Material.ARROW, 1, - I18n.lore("gui_sbmenu.storage.page.go_back.lore", l)); + I18n.iterable("gui_sbmenu.storage.page.go_back.lore")); }, (_, c) -> c.player().openView(new GUIStorage())); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/ConfirmBuyView.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/ConfirmBuyView.java index fd61a4450..d081c4b19 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/ConfirmBuyView.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/ConfirmBuyView.java @@ -16,9 +16,7 @@ import net.swofty.type.skyblockgeneric.item.SkyBlockItem; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.ArrayList; import java.util.Locale; -import java.util.Map; public final class ConfirmBuyView implements View { @@ -32,36 +30,31 @@ public void layout(ViewLayout layout, State state, ViewContext ctx) { Components.fill(layout); layout.slot(12, - (s, c) -> { - Locale l = c.player().getLocale(); - ArrayList lore = new ArrayList<>(I18n.lore("gui_shop.confirm_buy.confirm_button.lore", l, Map.of( - "item_name", state.item.getDisplayName(), - "cost", StringUtility.commaify(state.price) - ))); - return ItemStackCreator.getStack(I18n.string("gui_shop.confirm_buy.confirm_button", l), Material.LIME_TERRACOTTA, 1, lore); - }, - (click, c) -> { - if (!(click.click() instanceof Click.Left || click.click() instanceof Click.Right)) return; - - SkyBlockPlayer player = (SkyBlockPlayer) c.player(); - Locale l = player.getLocale(); - if (player.getCoins() >= state.price) { - player.addAndUpdateItem(state.item); - player.removeCoins(state.price); - player.sendMessage(I18n.string("gui_shop.confirm_buy.bought_message", l, Map.of( - "item_name", state.item.getDisplayName(), - "cost", String.valueOf(state.price) - ))); - } else { - player.sendMessage(I18n.string("gui_shop.confirm_buy.not_enough_coins", l)); - } - player.closeInventory(); + (_, _) -> ItemStackCreator.getStack( + I18n.t("gui_shop.confirm_buy.confirm_button"), + Material.LIME_TERRACOTTA, + 1, + I18n.iterable("gui_shop.confirm_buy.confirm_button.lore", Component.text(state.item.getDisplayName()), Component.text(StringUtility.commaify(state.price))) + ), + (click, c) -> { + if (!(click.click() instanceof Click.Left || click.click() instanceof Click.Right)) return; + + SkyBlockPlayer player = (SkyBlockPlayer) c.player(); + Locale l = player.getLocale(); + if (player.getCoins() >= state.price) { + player.addAndUpdateItem(state.item); + player.removeCoins(state.price); + player.sendMessage(I18n.string("gui_shop.confirm_buy.bought_message", l, Component.text(state.item.getDisplayName()), Component.text(String.valueOf(state.price)))); + } else { + player.sendMessage(I18n.string("gui_shop.confirm_buy.not_enough_coins", l)); } + player.closeInventory(); + } ); layout.slot(16, - (s, c) -> TranslatableItemStackCreator.getStack(c.player(), "gui_shop.confirm_buy.cancel_button", Material.RED_TERRACOTTA, 1), - (_, c) -> c.player().closeInventory() + (_, _) -> TranslatableItemStackCreator.getStack("gui_shop.confirm_buy.cancel_button", Material.RED_TERRACOTTA, 1), + (_, c) -> c.player().closeInventory() ); } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/GUIShopAlda.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/GUIShopAlda.java index 68e7b5d5e..b3532af28 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/GUIShopAlda.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/GUIShopAlda.java @@ -8,7 +8,7 @@ public class GUIShopAlda extends ShopView { public GUIShopAlda() { - super(I18n.string("gui_shop.alda.title"), SINGLE_SLOT); + super(I18n.t("gui_shop.alda.title"), SINGLE_SLOT); } @Override diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/TradingOptionsView.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/TradingOptionsView.java index bb6dab70b..c7eba107f 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/TradingOptionsView.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/shop/TradingOptionsView.java @@ -8,7 +8,6 @@ import net.minestom.server.item.ItemStack; import net.swofty.commons.StringUtility; import net.swofty.type.generic.gui.inventory.ItemStackCreator; -import net.swofty.type.generic.gui.inventory.TranslatableItemStackCreator; import net.swofty.type.generic.gui.v2.Components; import net.swofty.type.generic.gui.v2.View; import net.swofty.type.generic.gui.v2.ViewConfiguration; @@ -24,7 +23,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public final class TradingOptionsView implements View { @@ -62,7 +60,7 @@ private ItemStack.Builder createTradeItem(ShopView.ShopItem item, int amount, Sk lore.addAll(totalPrice.getGUIDisplay()); lore.add(""); lore.add(I18n.string("gui_shop.trading_options.stock_label", l)); - lore.add(I18n.string("gui_shop.trading_options.stock_remaining", l, Map.of("count", String.valueOf(player.getShoppingData().getStock(item.getItem().toUnderstandable()))))); + lore.add(I18n.string("gui_shop.trading_options.stock_remaining", l, Component.text(String.valueOf(player.getShoppingData().getStock(item.getItem().toUnderstandable()))))); lore.add(""); lore.add(I18n.string("gui_shop.trading_options.click_to_purchase", l)); @@ -87,7 +85,7 @@ private void attemptBuy(State state, int amount, ViewContext ctx) { ShopPrice totalPrice = state.stackPrice.multiply(amount); if (!totalPrice.canAfford(player)) { - player.sendMessage(I18n.string("gui_shop.trading_options.not_enough", l, Map.of("currency", state.stackPrice.getNamePlural()))); + player.sendMessage(I18n.string("gui_shop.trading_options.not_enough", l, Component.text(state.stackPrice.getNamePlural()))); return; } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/stash/GUIStashItem.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/stash/GUIStashItem.java index fd91405a1..c0dc7ba4a 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/stash/GUIStashItem.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/stash/GUIStashItem.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.stash; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; @@ -19,7 +20,6 @@ import java.util.List; import java.util.Locale; -import java.util.Map; public class GUIStashItem extends HypixelPaginatedGUI { @@ -78,7 +78,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockItem removed = stash.removeFromItemStash(0); if (removed != null) { player.addAndUpdateItem(removed); - player.sendMessage(I18n.string("gui_stash.item.from_stash", l, Map.of("item_name", removed.getDisplayName()))); + player.sendMessage(I18n.string("gui_stash.item.from_stash", l, Component.text(removed.getDisplayName()))); pickedUp++; } } @@ -88,7 +88,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { } else if (stash.getItemStashCount() == 0) { player.sendMessage(I18n.string("gui_stash.item.all_picked_up", l)); } else { - player.sendMessage(I18n.string("gui_stash.item.remaining", l, Map.of("count", String.valueOf(stash.getItemStashCount())))); + player.sendMessage(I18n.string("gui_stash.item.remaining", l, Component.text(String.valueOf(stash.getItemStashCount())))); } player.closeInventory(); @@ -98,8 +98,8 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; int count = player.getStash().getItemStashCount(); - return TranslatableItemStackCreator.getStack(p, "gui_stash.item.fill_inventory", Material.EMERALD, 1, - "gui_stash.item.fill_inventory.lore", Map.of("count", String.valueOf(count))); + return TranslatableItemStackCreator.getStack("gui_stash.item.fill_inventory", Material.EMERALD, 1, + "gui_stash.item.fill_inventory.lore", Component.text(String.valueOf(count))); } }); @@ -119,7 +119,7 @@ public String getTitle(HypixelPlayer player, String query, int page, PaginationL if (maxPage <= 1) { return I18n.string("gui_stash.item.title", l); } - return I18n.string("gui_stash.item.title_paged", l, Map.of("page", String.valueOf(page), "max_page", String.valueOf(maxPage))); + return I18n.string("gui_stash.item.title_paged", l, Component.text(String.valueOf(page)), Component.text(String.valueOf(maxPage))); } @Override @@ -154,12 +154,12 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockItem removed = player.getStash().removeFromItemStash(currentIndex); if (removed != null) { player.addAndUpdateItem(removed); - player.sendMessage(I18n.string("gui_stash.item.from_stash", l, Map.of("item_name", removed.getDisplayName()))); + player.sendMessage(I18n.string("gui_stash.item.from_stash", l, Component.text(removed.getDisplayName()))); if (player.getStash().getItemStashCount() == 0) { - player.sendMessage(I18n.string("gui_stash.item.all_picked_up", l)); + player.sendMessage(I18n.t("gui_stash.item.all_picked_up")); } else { - player.sendMessage(I18n.string("gui_stash.item.remaining", l, Map.of("count", String.valueOf(player.getStash().getItemStashCount())))); + player.sendMessage(I18n.string("gui_stash.item.remaining", l, Component.text(String.valueOf(player.getStash().getItemStashCount())))); } } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/stash/GUIStashMaterial.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/stash/GUIStashMaterial.java index eb25b4346..6e3246a04 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/stash/GUIStashMaterial.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/gui/inventories/stash/GUIStashMaterial.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.gui.inventories.stash; +import net.kyori.adventure.text.Component; import net.minestom.server.event.inventory.InventoryCloseEvent; import net.minestom.server.event.inventory.InventoryPreClickEvent; import net.minestom.server.inventory.InventoryType; @@ -84,7 +85,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockItem newItem = new SkyBlockItem(type); newItem.setAmount(removed); player.addAndUpdateItem(newItem); - player.sendMessage(I18n.string("gui_stash.material.from_stash", l, Map.of("item_name", type.getDisplayName(), "amount", String.valueOf(removed)))); + player.sendMessage(I18n.string("gui_stash.material.from_stash", l, Component.text(type.getDisplayName()), Component.text(String.valueOf(removed)))); pickedUp += removed; amount -= removed; } else { @@ -96,13 +97,11 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { } if (pickedUp == 0) { - player.sendMessage(I18n.string("gui_stash.material.inventory_full", l)); + player.sendMessage(I18n.t("gui_stash.material.inventory_full")); } else if (stash.getMaterialStashCount() == 0) { - player.sendMessage(I18n.string("gui_stash.material.all_picked_up", l)); + player.sendMessage(I18n.t("gui_stash.material.all_picked_up")); } else { - player.sendMessage(I18n.string("gui_stash.material.remaining", l, Map.of( - "count", String.valueOf(stash.getMaterialStashCount()), - "types", String.valueOf(stash.getMaterialTypeCount())))); + player.sendMessage(I18n.string("gui_stash.material.remaining", l, Component.text(String.valueOf(stash.getMaterialStashCount())), Component.text(String.valueOf(stash.getMaterialTypeCount())))); } player.closeInventory(); @@ -113,10 +112,10 @@ public ItemStack.Builder getItem(HypixelPlayer p) { SkyBlockPlayer player = (SkyBlockPlayer) p; int count = player.getStash().getMaterialStashCount(); int types = player.getStash().getMaterialTypeCount(); - return TranslatableItemStackCreator.getStack(p, "gui_stash.material.fill_inventory", Material.EMERALD, 1, - "gui_stash.material.fill_inventory.lore", Map.of( - "count", StringUtility.commaify(count), - "types", String.valueOf(types))); + return TranslatableItemStackCreator.getStack("gui_stash.material.fill_inventory", Material.EMERALD, 1, + "gui_stash.material.fill_inventory.lore", + Component.text(StringUtility.commaify(count)), + Component.text(String.valueOf(types))); } }); @@ -142,9 +141,9 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { } if (inserted > 0) { - player.sendMessage(I18n.string("gui_stash.material.transferred_to_sacks", l)); + player.sendMessage(I18n.t("gui_stash.material.transferred_to_sacks")); } else { - player.sendMessage(I18n.string("gui_stash.material.no_transfer", l)); + player.sendMessage(I18n.t("gui_stash.material.no_transfer")); } new GUIStashMaterial().open(player, query, 1); @@ -152,7 +151,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { @Override public ItemStack.Builder getItem(HypixelPlayer p) { - return TranslatableItemStackCreator.getStack(p, "gui_stash.material.insert_into_sacks", Material.CHEST, 1, + return TranslatableItemStackCreator.getStack("gui_stash.material.insert_into_sacks", Material.CHEST, 1, "gui_stash.material.insert_into_sacks.lore"); } }); @@ -173,7 +172,7 @@ public String getTitle(HypixelPlayer player, String query, int page, PaginationL if (maxPage <= 1) { return I18n.string("gui_stash.material.title", l); } - return I18n.string("gui_stash.material.title_paged", l, Map.of("page", String.valueOf(page), "max_page", String.valueOf(maxPage))); + return I18n.string("gui_stash.material.title_paged", l, Component.text(String.valueOf(page)), Component.text(String.valueOf(maxPage))); } @Override @@ -200,7 +199,7 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { // Check if player has inventory space if (!player.hasEmptySlots(1)) { - player.sendMessage(I18n.string("gui_stash.material.inventory_full", l)); + player.sendMessage(I18n.t("gui_stash.material.inventory_full")); return; } @@ -210,14 +209,12 @@ public void run(InventoryPreClickEvent e, HypixelPlayer p) { SkyBlockItem newItem = new SkyBlockItem(itemType); newItem.setAmount(removed); player.addAndUpdateItem(newItem); - player.sendMessage(I18n.string("gui_stash.material.from_stash", l, Map.of("item_name", itemType.getDisplayName(), "amount", String.valueOf(removed)))); + player.sendMessage(I18n.string("gui_stash.material.from_stash", l, Component.text(itemType.getDisplayName()), Component.text(String.valueOf(removed)))); if (player.getStash().getMaterialStashCount() == 0) { - player.sendMessage(I18n.string("gui_stash.material.all_picked_up", l)); + player.sendMessage(I18n.t("gui_stash.material.all_picked_up")); } else { - player.sendMessage(I18n.string("gui_stash.material.remaining", l, Map.of( - "count", String.valueOf(player.getStash().getMaterialStashCount()), - "types", String.valueOf(player.getStash().getMaterialTypeCount())))); + player.sendMessage(I18n.string("gui_stash.material.remaining", l, Component.text(String.valueOf(player.getStash().getMaterialStashCount())), Component.text(String.valueOf(player.getStash().getMaterialTypeCount())))); } } @@ -236,7 +233,7 @@ public ItemStack.Builder getItem(HypixelPlayer p) { ItemStack.Builder stack = new NonPlayerItemUpdater(item.getItemStack()).getUpdatedItem(); ArrayList lore = new ArrayList<>(item.getLore()); lore.add(""); - lore.add(I18n.string("gui_stash.material.amount_label", l, Map.of("amount", StringUtility.commaify(currentAmount)))); + lore.add(I18n.string("gui_stash.material.amount_label", l, Component.text(StringUtility.commaify(currentAmount)))); lore.add(""); lore.add(I18n.string("gui_stash.material.click_to_pickup", l)); return ItemStackCreator.updateLore(stack, lore); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemLore.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemLore.java index d47ac6f8e..0544efd53 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemLore.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemLore.java @@ -13,12 +13,12 @@ import net.swofty.commons.skyblock.item.Rarity; import net.swofty.commons.skyblock.item.attribute.attributes.ItemAttributeGemData; import net.swofty.commons.skyblock.item.attribute.attributes.ItemAttributeHotPotatoBookData; +import net.swofty.commons.skyblock.item.attribute.attributes.ItemAttributePotionData; import net.swofty.commons.skyblock.item.attribute.attributes.ItemAttributeRuneInfusedWith; import net.swofty.commons.skyblock.item.attribute.attributes.ItemAttributeSoulbound; import net.swofty.commons.skyblock.item.reforge.Reforge; import net.swofty.commons.skyblock.statistics.ItemStatistic; import net.swofty.commons.skyblock.statistics.ItemStatistics; -import net.swofty.commons.skyblock.item.attribute.attributes.ItemAttributePotionData; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.skyblockgeneric.collection.CollectionCategories; import net.swofty.type.skyblockgeneric.gems.GemRarity; @@ -139,7 +139,7 @@ public void updateLore(@Nullable SkyBlockPlayer player) { // Handle Item Statistics if (handler.isMiningTool()) { - addLoreLine(I18n.string("items.lore.breaking_power", l, Map.of("value", String.valueOf(handler.getBreakingPower())))); + addLoreLine(I18n.string("items.lore.breaking_power", l, Component.text(String.valueOf(handler.getBreakingPower())))); addLoreLine(null); } @@ -160,7 +160,7 @@ public void updateLore(@Nullable SkyBlockPlayer player) { if (item.hasComponent(ShortBowComponent.class)) { ShortBowComponent shortBowComponent = item.getComponent(ShortBowComponent.class); - addLoreLine(I18n.string("items.lore.shot_cooldown", l, Map.of("cooldown", String.valueOf(shortBowComponent.getCooldown())))); + addLoreLine(I18n.string("items.lore.shot_cooldown", l, Component.text(String.valueOf(shortBowComponent.getCooldown())))); addNextLine = true; } @@ -294,7 +294,7 @@ public void updateLore(@Nullable SkyBlockPlayer player) { AbilityComponent abilityComponent = item.getComponent(AbilityComponent.class); abilityComponent.getAbilities().forEach(ability -> { - addLoreLine(I18n.string("items.lore.ability_label", l, Map.of("name", ability.getName(), "activation", ability.getActivation().getDisplay()))); + addLoreLine(I18n.string("items.lore.ability_label", l, Component.text(ability.getName()), Component.text(ability.getActivation().getDisplay()))); for (String line : StringUtility.splitByWordAndLength(ability.getDescription().apply(player, item), 40)) addLoreLine("§7" + line); @@ -302,7 +302,7 @@ public void updateLore(@Nullable SkyBlockPlayer player) { if (costDisplay != null) addLoreLine(costDisplay); if (ability.getCooldownTicks() > 20) { - addLoreLine(I18n.string("items.lore.ability_cooldown", l, Map.of("cooldown", StringUtility.decimalify((double) ability.getCooldownTicks() / 20, 1)))); + addLoreLine(I18n.string("items.lore.ability_cooldown", l, Component.text(StringUtility.decimalify((double) ability.getCooldownTicks() / 20, 1)))); } addLoreLine(null); @@ -335,7 +335,7 @@ public void updateLore(@Nullable SkyBlockPlayer player) { } } int totalPieces = ArmorSetRegistry.getPieceCount(ArmorSetRegistry.getArmorSet(armorSet.getClass())); - addLoreLine(I18n.string("items.lore.full_set_bonus", l, Map.of("name", armorSet.getName(), "wearing", String.valueOf(wearingAmount), "total", String.valueOf(totalPieces)))); + addLoreLine(I18n.string("items.lore.full_set_bonus", l, Component.text(armorSet.getName()), Component.text(String.valueOf(wearingAmount)), Component.text(String.valueOf(totalPieces)))); armorSet.getDescription().forEach(line -> addLoreLine("§7" + line)); addLoreLine(null); } @@ -357,7 +357,7 @@ public void updateLore(@Nullable SkyBlockPlayer player) { ItemAttributeSoulbound.SoulBoundData bound = handler.getSoulBoundData(); if (bound != null) - addLoreLine(I18n.string("items.lore.soulbound", l, Map.of("prefix", bound.isCoopAllowed() ? I18n.string("items.lore.soulbound_coop_prefix", l) : ""))); + addLoreLine(I18n.string("items.lore.soulbound", l, Component.text(bound.isCoopAllowed() ? I18n.string("items.lore.soulbound_coop_prefix", l) : ""))); if (item.hasComponent(ArrowComponent.class)) { addLoreLine(I18n.string("items.lore.stats_when_shot", l)); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/ShapedRecipe.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/ShapedRecipe.java index b926892aa..cdc7c31fc 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/ShapedRecipe.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/ShapedRecipe.java @@ -8,7 +8,12 @@ import net.swofty.type.skyblockgeneric.item.SkyBlockItem; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; import java.util.function.Function; @Getter @@ -98,24 +103,7 @@ public ShapedRecipe(RecipeType type, for (int startCol = 0; startCol < offsetCols; startCol++) { int offsetIndex = offsetIndex(startRow, startCol, offsetCols); - int airMask = 0; - for (int gr = 0; gr < 3; gr++) { - for (int gc = 0; gc < 3; gc++) { - int idx = gr * 3 + gc; - int pr = gr - startRow; - int pc = gc - startCol; - if (pr < 0 || pr >= height || pc < 0 || pc >= width) { - airMask |= (1 << idx); - continue; - } - - char sym = patternArray[pr][pc]; - ItemQuantifiable iq = ingredientByChar[sym & 0xFF]; - if (sym == 'O' || iq == null || iq.getItem().getMaterial() == Material.AIR) { - airMask |= (1 << idx); - } - } - } + int airMask = getAirMask(startRow, startCol); airMaskByOffset[offsetIndex] = airMask; int[] reqGrid = new int[requiredPatternIdx.length]; // upper bound @@ -138,6 +126,28 @@ public ShapedRecipe(RecipeType type, this.recipeSize = height * width; } + private int getAirMask(int startRow, int startCol) { + int airMask = 0; + for (int gr = 0; gr < 3; gr++) { + for (int gc = 0; gc < 3; gc++) { + int idx = gr * 3 + gc; + int pr = gr - startRow; + int pc = gc - startCol; + if (pr < 0 || pr >= height || pc < 0 || pc >= width) { + airMask |= (1 << idx); + continue; + } + + char sym = patternArray[pr][pc]; + ItemQuantifiable iq = ingredientByChar[sym & 0xFF]; + if (sym == 'O' || iq == null || iq.getItem().getMaterial() == Material.AIR) { + airMask |= (1 << idx); + } + } + } + return airMask; + } + public ShapedRecipe(RecipeType type, SkyBlockItem result, Map ingredientMap, @@ -232,6 +242,13 @@ private boolean matchesAtPosition(ItemStack[] stacks, int startRow, int startCol return false; } } + + if (symbolHasExtraReq[sym & 0xFF]) { + Function req = extraReqByChar[sym & 0xFF]; + if (req != null && !req.apply(actualItem)) { + return false; + } + } } return true; @@ -302,7 +319,7 @@ public SkyBlockRecipe clone() { Map ingredientMapCopy = new HashMap<>(); for (int i = 0; i < CHAR_SPACE; i++) { ItemQuantifiable iq = ingredientByChar[i]; - if (iq != null) ingredientMapCopy.put((char) i, iq); + if (iq != null) ingredientMapCopy.put((char) i, iq.clone()); } ShapedRecipe cloned = new ShapedRecipe(recipeType, result.clone(), ingredientMapCopy, patternCopy, canCraft); @@ -409,11 +426,11 @@ public Map> getPositionsOfItems(ItemStack[] stacks) { if (!matchesAtPosition(stacks, startRow, startCol)) continue; for (int i = 0; i < reqIdx.length; i++) { - positions.computeIfAbsent(reqSym[i], k -> new ArrayList<>()).add(reqIdx[i]); + positions.computeIfAbsent(reqSym[i], _ -> new ArrayList<>()).add(reqIdx[i]); } } - positions.replaceAll((k, v) -> new ArrayList<>(new LinkedHashSet<>(v))); + positions.replaceAll((_, v) -> new ArrayList<>(new LinkedHashSet<>(v))); return positions; } diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/ShapelessRecipe.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/ShapelessRecipe.java index 44894ba18..a67565844 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/ShapelessRecipe.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/ShapelessRecipe.java @@ -63,7 +63,9 @@ public void init() { @Override public SkyBlockItem[] consume(SkyBlockItem[] stacks) { - List materialsToConsume = new ArrayList<>(ingredientList); + List materialsToConsume = ingredientList.stream() + .map(ItemQuantifiable::clone) + .collect(Collectors.toCollection(ArrayList::new)); SkyBlockItem[] modifiedStacks = Arrays.copyOf(stacks, stacks.length); for (int i = 0; i < modifiedStacks.length && !materialsToConsume.isEmpty(); i++) { @@ -123,8 +125,13 @@ public SkyBlockItem[] getRecipeDisplay() { @Override public SkyBlockRecipe clone() { - ShapelessRecipe recipe = new ShapelessRecipe(recipeType, result, amount, canCraft); + ShapelessRecipe recipe = new ShapelessRecipe(recipeType, result.clone(), amount, canCraft); recipe.ingredientList.addAll(ingredientList.stream().map(ItemQuantifiable::clone).toList()); + if (customRecipeDisplay != null) { + recipe.customRecipeDisplay = Arrays.stream(customRecipeDisplay) + .map(item -> item != null ? item.clone() : null) + .toArray(SkyBlockItem[]::new); + } return recipe; } @@ -196,6 +203,7 @@ public String toString() { ", result=" + result + ", ingredientList=" + ingredientList + ", canCraft=" + canCraft + - ", amount=" + amount; + ", amount=" + amount + + '}'; } } \ No newline at end of file diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/SkyBlockRecipe.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/SkyBlockRecipe.java index 7ce72c316..9d549f8ec 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/SkyBlockRecipe.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/crafting/SkyBlockRecipe.java @@ -91,33 +91,35 @@ public static SkyBlockRecipe getStandardEnchantedRecipe(SkyBlockRecipe.Recipe } public static List getMissionDisplay(List lore, UUID uuid) { - ArrayList allRecipes = new ArrayList<>(); - ArrayList allowedRecipes = new ArrayList<>(); + ArrayList> allRecipes = new ArrayList<>(); + ArrayList> allowedRecipes = new ArrayList<>(); allRecipes.addAll(ShapedRecipe.CACHED_RECIPES); allRecipes.addAll(ShapelessRecipe.CACHED_RECIPES); - allRecipes.forEach(recipe -> { - SkyBlockRecipe.CraftingResult result = - (SkyBlockRecipe.CraftingResult) recipe.getCanCraft().apply(SkyBlockGenericLoader.getFromUUID(uuid)); + SkyBlockPlayer player = SkyBlockGenericLoader.getFromUUID(uuid); - if (result.allowed()) { - allowedRecipes.add(recipe); - } - }); + if (player != null) { + allRecipes.forEach(recipe -> { + SkyBlockRecipe.CraftingResult result = recipe.getCanCraft().apply(player); + + if (result != null && result.allowed()) { + allowedRecipes.add(recipe); + } + }); + } + + double unlockedRatio = allRecipes.isEmpty() ? 0D : allowedRecipes.size() / (double) allRecipes.size(); + String unlockedPercentage = String.format("%.2f", unlockedRatio * 100); - String unlockedPercentage = String.format("%.2f", (allowedRecipes.size() / (double) allRecipes.size()) * 100); lore.add("§7Recipe Book Unlocked: §e" + unlockedPercentage + "§6%"); String baseLoadingBar = "─────────────────"; int maxBarLength = baseLoadingBar.length(); - int completedLength = (int) ((allowedRecipes.size() / (double) allRecipes.size()) * maxBarLength); - - String completedLoadingBar = "§2§m" + baseLoadingBar.substring(0, Math.min(completedLength, maxBarLength)); - int formattingCodeLength = 4; // Adjust this if you add or remove formatting codes - String uncompletedLoadingBar = "§7§m" + baseLoadingBar.substring(Math.min( - completedLoadingBar.length() - formattingCodeLength, // Adjust for added formatting codes - maxBarLength - )); + int completedLength = (int) Math.round(unlockedRatio * maxBarLength); + completedLength = Math.max(0, Math.min(completedLength, maxBarLength)); + + String completedLoadingBar = "§2§m" + baseLoadingBar.substring(0, completedLength); + String uncompletedLoadingBar = "§7§m" + baseLoadingBar.substring(completedLength); lore.add(completedLoadingBar + uncompletedLoadingBar + "§r §e" + allowedRecipes.size() + "§6/§e" + allRecipes.size()); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/redis/RedisAuthenticate.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/redis/RedisAuthenticate.java deleted file mode 100644 index 4e09c5320..000000000 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/redis/RedisAuthenticate.java +++ /dev/null @@ -1,50 +0,0 @@ -package net.swofty.type.skyblockgeneric.redis; - -import net.minestom.server.MinecraftServer; -import net.minestom.server.timer.TaskSchedule; -import net.swofty.commons.proxy.FromProxyChannels; -import net.swofty.proxyapi.redis.ProxyToClient; -import net.swofty.type.generic.data.mongodb.AuthenticationDatabase; -import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; -import org.json.JSONObject; - -import java.util.ArrayList; -import java.util.UUID; - -public class RedisAuthenticate implements ProxyToClient { - public static ArrayList toAuthenticate = new ArrayList<>(); - - public static void promptAuthentication(SkyBlockPlayer player) { - player.sendMessage("§aHey! You need to authenticate your account to play on this server."); - player.sendMessage("§aAll passwords are encrypted using modern standards, so you're safe!"); - player.sendMessage(" "); - - AuthenticationDatabase.AuthenticationData data = new AuthenticationDatabase(player.getUuid()).getAuthenticationData(); - if (data == null) { - player.sendMessage("§eYou must first sign-up to play this server!"); - player.sendMessage("§eIn the Minecraft chat, type §6signup §e."); - player.sendMessage("§eIt is not a command, it's just a message. Nobody else can see it."); - } else { - player.sendMessage("§eIn the Minecraft chat, type §6login §e."); - player.sendMessage("§eIt is not a command, it's just a message. Nobody else can see it."); - } - - MinecraftServer.getSchedulerManager().scheduleTask(() -> { - if (player.isOnline()) { - player.kick("§cYou have been kicked for not authenticating your account."); - } - }, TaskSchedule.seconds(30), TaskSchedule.stop()); - } - - @Override - public FromProxyChannels getChannel() { - return FromProxyChannels.PROMPT_PLAYER_FOR_AUTHENTICATION; - } - - @Override - public JSONObject onMessage(JSONObject message) { - UUID uuid = UUID.fromString(message.getString("uuid")); - toAuthenticate.add(uuid); - return new JSONObject(); - } -} diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/tabmodules/AccountInformationModule.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/tabmodules/AccountInformationModule.java index 2191a899c..9376e58fc 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/tabmodules/AccountInformationModule.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/tabmodules/AccountInformationModule.java @@ -1,24 +1,24 @@ package net.swofty.type.skyblockgeneric.tabmodules; +import net.kyori.adventure.text.Component; import net.swofty.commons.StringUtility; import net.swofty.commons.skyblock.statistics.ItemStatistic; import net.swofty.commons.skyblock.statistics.ItemStatistics; -import net.swofty.type.generic.user.HypixelPlayer; +import net.swofty.type.generic.data.datapoints.DatapointString; import net.swofty.type.generic.i18n.I18n; +import net.swofty.type.generic.tab.TablistModule; +import net.swofty.type.generic.tab.TablistSkinRegistry; +import net.swofty.type.generic.user.HypixelPlayer; import net.swofty.type.skyblockgeneric.data.SkyBlockDataHandler; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointBankData; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointSkillCategory; import net.swofty.type.skyblockgeneric.data.datapoints.DatapointSkills; -import net.swofty.type.generic.data.datapoints.DatapointString; import net.swofty.type.skyblockgeneric.skill.SkillCategories; -import net.swofty.type.generic.tab.TablistModule; -import net.swofty.type.generic.tab.TablistSkinRegistry; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class AccountInformationModule extends TablistModule { @@ -31,49 +31,20 @@ public List getEntries(SkyBlockPlayer player) { SkyBlockDataHandler dataHandler = player.getSkyblockDataHandler(); DatapointBankData.BankData bankData = dataHandler.get(SkyBlockDataHandler.Data.BANK_DATA, DatapointBankData.class).getValue(); - entries.add(new TablistEntry(I18n.string("tablist.account_info.profile_label", l, Map.of( - "profile_name", dataHandler.get(SkyBlockDataHandler.Data.PROFILE_NAME, DatapointString.class).getValue() - )), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.account_info.profile_label", l, Component.text(dataHandler.get(SkyBlockDataHandler.Data.PROFILE_NAME, DatapointString.class).getValue())), TablistSkinRegistry.GRAY)); entries.add(new TablistEntry(I18n.string("tablist.account_info.pet_sitter", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.account_info.bank", l, Map.of( - "amount", StringUtility.shortenNumber(bankData.getAmount()), - "limit", StringUtility.shortenNumber(bankData.getBalanceLimit()) - )), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.account_info.bank", l, Component.text(StringUtility.shortenNumber(bankData.getAmount())), Component.text(StringUtility.shortenNumber(bankData.getBalanceLimit()))), TablistSkinRegistry.GRAY)); entries.add(getGrayEntry()); SkillCategories skillCategory = dataHandler.get(SkyBlockDataHandler.Data.LAST_EDITED_SKILL, DatapointSkillCategory.class).getValue(); DatapointSkills.PlayerSkills skills = player.getSkills(); ItemStatistics playerStatistics = player.getStatistics().allStatistics(); - entries.add(new TablistEntry(I18n.string("tablist.account_info.skills_label", l, Map.of( - "skill", String.valueOf(skillCategory), - "level", String.valueOf(skills.getCurrentLevel(skillCategory)), - "percentage", String.valueOf(skills.getPercentage(skillCategory)) - )), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.account_info.speed", l, Map.of( - "color", ItemStatistic.SPEED.getDisplayColor(), - "symbol", ItemStatistic.SPEED.getSymbol(), - "value", String.valueOf(playerStatistics.getOverall(ItemStatistic.SPEED)) - )), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.account_info.strength", l, Map.of( - "color", ItemStatistic.STRENGTH.getDisplayColor(), - "symbol", ItemStatistic.STRENGTH.getSymbol(), - "value", String.valueOf(playerStatistics.getOverall(ItemStatistic.STRENGTH)) - )), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.account_info.crit_chance", l, Map.of( - "color", ItemStatistic.CRITICAL_CHANCE.getDisplayColor(), - "symbol", ItemStatistic.CRITICAL_CHANCE.getSymbol(), - "value", String.valueOf(playerStatistics.getOverall(ItemStatistic.CRITICAL_CHANCE)) - )), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.account_info.crit_damage", l, Map.of( - "color", ItemStatistic.CRITICAL_DAMAGE.getDisplayColor(), - "symbol", ItemStatistic.CRITICAL_DAMAGE.getSymbol(), - "value", String.valueOf(playerStatistics.getOverall(ItemStatistic.CRITICAL_DAMAGE)) - )), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.account_info.attack_speed", l, Map.of( - "color", ItemStatistic.BONUS_ATTACK_SPEED.getDisplayColor(), - "symbol", ItemStatistic.BONUS_ATTACK_SPEED.getSymbol(), - "value", String.valueOf(playerStatistics.getOverall(ItemStatistic.BONUS_ATTACK_SPEED)) - )), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.account_info.skills_label", l, Component.text(String.valueOf(skillCategory)), Component.text(String.valueOf(skills.getCurrentLevel(skillCategory))), Component.text(String.valueOf(skills.getPercentage(skillCategory)))), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.account_info.speed", l, Component.text(ItemStatistic.SPEED.getDisplayColor()), Component.text(ItemStatistic.SPEED.getSymbol()), Component.text(String.valueOf(playerStatistics.getOverall(ItemStatistic.SPEED)))), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.account_info.strength", l, Component.text(ItemStatistic.STRENGTH.getDisplayColor()), Component.text(ItemStatistic.STRENGTH.getSymbol()), Component.text(String.valueOf(playerStatistics.getOverall(ItemStatistic.STRENGTH)))), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.account_info.crit_chance", l, Component.text(ItemStatistic.CRITICAL_CHANCE.getDisplayColor()), Component.text(ItemStatistic.CRITICAL_CHANCE.getSymbol()), Component.text(String.valueOf(playerStatistics.getOverall(ItemStatistic.CRITICAL_CHANCE)))), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.account_info.crit_damage", l, Component.text(ItemStatistic.CRITICAL_DAMAGE.getDisplayColor()), Component.text(ItemStatistic.CRITICAL_DAMAGE.getSymbol()), Component.text(String.valueOf(playerStatistics.getOverall(ItemStatistic.CRITICAL_DAMAGE)))), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.account_info.attack_speed", l, Component.text(ItemStatistic.BONUS_ATTACK_SPEED.getDisplayColor()), Component.text(ItemStatistic.BONUS_ATTACK_SPEED.getSymbol()), Component.text(String.valueOf(playerStatistics.getOverall(ItemStatistic.BONUS_ATTACK_SPEED)))), TablistSkinRegistry.GRAY)); entries.add(getGrayEntry()); fillRestWithGray(entries); return entries; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/tabmodules/SkyBlockPlayersOnlineModule.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/tabmodules/SkyBlockPlayersOnlineModule.java index 65d0ca511..ea935a26a 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/tabmodules/SkyBlockPlayersOnlineModule.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/tabmodules/SkyBlockPlayersOnlineModule.java @@ -1,19 +1,19 @@ package net.swofty.type.skyblockgeneric.tabmodules; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.data.HypixelDataHandler; -import net.swofty.type.generic.user.HypixelPlayer; -import net.swofty.type.skyblockgeneric.SkyBlockGenericLoader; import net.swofty.type.generic.data.datapoints.DatapointRank; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; import net.swofty.type.generic.tab.TablistSkinRegistry; +import net.swofty.type.generic.user.HypixelPlayer; +import net.swofty.type.skyblockgeneric.SkyBlockGenericLoader; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Locale; -import java.util.Map; public class SkyBlockPlayersOnlineModule extends TablistModule { public int page; @@ -28,7 +28,7 @@ public List getEntries(SkyBlockPlayer player) { List players = SkyBlockGenericLoader.getLoadedPlayers(); ArrayList entries = new ArrayList<>(List.of( - new TablistEntry(getCentered(I18n.string("tablist.module.players", l, Map.of("count", String.valueOf(players.size())))), TablistSkinRegistry.GREEN) + new TablistEntry(getCentered(I18n.string("tablist.module.players", l, Component.text(String.valueOf(players.size())))), TablistSkinRegistry.GREEN) )); List toShow = new ArrayList<>(); diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/SkyBlockPlayer.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/SkyBlockPlayer.java index 82ce85395..b570aaf60 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/SkyBlockPlayer.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/SkyBlockPlayer.java @@ -99,8 +99,6 @@ public class SkyBlockPlayer extends HypixelPlayer { @Setter public boolean bypassBuild = false; @Setter - public boolean hasAuthenticated = true; - @Setter public boolean speedManaged = false; @Setter private SkyBlockIsland skyBlockIsland; diff --git a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/SkyBlockScoreboard.java b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/SkyBlockScoreboard.java index 98db123da..38b503c02 100644 --- a/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/SkyBlockScoreboard.java +++ b/type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/SkyBlockScoreboard.java @@ -1,5 +1,6 @@ package net.swofty.type.skyblockgeneric.user; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.entity.Player; import net.minestom.server.timer.Scheduler; @@ -56,92 +57,110 @@ public static void start() { continue; } - List lines = new ArrayList<>(); - lines.add("§7" + new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()) + " §8" + HypixelConst.getServerName()); - lines.add("§7 "); - lines.add("§f " + SkyBlockCalendar.getMonthName() + " " + StringUtility.ntify(SkyBlockCalendar.getDay())); - lines.add("§7 " + SkyBlockCalendar.getDisplay(SkyBlockCalendar.getElapsed())); + String date = new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()); + + List lines = new ArrayList<>(); + lines.add(I18n.t("scoreboard.common.date_line", Component.text(date), Component.text(HypixelConst.getServerName()))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.skyblock.calendar_date_line", + Component.text(SkyBlockCalendar.getMonthName()), + Component.text(StringUtility.ntify(SkyBlockCalendar.getDay())))); + lines.add(I18n.t("scoreboard.skyblock.calendar_time_line", + Component.text(SkyBlockCalendar.getDisplay(SkyBlockCalendar.getElapsed())))); try { RegionType type = region.getType(); String name = type.getName(); if (type == RegionType.PLAYER_MUSEUM) { name = name.formatted(player.getUsername()); } - lines.add("§7 ⏣ " + region.getType().getColor() + name); + lines.add(I18n.t("scoreboard.skyblock.region_line", + Component.text(region.getType().getColor() + name))); } catch (NullPointerException ignored) { - lines.add(" " + I18n.string("scoreboard.skyblock.region_unknown", l)); + lines.add(Component.space().append(I18n.t("scoreboard.skyblock.region_unknown"))); } - lines.add("§7 "); + lines.add(Component.text("§7 ")); // TODO: make classes / a manager for regions to display scoreboard information. if (region != null && region.getType() == RegionType.ELECTION_ROOM) { - lines.add("§6Year " + SkyBlockCalendar.getYear() + " Votes"); + lines.add(I18n.t("scoreboard.skyblock.election_votes_title", + Component.text(String.valueOf(SkyBlockCalendar.getYear())))); Map totalVotes = ElectionManager.getElectionData().tallyVotes(); long maxVotes = totalVotes.values().stream().mapToLong(Long::longValue).max().orElse(1); ElectionManager.getElectionData().getCandidates().forEach(candidate -> { long votes = totalVotes.getOrDefault(candidate.getMayorName(), 0L); int barLength = maxVotes > 0 ? (int) Math.round((votes * 15.0) / maxVotes) : 0; String bars = candidate.getColor() + "|".repeat(barLength) + "§f" + "|".repeat(15 - barLength); - lines.add(bars + " " + candidate.getColoredName()); + lines.add(I18n.t("scoreboard.skyblock.election_candidate_line", + Component.text(bars), + Component.text(candidate.getColoredName()))); }); } else { - lines.add(I18n.string("scoreboard.skyblock.purse_label", l) + StringUtility.commaify(dataHandler.get(SkyBlockDataHandler.Data.COINS, DatapointDouble.class).getValue())); - lines.add(I18n.string("scoreboard.skyblock.bits_label", l) + StringUtility.commaify(dataHandler.get(SkyBlockDataHandler.Data.BITS, DatapointInteger.class).getValue())); + lines.add(I18n.t("scoreboard.skyblock.purse_line", + Component.text(StringUtility.commaify(dataHandler.get(SkyBlockDataHandler.Data.COINS, DatapointDouble.class).getValue())))); + lines.add(I18n.t("scoreboard.skyblock.bits_line", + Component.text(StringUtility.commaify(dataHandler.get(SkyBlockDataHandler.Data.BITS, DatapointInteger.class).getValue())))); if (DarkAuctionHandler.isPlayerInAuction(player.getUuid()) && DarkAuctionHandler.getLocalState() != null && DarkAuctionHandler.getLocalState().getPhase() == DarkAuctionPhase.BIDDING ) { - lines.add("§8 "); + lines.add(Component.text("§8 ")); DarkAuctionHandler.DarkAuctionLocalState auctionState = DarkAuctionHandler.getLocalState(); int timeRemaining = DarkAuctionHandler.getTimeLeft().get(); - lines.add(I18n.string("scoreboard.skyblock.dark_auction.time_left_label", l) + timeRemaining + I18n.string("scoreboard.skyblock.dark_auction.time_left_suffix", l)); - lines.add(I18n.string("scoreboard.skyblock.dark_auction.current_item_label", l)); + lines.add(I18n.t("scoreboard.skyblock.dark_auction.time_left_line", + Component.text(String.valueOf(timeRemaining)))); + lines.add(I18n.t("scoreboard.skyblock.dark_auction.current_item_label")); String currentItem = auctionState.getCurrentItemType(); if (currentItem != null) { try { ItemType itemType = ItemType.valueOf(currentItem); SkyBlockItem item = new SkyBlockItem(itemType); - lines.add(" " + item.getDisplayName()); + lines.add(Component.space().append( + I18n.t("scoreboard.skyblock.dark_auction.current_item_line", + Component.text(item.getDisplayName())))); } catch (Exception e) { - lines.add(" §f" + currentItem.replace("_", " ")); + lines.add(Component.space().append( + I18n.t("scoreboard.skyblock.dark_auction.current_item_line", + Component.text(currentItem.replace("_", " "))))); } } else { - lines.add(" " + I18n.string("scoreboard.skyblock.dark_auction.waiting", l)); + lines.add(Component.space().append(I18n.t("scoreboard.skyblock.dark_auction.waiting"))); } } else { if (region != null && !missionData.getActiveMissions(region.getType()).isEmpty()) { - lines.add("§7 "); + lines.add(Component.text("§7 ")); MissionData.ActiveMission mission = missionData.getActiveMissions(region.getType()).getFirst(); SkyBlockMission skyBlockMission = MissionData.getMissionClass(mission.getMissionID()); if (skyBlockMission instanceof LocationAssociatedMission locationAssociatedMission) { - lines.add(I18n.string("scoreboard.skyblock.objective_label", l) + " " + BlockUtility.getArrow( + lines.add(I18n.t("scoreboard.skyblock.objective_with_arrow", Component.text(BlockUtility.getArrow( player.getPosition(), locationAssociatedMission.getLocation() - )); - lines.add("§e" + mission); + )))); + lines.add(Component.text("§e" + mission)); } else { - lines.add(I18n.string("scoreboard.skyblock.objective_label", l)); - lines.add("§e" + mission); + lines.add(I18n.t("scoreboard.skyblock.objective_label")); + lines.add(Component.text("§e" + mission)); } SkyBlockProgressMission progressMission = missionData.getAsProgressMission(mission.getMissionID()); - if (progressMission != null) - lines.add("§7 (§e" + mission.getMissionProgress() + "§7/§a" + progressMission.getMaxProgress() + "§7)"); + if (progressMission != null) { + lines.add(I18n.t("scoreboard.skyblock.objective_progress", + Component.text(String.valueOf(mission.getMissionProgress())), + Component.text(String.valueOf(progressMission.getMaxProgress())))); + } } } } - lines.add("§7 "); - lines.add(I18n.string("scoreboard.common.footer", l)); - - String title = " " + getSidebarName(skyblockName, false, l) - + (player.isCoop() ? " " + I18n.string("scoreboard.skyblock.coop_suffix", l) + " " : " "); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.common.footer")); + Component title = Component.text(" ") + .append(Component.text(getSidebarName(skyblockName, false, l))); if (!scoreboard.hasScoreboard(player)) { scoreboard.createScoreboard(player, title); } diff --git a/type.skywarsgame/src/main/java/net/swofty/type/skywarsgame/SkywarsGameScoreboard.java b/type.skywarsgame/src/main/java/net/swofty/type/skywarsgame/SkywarsGameScoreboard.java index f85967501..66da3341a 100644 --- a/type.skywarsgame/src/main/java/net/swofty/type/skywarsgame/SkywarsGameScoreboard.java +++ b/type.skywarsgame/src/main/java/net/swofty/type/skywarsgame/SkywarsGameScoreboard.java @@ -1,5 +1,6 @@ package net.swofty.type.skywarsgame; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.entity.Player; import net.minestom.server.timer.Scheduler; @@ -9,7 +10,6 @@ import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.scoreboard.HypixelScoreboard; import net.swofty.type.generic.user.HypixelPlayer; -import net.swofty.type.skywarsgame.TypeSkywarsGameLoader; import net.swofty.type.skywarsgame.game.SkywarsGame; import net.swofty.type.skywarsgame.game.SkywarsGameStatus; import net.swofty.type.skywarsgame.user.SkywarsPlayer; @@ -19,7 +19,6 @@ import java.util.Date; import java.util.List; import java.util.Locale; -import java.util.Map; public class SkywarsGameScoreboard { private static final HypixelScoreboard scoreboard = new HypixelScoreboard(); @@ -40,68 +39,77 @@ public static void start() { Locale l = player.getLocale(); SkywarsPlayer swPlayer = (SkywarsPlayer) player; + String date = new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()); - List lines = new ArrayList<>(); - lines.add("§7" + new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()) + " §8" + HypixelConst.getServerName()); - lines.add("§7 "); + List lines = new ArrayList<>(); + lines.add(I18n.t("scoreboard.common.date_line", Component.text(date), Component.text(HypixelConst.getServerName()))); + lines.add(Component.text("§7 ")); if (game.getGameStatus() == SkywarsGameStatus.IN_PROGRESS) { long elapsedMs = System.currentTimeMillis() - game.getGameStartTime(); long elapsedSeconds = elapsedMs / 1000; - String nextEventLine = getNextEventLine(game.getCurrentEvent(), elapsedSeconds, l); + Component nextEventLine = getNextEventLine(game.getCurrentEvent(), elapsedSeconds); if (nextEventLine != null) { - lines.add(I18n.string("scoreboard.skywars_game.next_event_label", l)); + lines.add(I18n.t("scoreboard.skywars_game.next_event_label")); lines.add(nextEventLine); - lines.add("§7 "); + lines.add(Component.text("§7 ")); } int alive = (int) game.getPlayers().stream().filter(p -> !p.isEliminated()).count(); - lines.add(I18n.string("scoreboard.skywars_game.players_left_label", l) + alive); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.skywars_game.kills_label", l) + swPlayer.getKillsThisGame()); + lines.add(I18n.t("scoreboard.skywars_game.players_left_line", Component.text(String.valueOf(alive)))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.skywars_game.kills_line", Component.text(String.valueOf(swPlayer.getKillsThisGame())))); } else if (game.getGameStatus() == SkywarsGameStatus.ENDING) { - lines.add(I18n.string("scoreboard.skywars_game.top_killers_label", l)); + lines.add(I18n.t("scoreboard.skywars_game.top_killers_label")); java.util.List topKillers = game.getPlayers().stream() .sorted((a, b) -> Integer.compare(b.getKillsThisGame(), a.getKillsThisGame())) .limit(3) .toList(); - String[] places = { - I18n.string("scoreboard.skywars_game.place_1st", l), - I18n.string("scoreboard.skywars_game.place_2nd", l), - I18n.string("scoreboard.skywars_game.place_3rd", l) + Component[] places = { + I18n.t("scoreboard.skywars_game.place_1st"), + I18n.t("scoreboard.skywars_game.place_2nd"), + I18n.t("scoreboard.skywars_game.place_3rd") }; for (int i = 0; i < topKillers.size(); i++) { SkywarsPlayer killer = topKillers.get(i); - lines.add(places[i] + " §f" + killer.getUsername() + " §7- §a" + killer.getKillsThisGame()); + lines.add(I18n.t("scoreboard.skywars_game.top_killer_line", + places[i], + Component.text(killer.getUsername()), + Component.text(String.valueOf(killer.getKillsThisGame())))); } - lines.add("§7 "); - lines.add(I18n.string("scoreboard.skywars_game.your_kills_label", l) + swPlayer.getKillsThisGame()); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.skywars_game.your_kills_line", Component.text(String.valueOf(swPlayer.getKillsThisGame())))); } else if (game.getGameStatus() == SkywarsGameStatus.WAITING) { - lines.add(I18n.string("scoreboard.skywars_game.players_label", l) + game.getPlayers().size() + "/" + game.getGameType().getMaxPlayers()); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.skywars_game.waiting", l)); + lines.add(I18n.t("scoreboard.skywars_game.players_line", + Component.text(String.valueOf(game.getPlayers().size())), + Component.text(String.valueOf(game.getGameType().getMaxPlayers())))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.skywars_game.waiting")); } else if (game.getGameStatus() == SkywarsGameStatus.STARTING) { - lines.add(I18n.string("scoreboard.skywars_game.players_label", l) + game.getPlayers().size() + "/" + game.getGameType().getMaxPlayers()); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.skywars_game.starting_in_label", l) + game.getCountdown().getSecondsRemaining() + I18n.string("scoreboard.skywars_game.starting_in_suffix", l)); + lines.add(I18n.t("scoreboard.skywars_game.players_line", + Component.text(String.valueOf(game.getPlayers().size())), + Component.text(String.valueOf(game.getGameType().getMaxPlayers())))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.skywars_game.starting_in_line", + Component.text(String.valueOf(game.getCountdown().getSecondsRemaining())))); } - lines.add("§7 "); - lines.add(I18n.string("scoreboard.skywars_game.map_label", l) + game.getMapEntry().getName()); - lines.add(I18n.string("scoreboard.skywars_game.mode_label", l) + game.getGameType().getDisplayName()); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.common.footer", l)); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.skywars_game.map_line", Component.text(game.getMapEntry().getName()))); + lines.add(I18n.t("scoreboard.skywars_game.mode_line", Component.text(game.getGameType().getDisplayName()))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.common.footer")); if (!scoreboard.hasScoreboard(player)) { - scoreboard.createScoreboard(player, getSidebarName(animationFrame, l)); + scoreboard.createScoreboard(player, Component.text(getSidebarName(animationFrame, l))); } scoreboard.updateLines(player, lines); - scoreboard.updateTitle(player, getSidebarName(animationFrame, l)); + scoreboard.updateTitle(player, Component.text(getSidebarName(animationFrame, l))); } return TaskSchedule.tick(4); }); @@ -127,21 +135,21 @@ private static String getSidebarName(int counter, Locale locale) { } } - private static String getNextEventLine(SkywarsGame.GameEvent currentEvent, long elapsedSeconds, Locale locale) { + private static Component getNextEventLine(SkywarsGame.GameEvent currentEvent, long elapsedSeconds) { SkywarsGame.GameEvent nextEvent = currentEvent.getNext(); return switch (nextEvent) { case FIRST_REFILL -> { long timeUntil = Math.max(0, SkywarsGame.FIRST_REFILL_SECONDS - elapsedSeconds); - yield I18n.string("scoreboard.skywars_game.event_refill", locale, Map.of("time", formatTime(timeUntil))); + yield I18n.t("scoreboard.skywars_game.event_refill", Component.text(formatTime(timeUntil))); } case SECOND_REFILL -> { long timeUntil = Math.max(0, SkywarsGame.SECOND_REFILL_SECONDS - elapsedSeconds); - yield I18n.string("scoreboard.skywars_game.event_refill", locale, Map.of("time", formatTime(timeUntil))); + yield I18n.t("scoreboard.skywars_game.event_refill", Component.text(formatTime(timeUntil))); } case DRAGON_SPAWN -> { long timeUntil = Math.max(0, SkywarsGame.DRAGON_SPAWN_SECONDS - elapsedSeconds); - yield I18n.string("scoreboard.skywars_game.event_dragon", locale, Map.of("time", formatTime(timeUntil))); + yield I18n.t("scoreboard.skywars_game.event_dragon", Component.text(formatTime(timeUntil))); } case GAME_END, GAME_START -> null; }; diff --git a/type.skywarslobby/src/main/java/net/swofty/type/skywarslobby/SkyWarsLobbyScoreboard.java b/type.skywarslobby/src/main/java/net/swofty/type/skywarslobby/SkyWarsLobbyScoreboard.java index 9103eca39..a520fc0a2 100644 --- a/type.skywarslobby/src/main/java/net/swofty/type/skywarslobby/SkyWarsLobbyScoreboard.java +++ b/type.skywarslobby/src/main/java/net/swofty/type/skywarslobby/SkyWarsLobbyScoreboard.java @@ -1,5 +1,6 @@ package net.swofty.type.skywarslobby; +import net.kyori.adventure.text.Component; import net.minestom.server.MinecraftServer; import net.minestom.server.entity.Player; import net.minestom.server.timer.Scheduler; @@ -61,29 +62,31 @@ public static void start() { long doublesWins = modeStats.getWins(SkywarsLeaderboardMode.DOUBLES, SkywarsLeaderboardPeriod.LIFETIME); int level = SkywarsLevelRegistry.calculateLevel(experience); - - List lines = new ArrayList<>(); - lines.add("§7" + new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()) + " §8" + HypixelConst.getServerName()); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.skywars_lobby.your_level_label", l) + " " + SkyWarsLevelColor.getLevelDisplay(level)); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.skywars_lobby.solo_kills_label", l) + soloKills); - lines.add(I18n.string("scoreboard.skywars_lobby.solo_wins_label", l) + soloWins); - lines.add(I18n.string("scoreboard.skywars_lobby.doubles_kills_label", l) + doublesKills); - lines.add(I18n.string("scoreboard.skywars_lobby.doubles_wins_label", l) + doublesWins); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.skywars_lobby.coins_label", l) + coins); - lines.add(I18n.string("scoreboard.skywars_lobby.souls_label", l) + souls); - lines.add(I18n.string("scoreboard.skywars_lobby.tokens_label", l) + tokens); - lines.add("§7 "); - lines.add(I18n.string("scoreboard.common.footer", l)); + String date = new SimpleDateFormat(I18n.string("scoreboard.common.date_format", l)).format(new Date()); + + List lines = new ArrayList<>(); + lines.add(I18n.t("scoreboard.common.date_line", Component.text(date), Component.text(HypixelConst.getServerName()))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.skywars_lobby.your_level_line", + Component.text(SkyWarsLevelColor.getLevelDisplay(level)))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.skywars_lobby.solo_kills_line", Component.text(String.valueOf(soloKills)))); + lines.add(I18n.t("scoreboard.skywars_lobby.solo_wins_line", Component.text(String.valueOf(soloWins)))); + lines.add(I18n.t("scoreboard.skywars_lobby.doubles_kills_line", Component.text(String.valueOf(doublesKills)))); + lines.add(I18n.t("scoreboard.skywars_lobby.doubles_wins_line", Component.text(String.valueOf(doublesWins)))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.skywars_lobby.coins_line", Component.text(String.valueOf(coins)))); + lines.add(I18n.t("scoreboard.skywars_lobby.souls_line", Component.text(String.valueOf(souls)))); + lines.add(I18n.t("scoreboard.skywars_lobby.tokens_line", Component.text(String.valueOf(tokens)))); + lines.add(Component.text("§7 ")); + lines.add(I18n.t("scoreboard.common.footer")); if (!scoreboard.hasScoreboard(player)) { - scoreboard.createScoreboard(player, getSidebarName(animationFrame, l)); + scoreboard.createScoreboard(player, Component.text(getSidebarName(animationFrame, l))); } scoreboard.updateLines(player, lines); - scoreboard.updateTitle(player, getSidebarName(animationFrame, l)); + scoreboard.updateTitle(player, Component.text(getSidebarName(animationFrame, l))); } return TaskSchedule.tick(4); }); diff --git a/type.spidersden/src/main/java/net/swofty/type/spidersden/tab/SpidersDenServerModule.java b/type.spidersden/src/main/java/net/swofty/type/spidersden/tab/SpidersDenServerModule.java index 1b8d2662f..43bf6d32e 100644 --- a/type.spidersden/src/main/java/net/swofty/type/spidersden/tab/SpidersDenServerModule.java +++ b/type.spidersden/src/main/java/net/swofty/type/spidersden/tab/SpidersDenServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.spidersden.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class SpidersDenServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.spiders_den", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.theend/src/main/java/net/swofty/type/theend/tab/TheEndServerModule.java b/type.theend/src/main/java/net/swofty/type/theend/tab/TheEndServerModule.java index 586cc9871..4de1fd0bc 100644 --- a/type.theend/src/main/java/net/swofty/type/theend/tab/TheEndServerModule.java +++ b/type.theend/src/main/java/net/swofty/type/theend/tab/TheEndServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.theend.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class TheEndServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.the_end", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.thefarmingislands/src/main/java/net/swofty/type/thefarmingislands/tab/TheFarmingIslandsServerModule.java b/type.thefarmingislands/src/main/java/net/swofty/type/thefarmingislands/tab/TheFarmingIslandsServerModule.java index 2b6c4e110..f535466f0 100644 --- a/type.thefarmingislands/src/main/java/net/swofty/type/thefarmingislands/tab/TheFarmingIslandsServerModule.java +++ b/type.thefarmingislands/src/main/java/net/swofty/type/thefarmingislands/tab/TheFarmingIslandsServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.thefarmingislands.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class TheFarmingIslandsServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.the_farming_islands", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/type.thepark/src/main/java/net/swofty/type/thepark/tab/TheParkServerModule.java b/type.thepark/src/main/java/net/swofty/type/thepark/tab/TheParkServerModule.java index ae0bd5ed0..e35b8fdb8 100644 --- a/type.thepark/src/main/java/net/swofty/type/thepark/tab/TheParkServerModule.java +++ b/type.thepark/src/main/java/net/swofty/type/thepark/tab/TheParkServerModule.java @@ -1,5 +1,6 @@ package net.swofty.type.thepark.tab; +import net.kyori.adventure.text.Component; import net.swofty.type.generic.HypixelConst; import net.swofty.type.generic.i18n.I18n; import net.swofty.type.generic.tab.TablistModule; @@ -9,7 +10,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.Map; public class TheParkServerModule extends TablistModule { @Override @@ -20,7 +20,7 @@ public List getEntries(HypixelPlayer player) { )); entries.add(new TablistEntry(I18n.string("tablist.server_info.area.the_park", l), TablistSkinRegistry.GRAY)); - entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Map.of("server_name", HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); + entries.add(new TablistEntry(I18n.string("tablist.server_info.server_label", l, Component.text(HypixelConst.getServerName())), TablistSkinRegistry.GRAY)); fillRestWithGray(entries); diff --git a/velocity.extension/src/main/java/net/swofty/velocity/SkyBlockVelocity.java b/velocity.extension/src/main/java/net/swofty/velocity/SkyBlockVelocity.java index fd68bc039..ef279e003 100644 --- a/velocity.extension/src/main/java/net/swofty/velocity/SkyBlockVelocity.java +++ b/velocity.extension/src/main/java/net/swofty/velocity/SkyBlockVelocity.java @@ -44,13 +44,19 @@ import net.swofty.commons.proxy.FromProxyChannels; import net.swofty.commons.punishment.ActivePunishment; import net.swofty.commons.punishment.PunishmentMessages; +import net.swofty.commons.punishment.PunishmentReason; +import net.swofty.commons.punishment.PunishmentTag; import net.swofty.commons.punishment.PunishmentType; import net.swofty.proxyapi.ProxyService; import net.swofty.proxyapi.redis.ServerOutboundMessage; import net.swofty.redisapi.api.RedisAPI; import net.swofty.velocity.command.LimboCommand; +import net.swofty.velocity.command.LobbyCommand; +import net.swofty.velocity.command.LoginCommand; import net.swofty.velocity.command.ProtocolVersionCommand; +import net.swofty.velocity.command.RegisterCommand; import net.swofty.velocity.command.ServerStatusCommand; +import net.swofty.velocity.data.AuthenticationDatabase; import net.swofty.velocity.data.CoopDatabase; import net.swofty.velocity.data.ProfilesDatabase; import net.swofty.velocity.data.UserDatabase; @@ -67,7 +73,6 @@ import net.swofty.velocity.testflow.TestFlowManager; import net.swofty.velocity.viaversion.injector.SkyBlockViaInjector; import net.swofty.velocity.viaversion.loader.SkyBlockVLLoader; -import org.json.JSONObject; import org.reflections.Reflections; import java.lang.reflect.InvocationTargetException; @@ -77,7 +82,9 @@ import java.util.List; import java.util.Objects; import java.util.Set; +import java.util.UUID; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; @@ -85,272 +92,315 @@ import java.util.stream.Stream; @Plugin( - id = "skyblock", - name = "SkyBlock", - version = "1.0", - description = "SkyBlock plugin for Velocity", - authors = {"Swofty"} + id = "skyblock", + name = "SkyBlock", + version = "1.0", + description = "SkyBlock plugin for Velocity", + authors = {"Swofty"} ) public class SkyBlockVelocity { - @Getter - private static ProxyServer server = null; - @Getter - private static SkyBlockVelocity plugin; - @Getter - private static RegisteredServer limboServer; - @Getter - private static boolean shouldAuthenticate = false; - @Getter - private static boolean supportCrossVersion = false; - @Inject - private ProxyServer proxy; - - @Inject - public SkyBlockVelocity(ProxyServer tempServer, Logger tempLogger, @DataDirectory Path dataDirectory) { - plugin = this; - server = tempServer; - - Settings.LimboSettings limbo = ConfigProvider.settings().getLimbo(); - limboServer = server.registerServer(new ServerInfo("limbo", new InetSocketAddress(limbo.getHostName(), limbo.getPort()))); - } - - @Subscribe - public void onProxyInitialization(ProxyInitializeEvent event) { - server = proxy; - shouldAuthenticate = ConfigProvider.settings().isRequireAuth(); - supportCrossVersion = ConfigProvider.settings().getIntegrations().isViaVersion(); - - // Initialize ViaVersion for cross-version support - if (supportCrossVersion) { - ViaLoader.init(null, new SkyBlockVLLoader(), new SkyBlockViaInjector(), null, ViaBackwardsPlatformImpl::new, ViaRewindPlatformImpl::new); - } - - // Register packets - server.getEventManager().register(this, PostLoginEvent.class, - (AwaitingEventExecutor) postLoginEvent -> EventTask.withContinuation(continuation -> { - injectPlayer(postLoginEvent.getPlayer()); - TestFlowManager.handlePlayerJoin(postLoginEvent.getPlayer().getUsername()); - PresencePublisher.publish(postLoginEvent.getPlayer(), true, (String) null, null); - - // Broadcast staff join notification (servers will check if player is staff) - ListenerStaffChat.broadcastStaffJoin(postLoginEvent.getPlayer().getUniqueId()); - - continuation.resume(); - })); - server.getEventManager().register(this, PermissionsSetupEvent.class, - (AwaitingEventExecutor) permissionsEvent -> EventTask.withContinuation(continuation -> { - permissionsEvent.setProvider(_ -> PermissionFunction.ALWAYS_FALSE); - continuation.resume(); - })); - server.getEventManager().register(this, DisconnectEvent.class, PostOrder.LAST, - (AwaitingEventExecutor) disconnectEvent -> - disconnectEvent.getLoginStatus() == DisconnectEvent.LoginStatus.CONFLICTING_LOGIN - ? null - : EventTask.async(() -> { - // Broadcast staff leave notification (servers will check if player is staff) - ListenerStaffChat.broadcastStaffLeave(disconnectEvent.getPlayer().getUniqueId()); - - // Handle test flow player leave - TestFlowManager.handlePlayerLeave(disconnectEvent.getPlayer().getUsername()); - PresencePublisher.publish(disconnectEvent.getPlayer(), false, (String) null, null); - removePlayer(disconnectEvent.getPlayer()); - }) - ); - - server.getEventManager().register(this, ServerConnectedEvent.class, - (AwaitingEventExecutor) serverConnectedEvent -> - EventTask.async(() -> { - RegisteredServer newServer = serverConnectedEvent.getServer(); - var type = GameManager.getTypeFromRegisteredServer(newServer); - PresencePublisher.publish(serverConnectedEvent.getPlayer(), true, newServer, type != null ? type.name() : null); - })); + @Getter + private static ProxyServer server = null; + @Getter + private static SkyBlockVelocity plugin; + @Getter + private static RegisteredServer limboServer; + @Getter + private static boolean supportCrossVersion = false; + @Inject + private ProxyServer proxy; + + @Getter + private static final Set unauthenticated = ConcurrentHashMap.newKeySet(); + + @Inject + public SkyBlockVelocity(ProxyServer tempServer, Logger tempLogger, @DataDirectory Path dataDirectory) { + plugin = this; + server = tempServer; + + Settings.LimboSettings limbo = ConfigProvider.settings().getLimbo(); + limboServer = server.registerServer(new ServerInfo("limbo", new InetSocketAddress(limbo.getHostName(), limbo.getPort()))); + } + + @Subscribe + public void onProxyInitialization(ProxyInitializeEvent event) { + server = proxy; + supportCrossVersion = ConfigProvider.settings().getIntegrations().isViaVersion(); + + // Initialize ViaVersion for cross-version support + if (supportCrossVersion) { + ViaLoader.init(null, new SkyBlockVLLoader(), new SkyBlockViaInjector(), null, ViaBackwardsPlatformImpl::new, ViaRewindPlatformImpl::new); + } + + // Register packets + server.getEventManager().register(this, PostLoginEvent.class, + (AwaitingEventExecutor) postLoginEvent -> EventTask.withContinuation(continuation -> { + injectPlayer(postLoginEvent.getPlayer()); + TestFlowManager.handlePlayerJoin(postLoginEvent.getPlayer().getUsername()); + PresencePublisher.publish(postLoginEvent.getPlayer(), true, (String) null, null); + + // Broadcast staff join notification (servers will check if player is staff) + ListenerStaffChat.broadcastStaffJoin(postLoginEvent.getPlayer().getUniqueId()); + + continuation.resume(); + })); + server.getEventManager().register(this, PermissionsSetupEvent.class, + (AwaitingEventExecutor) permissionsEvent -> EventTask.withContinuation(continuation -> { + permissionsEvent.setProvider(_ -> PermissionFunction.ALWAYS_FALSE); + continuation.resume(); + })); + server.getEventManager().register(this, DisconnectEvent.class, PostOrder.LAST, + (AwaitingEventExecutor) disconnectEvent -> + disconnectEvent.getLoginStatus() == DisconnectEvent.LoginStatus.CONFLICTING_LOGIN + ? null + : EventTask.async(() -> { + // Broadcast staff leave notification (servers will check if player is staff) + ListenerStaffChat.broadcastStaffLeave(disconnectEvent.getPlayer().getUniqueId()); + + // Handle test flow player leave + TestFlowManager.handlePlayerLeave(disconnectEvent.getPlayer().getUsername()); + PresencePublisher.publish(disconnectEvent.getPlayer(), false, (String) null, null); + removePlayer(disconnectEvent.getPlayer()); + }) + ); + + server.getEventManager().register(this, ServerConnectedEvent.class, + (AwaitingEventExecutor) serverConnectedEvent -> + EventTask.async(() -> { + RegisteredServer newServer = serverConnectedEvent.getServer(); + var type = GameManager.getTypeFromRegisteredServer(newServer); + PresencePublisher.publish(serverConnectedEvent.getPlayer(), true, newServer, type != null ? type.name() : null); + })); server.getScheduler().buildTask(SkyBlockVelocity.getPlugin(), () -> { server.getAllPlayers().forEach(player -> { var current = player.getCurrentServer(); var type = current.map(conn -> GameManager.getTypeFromRegisteredServer(conn.getServer())).orElse(null); PresencePublisher.publish(player, true, current.map(ServerConnection::getServer).orElse(null), - type != null ? type.name() : null); + type != null ? type.name() : null); }); }).repeat(Duration.ofSeconds(10)).schedule(); - // Register commands - CommandManager commandManager = proxy.getCommandManager(); - CommandMeta statusCommandMeta = commandManager.metaBuilder("serverstatus") - .aliases("status") - .plugin(this) - .build(); - - commandManager.register(statusCommandMeta, new ServerStatusCommand()); - - CommandMeta protocolVersionMeta = commandManager.metaBuilder("protocolversion") - .aliases("protocol") - .plugin(this) - .build(); - - commandManager.register(protocolVersionMeta, new ProtocolVersionCommand()); - - CommandMeta limboCommandMeta = commandManager.metaBuilder("limbo") - .plugin(this) - .build(); - - commandManager.register(limboCommandMeta, new LimboCommand()); - - // Handle database - new ProfilesDatabase("_placeHolder").connect(ConfigProvider.settings().getMongodb()); - UserDatabase.connect(ConfigProvider.settings().getMongodb()); - CoopDatabase.connect(ConfigProvider.settings().getMongodb()); - - // Setup Redis - RedisAPI.generateInstance(ConfigProvider.settings().getRedisUri()); - RedisAPI.getInstance().setFilterId("proxy"); - loopThroughPackage("net.swofty.velocity.redis.listeners", RedisListener.class) - .forEach(listener -> { - RedisAPI.getInstance().registerChannel( - listener.getClass().getAnnotation(ChannelListener.class).channel().getChannelName(), - (event2) -> { - listener.onMessage(event2.channel, event2.message); - }); - }); - for (FromProxyChannels channel : FromProxyChannels.values()) { - RedisMessage.registerProxyToServer(channel); - } - loopThroughPackage("net.swofty.commons.protocol.objects", ProtocolObject.class) - .forEach(ServerOutboundMessage::registerFromProtocolObject); - RedisAPI.getInstance().startListeners(); - - // Setup GameManager - GameManager.loopServers(server); - } - - private boolean checkPunished(Player player) { - try { - ProxyService service = new ProxyService(ServiceType.PUNISHMENT); - - CompletableFuture banFuture = service.handleRequest( - new GetActivePunishmentProtocolObject.GetActivePunishmentMessage(player.getUniqueId(), PunishmentType.BAN.name())); - CompletableFuture muteFuture = service.handleRequest( - new GetActivePunishmentProtocolObject.GetActivePunishmentMessage(player.getUniqueId(), PunishmentType.MUTE.name())); - - CompletableFuture.allOf(banFuture, muteFuture).orTimeout(3, TimeUnit.SECONDS).join(); - - Object banResult = banFuture.join(); - if (banResult instanceof GetActivePunishmentProtocolObject.GetActivePunishmentResponse banResponse && banResponse.found()) { - ActivePunishment punishment = new ActivePunishment( - banResponse.type(), banResponse.banId(), banResponse.reason(), banResponse.expiresAt(), banResponse.tags()); - player.disconnect(PunishmentMessages.banMessage(punishment)); - return true; - } - - Object muteResult = muteFuture.join(); - if (muteResult instanceof GetActivePunishmentProtocolObject.GetActivePunishmentResponse muteResponse && muteResponse.found()) { - ActivePunishment punishment = new ActivePunishment( - muteResponse.type(), muteResponse.banId(), muteResponse.reason(), muteResponse.expiresAt(), muteResponse.tags()); - player.sendMessage(PunishmentMessages.muteMessage(punishment)); - } - return false; - } catch (Exception e) { - return false; - } - } - - @Subscribe - public EventTask onPlayerJoin(PlayerChooseInitialServerEvent event) { - return EventTask.async(() -> { - Player player = event.getPlayer(); - - if (checkPunished(player)) { - return; - } - - if (!GameManager.hasType(ServerType.PROTOTYPE_LOBBY) || !GameManager.isAnyEmpty(ServerType.PROTOTYPE_LOBBY)) { - player.disconnect( - Component.text("§cThere are no Prototype Lobby servers available at the moment.") - ); - return; - } - - List gameServers = GameManager.getFromType(ServerType.PROTOTYPE_LOBBY); - if (TestFlowManager.isPlayerInTestFlow(player.getUsername())) { - TestFlowManager.ProxyTestFlowInstance instance = TestFlowManager.getTestFlowForPlayer(player.getUsername()); - player.sendPlainMessage("§7You are currently in test flow " + instance.getName() + "."); - player.sendPlainMessage("§7Servers involved include " + instance.getGameServers().stream().map(GameManager.GameServer::displayName).collect(Collectors.joining(", "))); - player.sendPlainMessage("§7We are expecting " + instance.getTotalExpectedServers() + " servers to instantiate."); - player.sendPlainMessage("§7Test flow has been running for " + instance.getUptime() / 1000 + " seconds."); - - gameServers.removeIf(server -> { - TestFlowManager.ProxyTestFlowInstance testFlowInstance = TestFlowManager.getFromServerUUID( - server.internalID() - ); - - return testFlowInstance == null || !instance.hasServer(server.internalID()); - }); - } else { - gameServers.removeIf(server -> { - TestFlowManager.ProxyTestFlowInstance testFlowInstance = TestFlowManager.getFromServerUUID( - server.internalID() - ); - - return testFlowInstance != null; - }); - } - - if (gameServers.isEmpty()) { - player.disconnect( - Component.text("§cThere are no servers (type=PROTOTYPE_LOBBY) servers available at the moment.") - ); - return; - } - - List configurations = BalanceConfigurations.configurations.get(ServerType.BEDWARS_LOBBY); - GameManager.GameServer toSendTo = gameServers.getFirst(); - - for (BalanceConfiguration configuration : configurations) { - GameManager.GameServer server = configuration.getServer(player, gameServers); - if (server != null) { - toSendTo = server; - break; - } - } - - // TODO: Force Resource Pack - event.setInitialServer(toSendTo.registeredServer()); - - if (shouldAuthenticate) { - RedisMessage.sendMessageToServer(toSendTo.internalID(), - FromProxyChannels.PROMPT_PLAYER_FOR_AUTHENTICATION, - new JSONObject().put("uuid", player.getUniqueId().toString())); - } - }); - } - - @Subscribe - public void onServerCrash(KickedFromServerEvent event) { - if (checkPunished(event.getPlayer())) { - return; - } - - // Send the player to the limbo - RegisteredServer originalServer = event.getServer(); - Component reason = event.getServerKickReason().orElse(Component.text( - "§cYour connection to the server was lost. Please try again later." - )); - ServerType serverType = GameManager.getTypeFromRegisteredServer(originalServer); - - event.setResult(KickedFromServerEvent.RedirectPlayer.create( - limboServer, - null - )); - - TransferHandler transferHandler = new TransferHandler(event.getPlayer()); - transferHandler.transferTo(serverType); - - CompletableFuture.delayedExecutor(GameManager.SLEEP_TIME + 300, TimeUnit.MILLISECONDS) - .execute(() -> { - // Determine if the registeredServer disconnect was due to a crash - // if it was, then we send the player back to another registeredServer - // of that type, otherwise we disconnect them for the same - // reason as the original + // Register commands + CommandManager commandManager = proxy.getCommandManager(); + CommandMeta statusCommandMeta = commandManager.metaBuilder("serverstatus") + .aliases("status") + .plugin(this) + .build(); + + CommandMeta protocolVersionMeta = commandManager.metaBuilder("protocolversion") + .aliases("protocol") + .plugin(this) + .build(); + + CommandMeta limboCommandMeta = commandManager.metaBuilder("limbo") + .plugin(this) + .build(); + + CommandMeta loginCommandMeta = commandManager.metaBuilder("login") + .plugin(this) + .build(); + + CommandMeta registerCommandMeta = commandManager.metaBuilder("register") + .plugin(this) + .build(); + + CommandMeta lobbyCommandMeta = commandManager.metaBuilder("lobby") + .plugin(this) + .build(); + + commandManager.register(statusCommandMeta, new ServerStatusCommand()); + commandManager.register(protocolVersionMeta, new ProtocolVersionCommand()); + commandManager.register(limboCommandMeta, new LimboCommand()); + commandManager.register(loginCommandMeta, new LoginCommand()); + commandManager.register(registerCommandMeta, new RegisterCommand()); + commandManager.register(lobbyCommandMeta, new LobbyCommand()); + + // Handle database + new ProfilesDatabase("_placeHolder").connect(ConfigProvider.settings().getMongodb()); + new AuthenticationDatabase(new UUID(0, 0)).connect(ConfigProvider.settings().getMongodb()); + UserDatabase.connect(ConfigProvider.settings().getMongodb()); + CoopDatabase.connect(ConfigProvider.settings().getMongodb()); + + // Setup Redis + RedisAPI.generateInstance(ConfigProvider.settings().getRedisUri()); + RedisAPI.getInstance().setFilterId("proxy"); + loopThroughPackage("net.swofty.velocity.redis.listeners", RedisListener.class) + .forEach(listener -> { + RedisAPI.getInstance().registerChannel( + listener.getClass().getAnnotation(ChannelListener.class).channel().getChannelName(), + (event2) -> { + listener.onMessage(event2.channel, event2.message); + }); + }); + for (FromProxyChannels channel : FromProxyChannels.values()) { + RedisMessage.registerProxyToServer(channel); + } + loopThroughPackage("net.swofty.commons.protocol.objects", ProtocolObject.class) + .forEach(ServerOutboundMessage::registerFromProtocolObject); + RedisAPI.getInstance().startListeners(); + + // Setup GameManager + GameManager.loopServers(server); + } + + private boolean checkPunished(Player player) { + try { + ProxyService service = new ProxyService(ServiceType.PUNISHMENT); + + CompletableFuture banFuture = service.handleRequest( + new GetActivePunishmentProtocolObject.GetActivePunishmentMessage(player.getUniqueId(), PunishmentType.BAN.name())); + CompletableFuture muteFuture = service.handleRequest( + new GetActivePunishmentProtocolObject.GetActivePunishmentMessage(player.getUniqueId(), PunishmentType.MUTE.name())); + + CompletableFuture.allOf(banFuture, muteFuture).orTimeout(3, TimeUnit.SECONDS).join(); + + Object banResult = banFuture.join(); + if (banResult instanceof GetActivePunishmentProtocolObject.GetActivePunishmentResponse( + boolean found1, String type1, String id, PunishmentReason reason1, + long at, List tags1 + ) && found1) { + ActivePunishment punishment = new ActivePunishment( + type1, id, reason1, at, tags1); + player.disconnect(PunishmentMessages.banMessage(punishment)); + return true; + } + + Object muteResult = muteFuture.join(); + if (muteResult instanceof GetActivePunishmentProtocolObject.GetActivePunishmentResponse( + boolean found, String type, String banId, PunishmentReason reason, + long expiresAt, List tags + ) && found) { + ActivePunishment punishment = new ActivePunishment( + type, banId, reason, expiresAt, tags); + player.sendMessage(PunishmentMessages.muteMessage(punishment)); + } + return false; + } catch (Exception e) { + return false; + } + } + + @Subscribe + public EventTask onPlayerJoin(PlayerChooseInitialServerEvent event) { + return EventTask.async(() -> { + final Player player = event.getPlayer(); + + if (checkPunished(player)) { + return; + } + + if (ConfigProvider.settings().isRequireAuth()) { + unauthenticated.add(player.getUniqueId()); + event.setInitialServer(limboServer); + + player.sendPlainMessage("§aHey! You need to authenticate your account to play on this server."); + player.sendPlainMessage("§aAll passwords are encrypted using modern standards, so you're safe!"); + player.sendPlainMessage(" "); + + AuthenticationDatabase.AuthenticationData data = new AuthenticationDatabase(player.getUniqueId()).getAuthenticationData(); + if (data == null) { + player.sendPlainMessage("§eYou must first register to play this server!"); + player.sendPlainMessage("§eIn the Minecraft chat, type §6/register §e."); + } else { + player.sendPlainMessage("§eIn the Minecraft chat, type §6/login §e."); + } + + server.getScheduler().buildTask(SkyBlockVelocity.getPlugin(), () -> { + if (player.isActive() && unauthenticated.contains(player.getUniqueId())) { + player.disconnect(Component.text("§cYou have been kicked for not authenticating your account.")); + } + }).delay(Duration.ofSeconds(30)).schedule(); + return; + } + + if (!GameManager.hasType(ServerType.PROTOTYPE_LOBBY) || !GameManager.isAnyEmpty(ServerType.PROTOTYPE_LOBBY)) { + player.disconnect( + Component.text("§cThere are no Prototype Lobby servers available at the moment.") + ); + return; + } + + List gameServers = GameManager.getFromType(ServerType.PROTOTYPE_LOBBY); + if (TestFlowManager.isPlayerInTestFlow(player.getUsername())) { + TestFlowManager.ProxyTestFlowInstance instance = TestFlowManager.getTestFlowForPlayer(player.getUsername()); + player.sendPlainMessage("§7You are currently in test flow " + instance.getName() + "."); + player.sendPlainMessage("§7Servers involved include " + instance.getGameServers().stream().map(GameManager.GameServer::displayName).collect(Collectors.joining(", "))); + player.sendPlainMessage("§7We are expecting " + instance.getTotalExpectedServers() + " servers to instantiate."); + player.sendPlainMessage("§7Test flow has been running for " + instance.getUptime() / 1000 + " seconds."); + + gameServers.removeIf(server -> { + TestFlowManager.ProxyTestFlowInstance testFlowInstance = TestFlowManager.getFromServerUUID( + server.internalID() + ); + + return testFlowInstance == null || !instance.hasServer(server.internalID()); + }); + } else { + gameServers.removeIf(server -> { + TestFlowManager.ProxyTestFlowInstance testFlowInstance = TestFlowManager.getFromServerUUID( + server.internalID() + ); + + return testFlowInstance != null; + }); + } + + if (gameServers.isEmpty()) { + player.disconnect( + Component.text("§cThere are no servers (type=PROTOTYPE_LOBBY) servers available at the moment.") + ); + return; + } + + List configurations = BalanceConfigurations.configurations.get(ServerType.BEDWARS_LOBBY); + GameManager.GameServer toSendTo = gameServers.getFirst(); + + for (BalanceConfiguration configuration : configurations) { + GameManager.GameServer server = configuration.getServer(player, gameServers); + if (server != null) { + toSendTo = server; + break; + } + } + + // TODO: Force Resource Pack + event.setInitialServer(toSendTo.registeredServer()); + }); + } + + @Subscribe + public void onPlayerDisconnect(DisconnectEvent event) { + unauthenticated.remove(event.getPlayer().getUniqueId()); + } + + @Subscribe + public void onServerCrash(KickedFromServerEvent event) { + if (checkPunished(event.getPlayer())) { + return; + } + + // Send the player to the limbo + RegisteredServer originalServer = event.getServer(); + Component reason = event.getServerKickReason().orElse(Component.text( + "§cYour connection to the server was lost. Please try again later." + )); + ServerType serverType = GameManager.getTypeFromRegisteredServer(originalServer); + + event.setResult(KickedFromServerEvent.RedirectPlayer.create( + limboServer, + null + )); + + TransferHandler transferHandler = new TransferHandler(event.getPlayer()); + transferHandler.transferTo(serverType); + + CompletableFuture.delayedExecutor(GameManager.SLEEP_TIME + 300, TimeUnit.MILLISECONDS) + .execute(() -> { + // Determine if the registeredServer disconnect was due to a crash + // if it was, then we send the player back to another registeredServer + // of that type, otherwise we disconnect them for the same + // reason as the original /*boolean isOnline = GameManager.getFromRegisteredServer(originalServer) != null; if (isOnline) { @@ -359,48 +409,48 @@ public void onServerCrash(KickedFromServerEvent event) { return; }*/ - try { - ServerType serverTypeToTry = serverType; - if (!GameManager.hasType(serverTypeToTry) || !GameManager.isAnyEmpty(serverTypeToTry)) { - serverTypeToTry = ServerType.PROTOTYPE_LOBBY; - } - - GameManager.GameServer server = BalanceConfigurations.getServerFor(event.getPlayer(), serverTypeToTry); - if (server == null) { - transferHandler.forceRemoveFromLimbo(); - event.getPlayer().disconnect(reason); - return; - } - transferHandler.transferTo(server.registeredServer()); - - if (!serverTypeToTry.isSkyBlock()) { - event.getPlayer().sendPlainMessage("§cAn exception occurred in your connection, so you were put into the Prototype Lobby."); - } else { - event.getPlayer().sendPlainMessage("§cAn exception occurred in your connection, so you were put into another SkyBlock server."); - } - event.getPlayer().sendPlainMessage("§7Sending to server " + server.displayName() + "..."); - } catch (Exception e) { - Logger.getAnonymousLogger().log(Level.SEVERE, "An exception occurred while trying to transfer " + event.getPlayer().getUsername() + " to " + serverType, e); - transferHandler.forceRemoveFromLimbo(); - event.getPlayer().disconnect(reason); - } - }); - } + try { + ServerType serverTypeToTry = serverType; + if (!GameManager.hasType(serverTypeToTry) || !GameManager.isAnyEmpty(serverTypeToTry)) { + serverTypeToTry = ServerType.PROTOTYPE_LOBBY; + } + + GameManager.GameServer server = BalanceConfigurations.getServerFor(event.getPlayer(), serverTypeToTry); + if (server == null) { + transferHandler.forceRemoveFromLimbo(); + event.getPlayer().disconnect(reason); + return; + } + transferHandler.transferTo(server.registeredServer()); + + if (!serverTypeToTry.isSkyBlock()) { + event.getPlayer().sendPlainMessage("§cAn exception occurred in your connection, so you were put into the Prototype Lobby."); + } else { + event.getPlayer().sendPlainMessage("§cAn exception occurred in your connection, so you were put into another SkyBlock server."); + } + event.getPlayer().sendPlainMessage("§7Sending to server " + server.displayName() + "..."); + } catch (Exception e) { + Logger.getAnonymousLogger().log(Level.SEVERE, "An exception occurred while trying to transfer " + event.getPlayer().getUsername() + " to " + serverType, e); + transferHandler.forceRemoveFromLimbo(); + event.getPlayer().disconnect(reason); + } + }); + } @Subscribe public void onPing(ProxyPingEvent event) { event.setPing(new ServerPing( - event.getPing().getVersion(), - null, - Component.text(" §aHypixel Recreation §c[1.8-1.21]"), - event.getPing().getFavicon().orElse(null) + event.getPing().getVersion(), + null, + Component.text(" §aHypixel Recreation §c[1.8-1.21]"), + event.getPing().getFavicon().orElse(null) )); } - @Subscribe - public void onPlayerConnect(ServerPostConnectEvent event) { - Player player = event.getPlayer(); - if (!(player.getProtocolVersion().getProtocol() >= ProtocolVersion.MAXIMUM_VERSION.getProtocol())) { + @Subscribe + public void onPlayerConnect(ServerPostConnectEvent event) { + Player player = event.getPlayer(); + if (!(player.getProtocolVersion().getProtocol() >= ProtocolVersion.MAXIMUM_VERSION.getProtocol())) { String message = "\n" + "§6§l----------- §cServer Notice §6§l-----------\n" + "§cAlthough we do support versions prior to §6" + ProtocolVersion.MAXIMUM_VERSION.getVersionIntroducedIn() + "§c, the experience may be degraded.\n" + @@ -408,46 +458,48 @@ public void onPlayerConnect(ServerPostConnectEvent event) { "§6§l---------------------------------\n" + "\n"; - player.sendMessage(Component.text(message)); - } - - player.getCurrentServer().ifPresent(connection -> { - if (connection.getServer() == limboServer) { - player.sendMessage(Component.text("§cYou were spawned in Limbo.")); - player.sendMessage(Component.text("§b/limbo for more information.")); - } - }); - } - - public static Stream loopThroughPackage(String packageName, Class clazz) { - Reflections reflections = new Reflections(packageName); - Set> subTypes = reflections.getSubTypesOf(clazz); - - return subTypes.stream() - .map(subClass -> { - try { - return clazz.cast(subClass.getDeclaredConstructor().newInstance()); - } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | - InvocationTargetException e) { - return null; - } - }) - .filter(Objects::nonNull); - } - - private void injectPlayer(Player player) { - final ConnectedPlayer connectedPlayer = (ConnectedPlayer) player; - Channel channel = connectedPlayer.getConnection().getChannel(); - ChannelPipeline pipeline = channel.pipeline(); - pipeline.addBefore(Connections.HANDLER, "PACKET", new PlayerChannelHandler(player)); - } - - private void removePlayer(final Player player) { - final ConnectedPlayer connectedPlayer = (ConnectedPlayer) player; - final Channel channel = connectedPlayer.getConnection().getChannel(); - - channel.eventLoop().submit(() -> { - channel.pipeline().remove("PACKET"); - }); - } + player.sendMessage(Component.text(message)); + } + + player.getCurrentServer().ifPresent(connection -> { + if (connection.getServer() == limboServer) { + if (unauthenticated.contains(player.getUniqueId())) return; + + player.sendMessage(Component.text("§cYou were spawned in Limbo.")); + player.sendMessage(Component.text("§b/limbo for more information.")); + } + }); + } + + public static Stream loopThroughPackage(String packageName, Class clazz) { + Reflections reflections = new Reflections(packageName); + Set> subTypes = reflections.getSubTypesOf(clazz); + + return subTypes.stream() + .map(subClass -> { + try { + return clazz.cast(subClass.getDeclaredConstructor().newInstance()); + } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | + InvocationTargetException e) { + return null; + } + }) + .filter(Objects::nonNull); + } + + private void injectPlayer(final Player player) { + final ConnectedPlayer connectedPlayer = (ConnectedPlayer) player; + Channel channel = connectedPlayer.getConnection().getChannel(); + ChannelPipeline pipeline = channel.pipeline(); + pipeline.addBefore(Connections.HANDLER, "PACKET", new PlayerChannelHandler(player)); + } + + private void removePlayer(final Player player) { + final ConnectedPlayer connectedPlayer = (ConnectedPlayer) player; + final Channel channel = connectedPlayer.getConnection().getChannel(); + + channel.eventLoop().submit(() -> { + channel.pipeline().remove("PACKET"); + }); + } } diff --git a/velocity.extension/src/main/java/net/swofty/velocity/command/LobbyCommand.java b/velocity.extension/src/main/java/net/swofty/velocity/command/LobbyCommand.java new file mode 100644 index 000000000..08957b8e8 --- /dev/null +++ b/velocity.extension/src/main/java/net/swofty/velocity/command/LobbyCommand.java @@ -0,0 +1,20 @@ +package net.swofty.velocity.command; + +import com.velocitypowered.api.command.CommandSource; +import com.velocitypowered.api.command.SimpleCommand; +import com.velocitypowered.api.proxy.Player; +import net.swofty.commons.ServerType; +import net.swofty.velocity.gamemanager.TransferHandler; + +public class LobbyCommand implements SimpleCommand { + + @Override + public void execute(Invocation invocation) { + CommandSource source = invocation.source(); + if (!(source instanceof Player player)) { + return; + } + + new TransferHandler(player).transferTo(ServerType.PROTOTYPE_LOBBY); + } +} diff --git a/velocity.extension/src/main/java/net/swofty/velocity/command/LoginCommand.java b/velocity.extension/src/main/java/net/swofty/velocity/command/LoginCommand.java new file mode 100644 index 000000000..a3d1b9493 --- /dev/null +++ b/velocity.extension/src/main/java/net/swofty/velocity/command/LoginCommand.java @@ -0,0 +1,51 @@ +package net.swofty.velocity.command; + +import com.velocitypowered.api.command.CommandSource; +import com.velocitypowered.api.command.SimpleCommand; +import com.velocitypowered.api.proxy.Player; +import net.swofty.commons.ServerType; +import net.swofty.commons.config.ConfigProvider; +import net.swofty.velocity.SkyBlockVelocity; +import net.swofty.velocity.data.AuthenticationDatabase; +import net.swofty.velocity.gamemanager.TransferHandler; + +public class LoginCommand implements SimpleCommand { + + @Override + public boolean hasPermission(Invocation invocation) { + return ConfigProvider.settings().isRequireAuth(); + } + + @Override + public void execute(Invocation invocation) { + CommandSource source = invocation.source(); + if (!(source instanceof Player player)) { + return; + } + + if (!ConfigProvider.settings().isRequireAuth()) return; + + if (!SkyBlockVelocity.getUnauthenticated().contains(player.getUniqueId())) return; + + String[] args = invocation.arguments(); + if (args.length != 1) { + player.sendPlainMessage("§cIn the Minecraft chat, type §6/login §c."); + player.sendPlainMessage("§cIt is not a command, it's just a message. Nobody else can see it."); + return; + } + + AuthenticationDatabase.AuthenticationData data = new AuthenticationDatabase(player.getUniqueId()).getAuthenticationData(); + if (data == null) { + player.sendPlainMessage("§cYou must do §6/register §cfirst!"); + return; + } + + if (data.matches(args[0])) { + SkyBlockVelocity.getUnauthenticated().remove(player.getUniqueId()); + player.sendPlainMessage("§aYou have successfully logged in!"); + new TransferHandler(player).transferTo(ServerType.PROTOTYPE_LOBBY); + } else { + player.sendPlainMessage("§cYour password is incorrect."); + } + } +} diff --git a/velocity.extension/src/main/java/net/swofty/velocity/command/RegisterCommand.java b/velocity.extension/src/main/java/net/swofty/velocity/command/RegisterCommand.java new file mode 100644 index 000000000..c304cf1b2 --- /dev/null +++ b/velocity.extension/src/main/java/net/swofty/velocity/command/RegisterCommand.java @@ -0,0 +1,50 @@ +package net.swofty.velocity.command; + +import com.velocitypowered.api.command.CommandSource; +import com.velocitypowered.api.command.SimpleCommand; +import com.velocitypowered.api.proxy.Player; +import net.swofty.commons.config.ConfigProvider; +import net.swofty.velocity.SkyBlockVelocity; +import net.swofty.velocity.data.AuthenticationDatabase; + +public class RegisterCommand implements SimpleCommand { + + @Override + public boolean hasPermission(Invocation invocation) { + return ConfigProvider.settings().isRequireAuth(); + } + + @Override + public void execute(Invocation invocation) { + CommandSource source = invocation.source(); + if (!(source instanceof Player player)) { + return; + } + + if (!ConfigProvider.settings().isRequireAuth()) return; + if (!SkyBlockVelocity.getUnauthenticated().contains(player.getUniqueId())) return; + + AuthenticationDatabase.AuthenticationData data = new AuthenticationDatabase(player.getUniqueId()).getAuthenticationData(); + if (data != null) { + player.sendPlainMessage("§cYou have already registered your account!"); + } + + String[] args = invocation.arguments(); + if (args.length != 2) { + player.sendPlainMessage("§cYou must first register to play this server!"); + player.sendPlainMessage("§cIn the Minecraft chat, type §6/register §c."); + return; + } + + if (!args[0].equals(args[1])) { + player.sendPlainMessage("§cYour passwords do not match."); + return; + } + + AuthenticationDatabase.AuthenticationData newData = AuthenticationDatabase.makeFromPassword(args[1]); + new AuthenticationDatabase(player.getUniqueId()).setAuthenticationData(newData); + + player.sendPlainMessage("§aYou have successfully registered your account!"); + player.sendPlainMessage("§aNow, in the Minecraft chat, type §6/login §a."); + } +} diff --git a/type.generic/src/main/java/net/swofty/type/generic/data/mongodb/AuthenticationDatabase.java b/velocity.extension/src/main/java/net/swofty/velocity/data/AuthenticationDatabase.java similarity index 89% rename from type.generic/src/main/java/net/swofty/type/generic/data/mongodb/AuthenticationDatabase.java rename to velocity.extension/src/main/java/net/swofty/velocity/data/AuthenticationDatabase.java index d038111d1..49edce822 100644 --- a/type.generic/src/main/java/net/swofty/type/generic/data/mongodb/AuthenticationDatabase.java +++ b/velocity.extension/src/main/java/net/swofty/velocity/data/AuthenticationDatabase.java @@ -1,7 +1,10 @@ -package net.swofty.type.generic.data.mongodb; +package net.swofty.velocity.data; +import com.mongodb.ConnectionString; +import com.mongodb.MongoClientSettings; import com.mongodb.client.FindIterable; import com.mongodb.client.MongoClient; +import com.mongodb.client.MongoClients; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import com.mongodb.client.model.Filters; @@ -19,12 +22,18 @@ import java.util.UUID; public record AuthenticationDatabase(UUID id) implements MongoDB { + public static MongoClient client; public static MongoDatabase database; public static MongoCollection collection; - public static void connect(MongoClient client) { + public MongoDB connect(String connectionString) { + ConnectionString cs = new ConnectionString(connectionString); + MongoClientSettings settings = MongoClientSettings.builder().applyConnectionString(cs).build(); + client = MongoClients.create(settings); + database = client.getDatabase("Minestom"); collection = database.getCollection("authentication"); + return this; } @Override @@ -93,7 +102,7 @@ public boolean exists() { if (document == null) { return null; } - return AuthenticationData.deserialize(document); + return AuthenticationDatabase.AuthenticationData.deserialize(document); } public void setAuthenticationData(AuthenticationData data) { diff --git a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/BalanceConfigurations.java b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/BalanceConfigurations.java index 1d213ec82..ada937516 100644 --- a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/BalanceConfigurations.java +++ b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/BalanceConfigurations.java @@ -2,9 +2,8 @@ import com.velocitypowered.api.proxy.Player; import net.swofty.commons.ServerType; -import net.swofty.velocity.gamemanager.balanceconfigurations.IslandCheck; -import net.swofty.velocity.gamemanager.balanceconfigurations.LowestPlayerCount; -import net.swofty.velocity.gamemanager.balanceconfigurations.ReadyGames; +import net.swofty.velocity.gamemanager.impl.IslandCheck; +import net.swofty.velocity.gamemanager.impl.LowestPlayerCount; import net.swofty.velocity.testflow.TestFlowManager; import org.jetbrains.annotations.Nullable; @@ -57,30 +56,27 @@ public class BalanceConfigurations { Map.entry(ServerType.SKYBLOCK_JERRYS_WORKSHOP, List.of( new LowestPlayerCount() )), - Map.entry(ServerType.PROTOTYPE_LOBBY, List.of( new LowestPlayerCount() )), - Map.entry(ServerType.BEDWARS_LOBBY, List.of( new LowestPlayerCount() )), Map.entry(ServerType.BEDWARS_GAME, List.of( - new ReadyGames() + new LowestPlayerCount() )), Map.entry(ServerType.SKYWARS_LOBBY, List.of( new LowestPlayerCount() )), Map.entry(ServerType.SKYWARS_GAME, List.of( - new ReadyGames() + new LowestPlayerCount() )), Map.entry(ServerType.MURDER_MYSTERY_LOBBY, List.of( new LowestPlayerCount() )), Map.entry(ServerType.MURDER_MYSTERY_GAME, List.of( - new ReadyGames() + new LowestPlayerCount() )), - Map.entry(ServerType.SKYWARS_CONFIGURATOR, List.of( new LowestPlayerCount() )), diff --git a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/TransferHandler.java b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/TransferHandler.java index b50d9e635..a65046391 100644 --- a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/TransferHandler.java +++ b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/TransferHandler.java @@ -132,10 +132,18 @@ public void previousServerIsFinished() { } public void transferTo(ServerType type) { - new Thread(() -> { - playersGoalServerType.put(player, type); - sendToLimbo().join(); - }).start(); + if (type == null) { + return; + } + + GameManager.GameServer server = BalanceConfigurations.getServerFor(player, type); + if (server == null) { + player.sendMessage(Component.text("§cThere are no Hypixel (type=" + type.name() + ") servers available at the moment.")); + return; + } + + player.sendMessage(Component.text("§7Sending to server " + server.displayName() + "...")); + transferTo(server.registeredServer()); } public void forceRemoveFromLimbo() { diff --git a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/balanceconfigurations/ReadyGames.java b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/balanceconfigurations/ReadyGames.java deleted file mode 100644 index 6a063b9c1..000000000 --- a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/balanceconfigurations/ReadyGames.java +++ /dev/null @@ -1,20 +0,0 @@ -package net.swofty.velocity.gamemanager.balanceconfigurations; - -import com.velocitypowered.api.proxy.Player; -import net.swofty.velocity.gamemanager.BalanceConfiguration; -import net.swofty.velocity.gamemanager.GameManager; - -import java.util.List; - -public class ReadyGames extends BalanceConfiguration { - - @Override - public GameManager.GameServer getServer(Player player, List servers) { - return servers.stream().max((server1, server2) -> { // TODO: currently checks for which has the most players - int server1Players = server1.registeredServer().getPlayersConnected().size(); - int server2Players = server2.registeredServer().getPlayersConnected().size(); - - return Integer.compare(server1Players, server2Players); - }).orElse(null); - } -} diff --git a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/balanceconfigurations/IslandCheck.java b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/impl/IslandCheck.java similarity index 87% rename from velocity.extension/src/main/java/net/swofty/velocity/gamemanager/balanceconfigurations/IslandCheck.java rename to velocity.extension/src/main/java/net/swofty/velocity/gamemanager/impl/IslandCheck.java index b5f7c845e..d3a67d5c0 100644 --- a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/balanceconfigurations/IslandCheck.java +++ b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/impl/IslandCheck.java @@ -1,4 +1,4 @@ -package net.swofty.velocity.gamemanager.balanceconfigurations; +package net.swofty.velocity.gamemanager.impl; import com.velocitypowered.api.proxy.Player; import net.swofty.commons.ServerType; @@ -19,20 +19,22 @@ import java.util.concurrent.atomic.AtomicReference; public class IslandCheck extends BalanceConfiguration { + @Override public GameManager.GameServer getServer(Player player, List servers) { Document userDatabase = new UserDatabase(player.getUniqueId()).getDocument(); if (userDatabase == null || !userDatabase.containsKey("selected")) { return null; } + UUID activeProfile = UUID.fromString(userDatabase.getString("selected")); Document document = new ProfilesDatabase(activeProfile.toString()).getDocument(); if (document == null || !document.containsKey("island_uuid") || - document.getString("island_uuid").equals("null")) { + document.getString("island_uuid").equals("null")) { return null; } - UUID islandUUID = UUID.fromString(document.getString("island_uuid").replace("\"", "")); + UUID islandUUID = UUID.fromString(document.getString("island_uuid").replace("\"", "")); AtomicReference toSendTo = getGameServerAtomicReference(islandUUID); return toSendTo.get(); @@ -49,9 +51,9 @@ private static AtomicReference getGameServerAtomicRefere gameServers.forEach(gameServer -> { JSONObject jsonResponse = RedisMessage.sendMessageToServer( - gameServer.internalID(), - FromProxyChannels.DOES_SERVER_HAVE_ISLAND, - new JSONObject().put("island-uuid", islandUUID.toString())).join(); + gameServer.internalID(), + FromProxyChannels.DOES_SERVER_HAVE_ISLAND, + new JSONObject().put("island-uuid", islandUUID.toString())).join(); boolean hasIsland = jsonResponse.getBoolean("server-has-it"); diff --git a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/balanceconfigurations/LowestPlayerCount.java b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/impl/LowestPlayerCount.java similarity index 91% rename from velocity.extension/src/main/java/net/swofty/velocity/gamemanager/balanceconfigurations/LowestPlayerCount.java rename to velocity.extension/src/main/java/net/swofty/velocity/gamemanager/impl/LowestPlayerCount.java index 29da2fedf..35a56e11c 100644 --- a/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/balanceconfigurations/LowestPlayerCount.java +++ b/velocity.extension/src/main/java/net/swofty/velocity/gamemanager/impl/LowestPlayerCount.java @@ -1,4 +1,4 @@ -package net.swofty.velocity.gamemanager.balanceconfigurations; +package net.swofty.velocity.gamemanager.impl; import com.velocitypowered.api.proxy.Player; import net.swofty.velocity.gamemanager.BalanceConfiguration;