diff --git a/API Version.txt b/API Version.txt index 79c95fd..f7fb999 100644 --- a/API Version.txt +++ b/API Version.txt @@ -1 +1 @@ -## API-VERSION 1.2.3 ## \ No newline at end of file +## API-VERSION 1.2.4 ## \ No newline at end of file diff --git a/config.yml b/config.yml index 7dd0140..6f945dd 100644 --- a/config.yml +++ b/config.yml @@ -277,13 +277,13 @@ blocked-item-list: - "END_PORTAL" - "PORTAL" -# This is the list where specific materials can be given direct limitation to the maximum buy and sell price. +# This is the list where specific materials can be given direct limitation to the maximum buy and sell price (max per one of that material in a stack "outside unit count"). max-material-prices: DIAMOND_SWORD: buy: 50000.0 sell: 25000.0 -# This is the list where specific materials can be given direct limitation to the minimum buy and sell price. +# This is the list where specific materials can be given direct limitation to the minimum buy and sell price (min per one of that material in a stack "outside unit count"). min-material-prices: DIAMOND_SWORD: buy: 100.0 diff --git a/lang.yml b/lang.yml index f2f5310..3815046 100644 --- a/lang.yml +++ b/lang.yml @@ -1,7 +1,7 @@ ## Inside this file is where all messages and heavy text related feature can be modified. ## ## Normal Messages ## -no-permission: "{bar}&cYou do not have permission to use this." +no-permission: "&cYou do not have permission to use this." must-be-player: "&cYou must be a player to use this." reload: "&aYou have re-loaded all shops and the configuration file." world-invalid: "&cThe world &e{world} &ais invalid." @@ -9,28 +9,28 @@ player-invalid: "&cThe player entered is either invalid or offline." shop-invalid: "&cThere is no shop at this location. Please look directly at the base block of the shop." invalid-amount: "&cThe amount entered must be a proper numerical value." negative-entry: "&cA negative value is not a suitable entry." -max-shops: "{bar}&cYou have reached the maximum shops you can have at once." -shop-admin: "{bar}&aYou have set this shop to a &cAdmin &ashop. It now has no owner." -shop-admin-revert: "{bar}&aThis shop has been reverted from an admin shop and turned into your shop!" +max-shops: "&cYou have reached the maximum shops you can have at once." +shop-admin: "&aYou have set this shop to a &cAdmin &ashop. It now has no owner." +shop-admin-revert: "&aThis shop has been reverted from an admin shop and turned into your shop!" shop-infinite-stock: "&cThis admin shop has an infinite stock. There is no need to perform this action. &cUse &e/ds stock &cto change the stock from infinite." -shop-deleted: "{bar}&cYou have destroyed a display shop." +shop-deleted: "&cYou have destroyed a display shop." shop-created: "&aYou have created a new display shop! &eShift + Right-Click &athe base block of the shop with the item you want it to buy or sell to finish the shop." -shop-edit-invalid: "{bar}&cYou are not currently editing a shop." -shop-invalid-item: "{bar}&cThis shop has no valid item to sell or buy." -shop-low-stock: "{bar}&cThis shop is too low on stock." -shop-buy: "{bar}&aYou have purchased &r{item}&r &ex&6{amount} &afrom this shop &afor &e${price}&a!" -shop-buy-invalid: "{bar}&cThis shop does not sell items." -shop-sell: "{bar}&aYou have sold &r{item}&r &ex&6{amount} &ato this shop &afor &e${price}&a!" -shop-sell-invalid: "{bar}&cThis shop does not buy items." -insufficient-funds: "{bar}&cYou do not have &e${price} &cto perform this action." -insufficient-space: "{bar}&cYou require more inventory space to perform this action. (Space Available: &e{space}&c)" -insufficient-items: "{bar}&cYou do not have items to deposit into the stock of the shop." +shop-edit-invalid: "&cYou are not currently editing a shop." +shop-invalid-item: "&cThis shop has no valid item to sell or buy." +shop-low-stock: "&cThis shop is too low on stock." +shop-buy: "&aYou have purchased &r{item}&r &ex&6{amount} &afrom this shop &afor &e${price}&a!" +shop-buy-invalid: "&cThis shop does not sell items." +shop-sell: "&aYou have sold &r{item}&r &ex&6{amount} &ato this shop &afor &e${price}&a!" +shop-sell-invalid: "&cThis shop does not buy items." +insufficient-funds: "&cYou do not have &e${price} &cto perform this action." +insufficient-space: "&cYou require more inventory space to perform this action. (Space Available: &e{space}&c)" +insufficient-items: "&cYou do not have items to deposit into the stock of the shop." transaction-all-fail: "&cUnable to perform this action due to the lack of units." no-affordable-units: "&cYou are unable to afford any units at this time." -shop-max-stock: "{bar}&cThis shop is maxed out at &e{max} &cstock (Max Stock)." -shop-invalid-amount: "{bar}&cYou need at least &e{amount} &cof the item used by the shop to sell it to the shop." -received-creation-item: "{bar}&aYou have been given &e{amount} &ashop creation items." -given-creation-item: "{bar}&e{player} &ahas been given &e{amount} &ashop creation items." +shop-max-stock: "&cThis shop is maxed out at &e{max} &cstock (Max Stock)." +shop-invalid-amount: "&cYou need at least &e{amount} &cof the item used by the shop to sell it to the shop." +received-creation-item: "&aYou have been given &e{amount} &ashop creation items." +given-creation-item: "&e{player} &ahas been given &e{amount} &ashop creation items." set-item-invalid: "&cPlease hold an item and set the item of the shop by &eRight-Clicking &cthe base block of the shop." shop-item-set: "&aYou have set the item of the shop. &eRight-Click &athe base block of the shop to edit the shop." buy-price-change: "&aPlease enter the new buy price per unit (Type &e{cancel} &ato cancel. Use &e-1 &ato disable):" @@ -40,96 +40,96 @@ deposit-stock: "&aPlease enter the amount you would like to deposit into the sto item-change: "&aThe stock of this shop was dropped at the base location and the shop item was cleared. Please &eShift + Right-Click &athe shop with the new item you would like it to use!" item-change-amount: "&aPlease enter the stack size you would like the shop item to have (Type &e{cancel} &ato cancel):" -buy-price-set: "{bar}&aYou have set the buy price of this shop to &e${price}&a." -sell-price-set: "{bar}&aYou have set the sell price of this shop to &e${price}&a." -buying-disabled: "{bar}&aYou have blocked players from being able to buy from this shop." -selling-disabled: "{bar}&aYou have blocked players from being able to sell to this shop." -stock-withdraw-fail: "{bar}&cThere is not enough stock in this shop to withdraw &e{amount}&c." -stock-deposit-fail: "{bar}&cThe shop is either at max stock or you do not have enough items." -owner-insufficient-funds: "{bar}&cThe owner of this shop is unable to afford your business." -shop-buy-bypass: "{bar}&aYou have purchased &r{item}&r &ex&6{amount} &afrom this shop! (Bypassed Transaction)" -invalid-stock: "{bar}&cThe stock amount you entered was invalid. The value must be less than the max stock size." -stock-set: "{bar}&aThe stock of the shop has been set to &e{amount}&a." -shop-set-owner: "{bar}&aThe owner of the shop has been set to &e{player}&a." -too-close: "{bar}&cYou are unable to create a shop at this location since another shop is nearby." -purchased-creation-item: "{bar}&aYou have purchased &e{amount} &ashop creation item(s) for &e${price}&a." -preview-item-action-bar: "{bar}&7\u2B05 &aHover over the text in the chat to preview." -quick-withdraw: "{bar}&aYou have withdrew &e{amount} &astock from this shop." -quick-deposit: "{bar}&aYou have deposited &e{amount} &astock into this shop." -limit-reset: "{bar}&aYou have reset the buy and sell limit of this shop." +buy-price-set: "&aYou have set the buy price of this shop to &e${price}&a." +sell-price-set: "&aYou have set the sell price of this shop to &e${price}&a." +buying-disabled: "&aYou have blocked players from being able to buy from this shop." +selling-disabled: "&aYou have blocked players from being able to sell to this shop." +stock-withdraw-fail: "&cThere is not enough stock in this shop to withdraw &e{amount}&c." +stock-deposit-fail: "&cThe shop is either at max stock or you do not have enough items." +owner-insufficient-funds: "&cThe owner of this shop is unable to afford your business." +shop-buy-bypass: "&aYou have purchased &r{item}&r &ex&6{amount} &afrom this shop! (Bypassed Transaction)" +invalid-stock: "&cThe stock amount you entered was invalid. The value must be less than the max stock size." +stock-set: "&aThe stock of the shop has been set to &e{amount}&a." +shop-set-owner: "&aThe owner of the shop has been set to &e{player}&a." +too-close: "&cYou are unable to create a shop at this location since another shop is nearby." +purchased-creation-item: "&aYou have purchased &e{amount} &ashop creation item(s) for &e${price}&a." +preview-item-action-bar: "&7\u2B05 &aHover over the text in the chat to preview." +quick-withdraw: "&aYou have withdrew &e{amount} &astock from this shop." +quick-deposit: "&aYou have deposited &e{amount} &astock into this shop." +limit-reset: "&aYou have reset the buy and sell limit of this shop." buy-limit: "&aPlease enter the buy limit you wish to give the shop (Type &e{cancel} &ato cancel):" -sell-limit-set: "{bar}&aYou have set the sell limit of this shop to &e{amount}&a." -sell-limit-exceeded: "{bar}&cThis shop would exceed its sell limit if this action is processed." +sell-limit-set: "&aYou have set the sell limit of this shop to &e{amount}&a." +sell-limit-exceeded: "&cThis shop would exceed its sell limit if this action is processed." sell-limit: "&aPlease enter the sell limit you wish to give the shop (Type &e{cancel} &ato cancel):" -invalid-limit: "{bar}&cThe limit value you entered was invalid." -buy-limit-set: "{bar}&aYou have set the buy limit of this shop to &e{amount}&a." -buy-limit-exceeded: "{bar}&cThis would exceed its buy limit if this action was processed." +invalid-limit: "&cThe limit value you entered was invalid." +buy-limit-set: "&aYou have set the buy limit of this shop to &e{amount}&a." +buy-limit-exceeded: "&cThis would exceed its buy limit if this action was processed." selection-mode-disabled: "&cYou have exited selection mode and your current region selection was cleared." selection-mode-enabled: "&aYou have entered selection mode. &eLeft-Click &aa block to set your first point and &eRight-Click &ato set your second selection." -selection-one-set: "{bar}&ePoint One &aof your region selection has been updated." -selection-two-set: "{bar}&ePoint Two &aof your region selection has been updated." +selection-one-set: "&ePoint One &aof your region selection has been updated." +selection-two-set: "&ePoint Two &aof your region selection has been updated." no-selection: "&cYou must make a selection while in selection mode first. Use the &e/displayshops sm &ccommand." region-exists: "&cA market region with that Id already exists. Please try another Id." market-region-created: "&aA new market region with the id &e{id} &ahas been created." market-region-deleted: "&cThe market region with the id &e{id} &chas been deleted." -region-invalid: "{bar}&cThere are no market regions with that Id." +region-invalid: "&cThere are no market regions with that Id." market-region-list: "&aCurrent Market Regions: &e{list}" -shop-not-admin: "{bar}&cThis is not an Admin shop." +shop-not-admin: "&cThis is not an Admin shop." shop-commands: "&aCommand List: &e[{commands}]" -command-only: "{bar}&aCommand only mode has been set to &e{status} &afor this shop." -command-added: "{bar}&aThe command &e{command} &ahas been added to this shop." -invalid-command-index: "{bar}&cThe index you entered was invalid." +command-only: "&aCommand only mode has been set to &e{status} &afor this shop." +command-added: "&aThe command &e{command} &ahas been added to this shop." +invalid-command-index: "&cThe index you entered was invalid." command-removed: "&aYou have remove the command at index &e{index} &afrom this shop." -commands-sell-fail: "{bar}&cYou can't sell to a shop that has command functionality." -owner-offline: "{bar}&cThe owner of this shop is either invalid or offline." -buy-price-limit: "{bar}&cThe buy price you entered is not in the buy price limit range." -sell-price-limit: "{bar}&cThe sell price you entered is not in the sell price limit range." -shop-buy-owner: "{bar}&e{buyer} &ahas purchased &r{item} &ex{amount} &afrom one of your shops for &e${price}&a." -shop-sell-owner: "{bar}&e{buyer} &ahas sold &r{item} &ex{amount} &ato one of your shops for &e${price}&a." -invalid-stack-size: "{bar}&cThe stack size you entered has either exceeded the maximum stack size a shop item can have or is below/equal to zero." -stack-size-set: "{bar}&aYou have set the stack size of the shop item of this shop to &e{amount}&a." -deposited-stock: "{bar}&aYou have deposited &e{amount} &aof the shop item into this shop." -withdrew-stock: "{bar}&aYou have withdrawn &e{amount} &aof the shop item from this shop." +commands-sell-fail: "&cYou can't sell to a shop that has command functionality." +owner-offline: "&cThe owner of this shop is either invalid or offline." +buy-price-limit: "&cThe buy price you entered is not in the buy price limit range." +sell-price-limit: "&cThe sell price you entered is not in the sell price limit range." +shop-buy-owner: "&e{buyer} &ahas purchased &r{item} &ex{amount} &afrom one of your shops for &e${price}&a." +shop-sell-owner: "&e{buyer} &ahas sold &r{item} &ex{amount} &ato one of your shops for &e${price}&a." +invalid-stack-size: "&cThe stack size you entered has either exceeded the maximum stack size a shop item can have or is below/equal to zero." +stack-size-set: "&aYou have set the stack size of the shop item of this shop to &e{amount}&a." +deposited-stock: "&aYou have deposited &e{amount} &aof the shop item into this shop." +withdrew-stock: "&aYou have withdrawn &e{amount} &aof the shop item from this shop." chat-interaction-cancelled: "&cYou have cancelled the chat interaction." -trade-item-invalid: "{bar}&cThe item in your hand seems to be invalid." -trade-item-set: "{bar}&aThe trade item for this shop has been set to your match your hand item." -trade-item-similar: "{bar}&cYour hand item is identical to the current trade item of this shop." -creative-blocked: "{bar}&cYou are unable to do this while in creative mode." -blocked-world: "{bar}&cShop creation is blocked in this world." -shop-delete-fail: "{bar}&cYou do not have access to delete this shop." -set-item-blocked: "{bar}&cThe item you are attempting to set in as the shop item is blocked." -insufficient-edit-funds: "{bar}&cYou do not have enough money to perform this action." -successful-edit-transaction: "{bar}&aYou successfully performed a edit action for &e${price}&a." -relative-unsafe-world: "{bar}&cA shop is unable to be created here due to a block located above the base block." -shop-trade-item: "{bar}&7You are now viewing this shop's &eCurrency/Trade &7item." -shop-preview-item: "{bar}&7You are now viewing this shop's &ePreview &7item." -shop-empty-required: "{bar}&cThe shop must have an empty stock first." -unit-count-max: "{bar}&cThe unit count can not be increased any further." -unit-count-min: "{bar}&cThe unit count can not be decreased any further." -unit-item-invalid: "{bar}&cUnable to find the unit item in this menu. Please try again." +trade-item-invalid: "&cThe item in your hand seems to be invalid." +trade-item-set: "&aThe trade item for this shop has been set to your match your hand item." +trade-item-similar: "&cYour hand item is identical to the current trade item of this shop." +creative-blocked: "&cYou are unable to do this while in creative mode." +blocked-world: "&cShop creation is blocked in this world." +shop-delete-fail: "&cYou do not have access to delete this shop." +set-item-blocked: "&cThe item you are attempting to set in as the shop item is blocked." +insufficient-edit-funds: "&cYou do not have enough money to perform this action." +successful-edit-transaction: "&aYou successfully performed a edit action for &e${price}&a." +relative-unsafe-world: "&cA shop is unable to be created here due to a block located above the base block." +shop-trade-item: "&7You are now viewing this shop's &eCurrency/Trade &7item." +shop-preview-item: "&7You are now viewing this shop's &ePreview &7item." +shop-empty-required: "&cThe shop must have an empty stock first." +unit-count-max: "&cThe unit count can not be increased any further." +unit-count-min: "&cThe unit count can not be decreased any further." +unit-item-invalid: "&cUnable to find the unit item in this menu. Please try again." set-description-interaction: "&aPlease enter the description you would like to set for this shop (Type &e{cancel} &ato cancel):" -description-set: "{bar}&aThe description for this shop has been set to &e{description}&a." -broadcast-cooldown: "{bar}&cYou are unable to broadcast a shop for another &e{cooldown} &csecond(s)." -shop-sell-fail: "{bar}&cFailed to sell to shop since similar item were unable to be found in the inventory." -shop-id-invalid: "{bar}&cThe shop id &e{id} &cis invalid or no shop was able to be obtained." -shop-unsafe-location: "{bar}&cThe shop with the id &e{id} &chas an unsafe location." -shop-visit: "{bar}&aWelcome to the shop, fellow traveller!" -shop-visit-fail: "{bar}&cYour recent shop visit attempt has failed. Please try again, initiating movement or combat." -visit-in-process: "{bar}&cYou are currently awaiting to visit a shop. Please wait..." -shop-visit-delay: "{bar}&aYou will visit the shop &e{id} &ain &e{delay} &aseconds... Do &c&l&nNOT&r &amove or initiate combat!" -buy-price-less: "{bar}&cYou are unable to set your buy price less than the sell price." -sell-price-greater: "{bar}&cYou are unable to set your sell price greater than the buy price." -producer-invalid: "{bar}&cUnable to obtain the account of the shop owner." -dynamic-price-toggle: "{bar}&aDynamic price changing has been &e{status}&a." -base-block-set: "{bar}&aThe base-block of the shop has been changed successfully!" -base-location-invalid: "{bar}&cUnable to find the base-location of the shop." -base-block-change: "{bar}&aSelect the new appearance of your shop!" +description-set: "&aThe description for this shop has been set to &e{description}&a." +broadcast-cooldown: "&cYou are unable to broadcast a shop for another &e{cooldown} &csecond(s)." +shop-sell-fail: "&cFailed to sell to shop since similar item were unable to be found in the inventory." +shop-id-invalid: "&cThe shop id &e{id} &cis invalid or no shop was able to be obtained." +shop-unsafe-location: "&cThe shop with the id &e{id} &chas an unsafe location." +shop-visit: "&aWelcome to the shop, fellow traveller!" +shop-visit-fail: "&cYour recent shop visit attempt has failed. Please try again, initiating movement or combat." +visit-in-process: "&cYou are currently awaiting to visit a shop. Please wait..." +shop-visit-delay: "&aYou will visit the shop &e{id} &ain &e{delay} &aseconds... Do &c&l&nNOT&r &amove or initiate combat!" +buy-price-less: "&cYou are unable to set your buy price less than the sell price." +sell-price-greater: "&cYou are unable to set your sell price greater than the buy price." +producer-invalid: "&cUnable to obtain the account of the shop owner." +dynamic-price-toggle: "&aDynamic price changing has been &e{status}&a." +base-block-set: "&aThe base-block of the shop has been changed successfully!" +base-location-invalid: "&cUnable to find the base-location of the shop." +base-block-change: "&aSelect the new appearance of your shop!" deposit-balance: "&aPlease enter the currency amount you would like to deposit into the balance (Your Balance: &e${balance}&a, Type &e{cancel} &ato cancel):" withdraw-balance: "&aPlease enter the currency amount you would like to withdraw from the balance (Current Balance: &e${balance}&a, Type &e{cancel} &ato cancel):" balance-withdraw-fail: "&cThe balance is too low. (Current Balance: &e${balance}&c)" balance-deposited: "&aA total of &e${amount} &ahas been deposited into the balance." balance-withdrawn: "&aA total of &e${amount} &ahas been withdrawn from the balance." -max-stored-currency: "{bar}&cThe maximum balance for this shop has exceeded or will exceed the maximum limit." +max-stored-currency: "&cThe maximum balance for this shop has exceeded or will exceed the maximum limit." cleanup-complete: "&aThe shop cleanup process has been complete. (Total Cleaned: &e{count}&a)" chat-interaction-timeout: "&cYour shop chat interaction has timed out." no-assistants-access: "&cYou are not permitted to manage assistants for this shop." @@ -151,7 +151,7 @@ shop-visiting-disabled: "&cShop visiting is currently unavailable and unable to shop-visit-charge: "&cYou were charged &e${charge} &cfor visiting a shop." bbm-unlocked: "&aAll base-block materials have been &eunlocked &afor the player &e{player}&a." bbm-locked: "&aAll base-block materials have been &clocked &afor the player &e{player}&a." -shop-under-edit: "{bar}&cThis shop is currently undergoing edits by the owner or an assistant." +shop-under-edit: "&cThis shop is currently undergoing edits by the owner or an assistant." world-cleared: "&aThe world &e{world} &ais now shop free!" rent-notification: "&cYour market region at &e{id} &cwill expire in &e{time}&c. Utilize the &e/ds renew {id} &cto renew your rent. &c&l&nUnclaimed shop contents will be lost on expire." rent-expired: "&cYour market region at &e{id} &chas expired." diff --git a/src/xzot1k/plugins/ds/api/Manager.java b/src/xzot1k/plugins/ds/api/Manager.java index 7a84b35..20a1482 100644 --- a/src/xzot1k/plugins/ds/api/Manager.java +++ b/src/xzot1k/plugins/ds/api/Manager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 XZot1K, All rights reserved. + * Copyright (c) 2021 XZot1K, All rights reserved. */ package xzot1k.plugins.ds.api; @@ -25,7 +25,6 @@ import xzot1k.plugins.ds.api.objects.MarketRegion; import xzot1k.plugins.ds.api.objects.Shop; -import java.sql.Statement; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.List; @@ -291,10 +290,8 @@ public interface Manager { /** * Saves all market regions to the database. - * - * @param statement The SQL statement required to save. */ - void saveMarketRegions(Statement statement); + void saveMarketRegions(); /** * Loads all market regions into the memory.