From 3468674f3b2c41d0d9ce4ff6bf258f38dd60833d Mon Sep 17 00:00:00 2001 From: sandtechnology <20417547+sandtechnology@users.noreply.github.com> Date: Tue, 1 Jun 2021 20:01:45 +0800 Subject: [PATCH] 4.0.8.3 (#987) * first step for v2 api * Refactor ShopAPI * #939 - Out of stock and Out of space * New translations messages.json (Russian) * New translations messages.json (Japanese) * New translations messages.json (Vietnamese) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Simplified) * New translations messages.json (Ukrainian) * New translations messages.json (Turkish) * New translations messages.json (Swedish) * New translations messages.json (Serbian (Cyrillic)) * New translations messages.json (Portuguese) * New translations messages.json (Polish) * New translations messages.json (Norwegian) * New translations messages.json (Dutch) * New translations messages.json (Korean) * New translations messages.json (Italian) * New translations messages.json (English) * New translations messages.json (Hungarian) * New translations messages.json (Hebrew) * New translations messages.json (Finnish) * New translations messages.json (Greek) * New translations messages.json (German) * New translations messages.json (Danish) * New translations messages.json (Czech) * New translations messages.json (Catalan) * New translations messages.json (Arabic) * New translations messages.json (Afrikaans) * New translations messages.json (Spanish) * New translations messages.json (French) * New translations messages.json (Romanian) * New translations messages.json (Portuguese, Brazilian) * Closed #940 * use isNumeric (friendly for performance) * Fix setOwner command break the sign first line * Fix language file upgrading issue * MsgUtil fail safe * New translations messages.json (German) (#942) * Clean up * Preload unused phrases * Clean up * Fix #944, unregister error reporter when disabling plugin * Fix NPE * Bump java warning to 16 * Fix build error Use mobile web editor not a good idea * New Crowdin updates (#943) * New translations messages.json (Russian) * New translations messages.json (Japanese) * New translations messages.json (Vietnamese) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Simplified) * New translations messages.json (Ukrainian) * New translations messages.json (Turkish) * New translations messages.json (Swedish) * New translations messages.json (Serbian (Cyrillic)) * New translations messages.json (Portuguese) * New translations messages.json (Polish) * New translations messages.json (Norwegian) * New translations messages.json (Dutch) * New translations messages.json (Korean) * New translations messages.json (Italian) * New translations messages.json (English) * New translations messages.json (Hungarian) * New translations messages.json (Hebrew) * New translations messages.json (Finnish) * New translations messages.json (Greek) * New translations messages.json (German) * New translations messages.json (Danish) * New translations messages.json (Czech) * New translations messages.json (Catalan) * New translations messages.json (Arabic) * New translations messages.json (Afrikaans) * New translations messages.json (Spanish) * New translations messages.json (French) * New translations messages.json (Romanian) * New translations messages.json (Portuguese, Brazilian) * New translations messages.json (English) * New translations messages.json (German) * New translations messages.json (Korean) * New Crowdin updates (#946) * New translations messages.json (Czech) * New translations messages.json (Czech) * New translations messages.json (Czech) * New translations messages.json (Czech) * Allow skip signature verify * Add warnings for that * Add stage support for EnvCheck * Fix runtime error * update readme * Also allow skip java version check * Auto delete support for GP * GP-Ignore cancelled * ignoreCancelled * New translations messages.json (Czech) (#947) * Bump MockBukkit-v1.16 from 0.34.2 to 1.0.0 (#948) Bumps [MockBukkit-v1.16](https://github.com/MockBukkit/MockBukkit) from 0.34.2 to 1.0.0. - [Release notes](https://github.com/MockBukkit/MockBukkit/releases) - [Commits](https://github.com/MockBukkit/MockBukkit/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * 1.17 builds -> future * Issue about Essentials * Check create status * bump version number * New translations messages.json (German) (#949) * Fix NPE when printing Null value enchantment (Rollbar#156) * add junit api * Revert "Bump MockBukkit-v1.16 from 0.34.2 to 1.0.0 (#948)" This reverts commit 00227831 * New Crowdin updates (#950) * New translations messages.json (Portuguese, Brazilian) * New translations messages.json (Portuguese, Brazilian) * New translations messages.json (Chinese Simplified) * New translations messages.json (Chinese Simplified) * Bump LWCX from 2.2.6 to 2.2.7 (#951) Bumps LWCX from 2.2.6 to 2.2.7. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add option to ignore the item custom display name * update config * use for * use append * update config * javadoc * Fix runtime error * Remove useless else * Update config.yml * 4.0.8.2 (#953) (#954) * first step for v2 api * Refactor ShopAPI * #939 - Out of stock and Out of space * New translations messages.json (Russian) * New translations messages.json (Japanese) * New translations messages.json (Vietnamese) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Simplified) * New translations messages.json (Ukrainian) * New translations messages.json (Turkish) * New translations messages.json (Swedish) * New translations messages.json (Serbian (Cyrillic)) * New translations messages.json (Portuguese) * New translations messages.json (Polish) * New translations messages.json (Norwegian) * New translations messages.json (Dutch) * New translations messages.json (Korean) * New translations messages.json (Italian) * New translations messages.json (English) * New translations messages.json (Hungarian) * New translations messages.json (Hebrew) * New translations messages.json (Finnish) * New translations messages.json (Greek) * New translations messages.json (German) * New translations messages.json (Danish) * New translations messages.json (Czech) * New translations messages.json (Catalan) * New translations messages.json (Arabic) * New translations messages.json (Afrikaans) * New translations messages.json (Spanish) * New translations messages.json (French) * New translations messages.json (Romanian) * New translations messages.json (Portuguese, Brazilian) * Closed #940 * use isNumeric (friendly for performance) * Fix setOwner command break the sign first line * Fix language file upgrading issue * MsgUtil fail safe * New translations messages.json (German) (#942) * Clean up * Preload unused phrases * Clean up * Fix #944, unregister error reporter when disabling plugin * Fix NPE * Bump java warning to 16 * Fix build error Use mobile web editor not a good idea * New Crowdin updates (#943) * New translations messages.json (Russian) * New translations messages.json (Japanese) * New translations messages.json (Vietnamese) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Simplified) * New translations messages.json (Ukrainian) * New translations messages.json (Turkish) * New translations messages.json (Swedish) * New translations messages.json (Serbian (Cyrillic)) * New translations messages.json (Portuguese) * New translations messages.json (Polish) * New translations messages.json (Norwegian) * New translations messages.json (Dutch) * New translations messages.json (Korean) * New translations messages.json (Italian) * New translations messages.json (English) * New translations messages.json (Hungarian) * New translations messages.json (Hebrew) * New translations messages.json (Finnish) * New translations messages.json (Greek) * New translations messages.json (German) * New translations messages.json (Danish) * New translations messages.json (Czech) * New translations messages.json (Catalan) * New translations messages.json (Arabic) * New translations messages.json (Afrikaans) * New translations messages.json (Spanish) * New translations messages.json (French) * New translations messages.json (Romanian) * New translations messages.json (Portuguese, Brazilian) * New translations messages.json (English) * New translations messages.json (German) * New translations messages.json (Korean) * New Crowdin updates (#946) * New translations messages.json (Czech) * New translations messages.json (Czech) * New translations messages.json (Czech) * New translations messages.json (Czech) * Allow skip signature verify * Add warnings for that * Add stage support for EnvCheck * Fix runtime error * update readme * Also allow skip java version check * Auto delete support for GP * GP-Ignore cancelled * ignoreCancelled * New translations messages.json (Czech) (#947) * Bump MockBukkit-v1.16 from 0.34.2 to 1.0.0 (#948) Bumps [MockBukkit-v1.16](https://github.com/MockBukkit/MockBukkit) from 0.34.2 to 1.0.0. - [Release notes](https://github.com/MockBukkit/MockBukkit/releases) - [Commits](https://github.com/MockBukkit/MockBukkit/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * 1.17 builds -> future * Issue about Essentials * Check create status * bump version number * New translations messages.json (German) (#949) * Fix NPE when printing Null value enchantment (Rollbar#156) * add junit api * Revert "Bump MockBukkit-v1.16 from 0.34.2 to 1.0.0 (#948)" This reverts commit 00227831 * New Crowdin updates (#950) * New translations messages.json (Portuguese, Brazilian) * New translations messages.json (Portuguese, Brazilian) * New translations messages.json (Chinese Simplified) * New translations messages.json (Chinese Simplified) * Bump LWCX from 2.2.6 to 2.2.7 (#951) Bumps LWCX from 2.2.6 to 2.2.7. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add option to ignore the item custom display name * update config * use for * use append * update config * javadoc * Fix runtime error * Remove useless else * Update config.yml Co-authored-by: sandtechnology Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: sandtechnology Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump annotations from 20.1.0 to 21.0.0 (#956) Bumps [annotations](https://github.com/JetBrains/java-annotations) from 20.1.0 to 21.0.0. - [Release notes](https://github.com/JetBrains/java-annotations/releases) - [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md) - [Commits](https://github.com/JetBrains/java-annotations/compare/20.1.0...21.0.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * New Crowdin updates (#958) * New translations messages.json (Korean) * New translations messages.json (Korean) * New translations messages.json (Polish) * New translations messages.json (Polish) * fixed version in config * Bump maven-javadoc-plugin from 3.2.0 to 3.3.0 (#960) Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.2.0...maven-javadoc-plugin-3.3.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump MockBukkit-v1.16 from 0.34.2 to 0.35.2 (#959) Bumps [MockBukkit-v1.16](https://github.com/seeseemelk/MockBukkit) from 0.34.2 to 0.35.2. - [Release notes](https://github.com/seeseemelk/MockBukkit/releases) - [Commits](https://github.com/seeseemelk/MockBukkit/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * New Crowdin updates (#961) * New translations messages.json (Spanish) * New translations messages.json (Spanish) * Improved Envchecker (#964) * Improved EnvironmentChecker * Quick rephrasement * Bump annotations from 21.0.0 to 21.0.1 (#962) Bumps [annotations](https://github.com/JetBrains/java-annotations) from 21.0.0 to 21.0.1. - [Release notes](https://github.com/JetBrains/java-annotations/releases) - [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md) - [Commits](https://github.com/JetBrains/java-annotations/compare/21.0.0...21.0.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improve code to make it more readable (little) * move to standalone method * Fix possibly shop creation de-sync issue (process creation failed callback correctly) * Fix RollbarErrorReporter bugs that broken long times ago * Fix NPE while sign block is null (Rollbar#111) * Improve code to make it more readable (little) * Improved config.yml (#965) * Improved config.yml * Some corrections from sandtechnology's suggestions * Some more corrections * Use example-configuration.yml instead of example-configuration.txt * Some language improvements in BuildInSolution.java (#967) * Add legacy virtual item work mode * New Crowdin updates (#971) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * Very small correction (#969) * Some improvements to the README.md (#968) * Fix a bug which making virtual display invisible * Small correction to the global v-item-queue desc. (#972) * Some language improvements to plugin.yml (#973) Is it okay to list OpenInv as softdepend? (Missing from new list but was listed in old softdepend....) Also removed some parts of old note about dependencies that are now in the new list... Is the thing with Herochat done? If yes ill remove this note too. * Use LinkedBlockingQueue to replace the async timer task (it may have two or more threads running in same time) * Use LinkedBlockingQueue to replace the async timer task (it may have two or more threads running in same time) * Use LinkedBlockingQueue to replace the async timer task (it may have two or more threads running in same time), Also fixed Please start AsyncPacketSender first! exception * Create labeler.yml * New Crowdin updates (#981) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * Removed old Herochat Note (#978) * Fix #979, use ConcurrentHashMap when creating shop map * Fix #976, check if world was unloaded in 1.14+ * Fix #977, handle infinite and nan value * New Crowdin updates (#982) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Traditional) * Use default currency for shop to fix #980 * change par name so other devs without javadoc still can read that * tweaks RollbarErrorReporter * edit qs about * Unregister listeners while shutting down * Unregister listeners while shutting down or on error * just a try * another try * Optimize MojangAPITest for HUGE performance * Fix waterlogged sign bug in snapshot * Fix NPE for BF * Handle async task correctly * Fix reload command and add license files * Reorder unregister process * Remove useless file * Remove unused var * Handle cancelled database task correctly * Remove useless poll waiting, fix async task nag warning * Fix sign placing issue * 4.0.8.3 * Fix json error * New Crowdin updates (#988) * New translations messages.json (Russian) * New translations messages.json (Japanese) * New translations messages.json (Vietnamese) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Simplified) * New translations messages.json (Ukrainian) * New translations messages.json (Turkish) * New translations messages.json (Swedish) * New translations messages.json (Serbian (Cyrillic)) * New translations messages.json (Portuguese) * New translations messages.json (Polish) * New translations messages.json (Norwegian) * New translations messages.json (Dutch) * New translations messages.json (Korean) * New translations messages.json (Italian) * New translations messages.json (English) * New translations messages.json (Hungarian) * New translations messages.json (Hebrew) * New translations messages.json (Finnish) * New translations messages.json (Greek) * New translations messages.json (German) * New translations messages.json (Danish) * New translations messages.json (Czech) * New translations messages.json (Catalan) * New translations messages.json (Arabic) * New translations messages.json (Afrikaans) * New translations messages.json (Spanish) * New translations messages.json (French) * New translations messages.json (Romanian) * New translations messages.json (Portuguese, Brazilian) * New translations messages.json (Chinese Simplified) * New translations messages.json (Chinese Simplified) * New translations messages.json (Korean) * New translations messages.json (Korean) * New translations messages.json (Korean) * New translations messages.json (Chinese Traditional) * Fix typo in error message and comment * Revert "Remove useless file" This reverts commit 67fdb3bf * Comment out useless file * Refactor getSignText method * Remove unused libraries (Saved 1 MB) * New translations messages.json (Chinese Traditional) (#989) * Bump Factions from 1.6.9.5-U0.5.20 to 1.6.9.5-2.7.0-STABLE (#990) Bumps Factions from 1.6.9.5-U0.5.20 to 1.6.9.5-2.7.0-STABLE. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add relocation for cache libraries * Fix codemc build error * Fix broken factions dependency * Refactor log watcher, fix log missing issue * New Crowdin updates (#991) * New translations messages.json (French) * New translations messages.json (Swedish) * New translations messages.json (Portuguese) * New translations messages.json (Chinese Traditional) * New translations messages.json (Chinese Simplified) (#992) * Prevent RER caught RER exception because it may cause StackOverFlowError * Allow use startup flag to skip EnvironmentChecker checks, it's helpful to disable some checks * New translations messages.json (Spanish) (#993) * Use system property * Switch to check contains * Replace space Co-authored-by: Ghost_chu <2908803755@qq.com> Co-authored-by: Ghost_chu <30802565+Ghost-chu@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris <65610536+Chris6ix@users.noreply.github.com> --- .github/labeler.yml | 5 + README.md | 28 +- pom.xml | 40 +- .../maxgamer/quickshop/BuiltInSolution.java | 34 +- .../org/maxgamer/quickshop/QuickShop.java | 88 ++- .../maxgamer/quickshop/api/QuickShopAPI.java | 12 +- .../command/subcommand/SubCommand_About.java | 6 +- .../command/subcommand/SubCommand_Price.java | 38 +- .../command/subcommand/SubCommand_Reload.java | 28 +- .../quickshop/database/DatabaseManager.java | 6 +- .../quickshop/economy/Economy_TNE.java | 11 +- .../quickshop/listener/WorldListener.java | 6 +- .../com/rylinaux/plugman/util/PluginUtil.java | 183 +++++ .../worldedit/util/paste/EngineHubPaster.java | 4 +- .../quickshop/shop/ContainerShop.java | 111 ++- .../maxgamer/quickshop/shop/ShopManager.java | 564 +++++++-------- .../quickshop/shop/VirtualDisplayItem.java | 33 +- .../quickshop/util/AsyncPacketSender.java | 83 ++- .../org/maxgamer/quickshop/util/MsgUtil.java | 6 +- .../maxgamer/quickshop/util/PriceLimiter.java | 6 +- .../org/maxgamer/quickshop/util/Util.java | 13 +- .../quickshop/util/envcheck/CheckResult.java | 2 +- .../util/envcheck/EnvironmentChecker.java | 120 ++-- .../reporter/error/RollbarErrorReporter.java | 111 ++- .../quickshop/watcher/CalendarWatcher.java | 8 +- .../quickshop/watcher/LogWatcher.java | 68 +- src/main/resources/config.yml | 655 +++++++++-------- .../resources/lang-original/messages.json | 7 +- src/main/resources/lang/af-ZA/messages.json | 7 +- src/main/resources/lang/ar-SA/messages.json | 7 +- src/main/resources/lang/ca-ES/messages.json | 7 +- src/main/resources/lang/cs-CZ/messages.json | 7 +- src/main/resources/lang/da-DK/messages.json | 7 +- src/main/resources/lang/de-DE/messages.json | 7 +- src/main/resources/lang/el-GR/messages.json | 7 +- src/main/resources/lang/en-US/messages.json | 7 +- src/main/resources/lang/es-ES/messages.json | 29 +- src/main/resources/lang/fi-FI/messages.json | 7 +- src/main/resources/lang/fr-FR/messages.json | 29 +- src/main/resources/lang/he-IL/messages.json | 7 +- src/main/resources/lang/hu-HU/messages.json | 7 +- src/main/resources/lang/it-IT/messages.json | 7 +- src/main/resources/lang/ja-JP/messages.json | 7 +- src/main/resources/lang/ko-KR/messages.json | 71 +- src/main/resources/lang/nl-NL/messages.json | 7 +- src/main/resources/lang/no-NO/messages.json | 7 +- src/main/resources/lang/pl-PL/messages.json | 29 +- src/main/resources/lang/pt-BR/messages.json | 7 +- src/main/resources/lang/pt-PT/messages.json | 11 +- src/main/resources/lang/ro-RO/messages.json | 7 +- src/main/resources/lang/ru-RU/messages.json | 7 +- src/main/resources/lang/sr-SP/messages.json | 7 +- src/main/resources/lang/sv-SE/messages.json | 7 +- src/main/resources/lang/tr-TR/messages.json | 7 +- src/main/resources/lang/uk-UA/messages.json | 7 +- src/main/resources/lang/vi-VN/messages.json | 7 +- src/main/resources/lang/zh-CN/messages.json | 21 +- src/main/resources/lang/zh-TW/messages.json | 285 ++++---- src/main/resources/license/plugman.txt | 25 + src/main/resources/license/quickshop.txt | 674 ++++++++++++++++++ src/main/resources/license/worldedit.txt | 18 + src/main/resources/plugin.yml | 89 ++- .../util/mojangapi/MojangAPITest.java | 23 +- 63 files changed, 2414 insertions(+), 1327 deletions(-) create mode 100644 .github/labeler.yml create mode 100644 src/main/java/org/maxgamer/quickshop/nonquickshopstuff/com/rylinaux/plugman/util/PluginUtil.java create mode 100644 src/main/resources/license/plugman.txt create mode 100644 src/main/resources/license/quickshop.txt create mode 100644 src/main/resources/license/worldedit.txt diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..ca89cba8e --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,5 @@ +# Number of labels to fetch (optional). Defaults to 20 +numLabels: 40 +# These labels will not be used even if the issue contains them +excludeLabels: + - pinned diff --git a/README.md b/README.md index d8c48f5c3..691cd4349 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ ![Ver](https://img.shields.io/spiget/version/62575?label=version) --- -QuickShop is a shop plugin, that allows players to sell items from a chest with no commands. It allows players to -purchase any number of items easily. In fact, this plugin doesn't even have any commands that a player would ever need! -QuickShop-Reremake is a fork for QuickShop NotLikeMe, QuickShop-Reremake has more features and bug fixes. -QuickShop-Reremake makes by PotatoCraft Studio from https://github.com/KaiKikuchi/QuickShop upstream repo. +QuickShop is a shop plugin that allows players to easily sell/buy any items from a chest without any commands. +In fact, none of the commands that QuickShop provides are ever needed by a player. +QuickShop-Reremake is a fork of QuickShop NotLikeMe with more features, bug fixes and other improvements. +QuickShop-Reremake is made by PotatoCraft Studio from the https://github.com/KaiKikuchi/QuickShop upstream repository. ## Support @@ -26,18 +26,18 @@ Open a new issue here: https://github.com/Ghost-chu/QuickShop-Reremake/issues ## Features - Easy to use -- Togglable Display Item on top of the chest -- NBT Data, Enchants, Tool Damage, Potion, and Mob Egg support +- Toggleable Display Item on top of the chest +- NBT Data, Enchantment, Tool Damage, Potion, and Mob Egg support - Unlimited chest support - Blacklist support & bypass permissions -- Shops that buy items and sell items at the same time are possible (Using double chests) -- Checks a player can open a chest before letting them create a shop! +- Shops that buy and sell items at the same time (Using double chests) +- Customisable permission checks - UUID support -- More shop protection! [Reremake] -- Item display name i18n! [Reremake] -- Enchantment display name i18n! [Reremake] +- Better shop protection [Reremake] +- Item display name i18n [Reremake] +- Enchantment display name i18n [Reremake] - A cool item preview [Reremake] -- Friendly for the region and world protect plugin [Reremake] +- World/region protection plugins support [Reremake] - ProtocolLib based Virtual DisplayItem support [Reremake] - Powerful API [Reremake] - Optimized performance [Reremake] @@ -56,7 +56,7 @@ Snapshot: [CodeMC.io Jenkins](https://ci.codemc.io/job/Ghost-chu/job/QuickShop-R - [Jenkins](https://ci.codemc.io/job/Ghost-chu/job/QuickShop-Reremake/) ## Contribute -If you're a developer, you can contribute to the QuickShop code! Just make a fork and install Lombok plugin, then make a pull request when you're done! Please try to follow [Google Java Style](https://google.github.io/styleguide/javaguide.html). Also do not increase the plugin version number. Thank you very much! +If you're a developer, you can contribute to the QuickShop code! Just make a fork and install the Lombok plugin, then make a pull request when you're done! Please try to follow [Google Java Style](https://google.github.io/styleguide/javaguide.html). Also do not increase the plugin version number. Thank you very much! ## Maven ```XML @@ -83,4 +83,4 @@ If you're a developer, you can contribute to the QuickShop code! Just make a for ## License -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FGhost-chu%2FQuickShop-Reremake.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FGhost-chu%2FQuickShop-Reremake?ref=badge_large) \ No newline at end of file +[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FGhost-chu%2FQuickShop-Reremake.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FGhost-chu%2FQuickShop-Reremake?ref=badge_large) diff --git a/pom.xml b/pom.xml index a8eca6d94..3eb1bddba 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ QuickShop - 4.0.8.2 + 4.0.8.3 org.maxgamer.quickshop Ghost-chu UTF-8 @@ -120,6 +120,18 @@ + + com.google.errorprone. + org.maxgamer.quickshop.shade.com.google.errorprone. + + + com.github.benmanes. + org.maxgamer.quickshop.shade.com.github.benmanes. + + + org.checkerframework. + org.maxgamer.quickshop.shade.org.checkerframework. + org.slf4j. org.maxgamer.quickshop.shade.org.slf4j.slf4j. @@ -221,7 +233,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.3.0 UTF-8 org.maxgamer.quickshop.nonquickshopstuff.* @@ -487,7 +499,7 @@ org.jetbrains annotations - 20.1.0 + 21.0.1 provided @@ -546,7 +558,7 @@ com.github.seeseemelk MockBukkit-v1.16 - 0.34.2 + 0.35.2 test @@ -740,7 +752,7 @@ com.massivecraft Factions - 1.6.9.5-U0.5.20 + 1.6.9.5-U0.5.21 provided @@ -818,24 +830,18 @@ - - com.esotericsoftware - reflectasm - 1.11.9 - compile - - - me.lucko - helper - 5.6.5 - compile - commons-codec commons-codec 1.15 + + me.lucko + helper + 5.6.5 + provided + org.slf4j diff --git a/src/main/java/org/maxgamer/quickshop/BuiltInSolution.java b/src/main/java/org/maxgamer/quickshop/BuiltInSolution.java index 46bd574e1..89d991bdf 100644 --- a/src/main/java/org/maxgamer/quickshop/BuiltInSolution.java +++ b/src/main/java/org/maxgamer/quickshop/BuiltInSolution.java @@ -22,48 +22,48 @@ package org.maxgamer.quickshop; import org.bukkit.ChatColor; /** - * A class to check known issue cause plugin failed enable. + * A class to check known issues that cause plugin boot failure. */ class BuiltInSolution { /** - * Call when failed load database, and use this to check the reason. + * Call îf database failed to load. This checks the failure reason. * - * @return The reason of error. + * @return The error reason. */ static BootError databaseError() { return new BootError(QuickShop.getInstance().getLogger(), - "Error connecting to the database", - "Make sure your database service is running.", - "Or check the configuration in your config.yml"); + "Error connecting to the database!", + "Please make sure your database service is running.", + "and check the configuration in your config.yml"); } /** - * Call when failed load economy system, and use this to check the reason. + * Call îf economy system failed to load. This checks the failure reason. * - * @return The reason of error. + * @return The error reason. */ static BootError econError() { - // Check Vault is installed + // Check if Vault is installed if (QuickShop.getInstance().getServer().getPluginManager().getPlugin("Vault") == null) { - // Vault not installed + // Vault is not installed return new BootError(QuickShop.getInstance().getLogger(), "Vault is not installed or loaded!", - "Make sure you installed Vault."); + "Please make sure Vault is installed."); } // Vault is installed if (QuickShop.getInstance().getServer().getPluginManager().getPlugin("CMI") != null) { - // Found may in-compatiable plugin + // Found possible incompatible plugin return new BootError(QuickShop.getInstance().getLogger(), - "No Economy plugin detected, did you installed and loaded them? Make sure they loaded before QuickShop.", - "Make sure you have an economy plugin hooked into Vault.", + "No Economy plugin detected! Please make sure that you have a compatible economy", + "plugin installed that is hooked into Vault and loads before QuickShop.", ChatColor.YELLOW + "Incompatibility detected: CMI Installed", - "Download CMI Edition of Vault might fix this."); + "The use of the CMI Edition of Vault might fix this."); } return new BootError(QuickShop.getInstance().getLogger(), - "No Economy plugin detected, did you installed and loaded them? Make sure they loaded before QuickShop.", - "Install an economy plugin to get Vault working."); + "No Economy plugin detected! Please make sure that you have a", + "compatible economy plugin installed to get Vault working."); } } diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java index cd837e83c..088c49618 100644 --- a/src/main/java/org/maxgamer/quickshop/QuickShop.java +++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java @@ -38,6 +38,7 @@ import org.bukkit.plugin.Plugin; import org.bukkit.plugin.RegisteredListener; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitRunnable; +import org.bukkit.scheduler.BukkitTask; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.maxgamer.quickshop.api.QuickShopAPI; @@ -248,6 +249,8 @@ public class QuickShop extends JavaPlugin { @Getter private CalendarWatcher calendarWatcher; + private final List timerTaskList = new ArrayList<>(3); + @NotNull public static QuickShop getInstance() { return instance; @@ -378,7 +381,7 @@ public class QuickShop extends JavaPlugin { EconomyCore core = null; switch (EconomyType.fromID(getConfig().getInt("economy-type"))) { case UNKNOWN: - bootError = new BootError(this.getLogger(), "Can't load the Economy provider, invaild value in config.yml."); + setupBootError(new BootError(this.getLogger(), "Can't load the Economy provider, invaild value in config.yml.")); return false; case VAULT: core = new Economy_Vault(this); @@ -440,7 +443,7 @@ public class QuickShop extends JavaPlugin { return false; } if (!core.isValid()) { - bootError = BuiltInSolution.econError(); + setupBootError(BuiltInSolution.econError()); return false; } else { this.economy = new Economy(this, ServiceInjector.getEconomyCore(core)); @@ -451,8 +454,7 @@ public class QuickShop extends JavaPlugin { getLogger().log(Level.WARNING, "Something going wrong when loading up economy system", e); getLogger().severe("QuickShop could not hook into a economy/Not found Vault or Reserve!"); getLogger().severe("QuickShop CANNOT start!"); - bootError = BuiltInSolution.econError(); - HandlerList.unregisterAll(this); + setupBootError(BuiltInSolution.econError()); getLogger().severe("Plugin listeners was disabled, please fix the economy issue."); return false; } @@ -519,7 +521,7 @@ public class QuickShop extends JavaPlugin { runtimeCheck(EnvCheckEntry.Stage.ON_LOAD); getLogger().info("Reading the configuration..."); this.initConfiguration(); - QuickShopAPI.setupApi(this); + QuickShopAPI._internal_access_only_setupApi(this); //noinspection ResultOfMethodCallIgnored getDataFolder().mkdirs(); this.bootError = null; @@ -540,13 +542,15 @@ public class QuickShop extends JavaPlugin { @Override public void onDisable() { + + getLogger().info("QuickShop is finishing remaining work, this may need a while..."); + if (sentryErrorReporter != null) { + sentryErrorReporter.unregister(); + } + if (this.integrationHelper != null) { this.integrationHelper.callIntegrationsUnload(IntegrateStage.onUnloadBegin); } - getLogger().info("QuickShop is finishing remaining work, this may need a while..."); - if (calendarWatcher != null) { - calendarWatcher.stop(); - } Util.debugLog("Unloading all shops..."); try { if (this.getShopManager() != null) { @@ -578,21 +582,31 @@ public class QuickShop extends JavaPlugin { if (logWatcher != null) { logWatcher.close(); } + for (BukkitTask bukkitTask : timerTaskList) { + if (!bukkitTask.isCancelled()) { + bukkitTask.cancel(); + } + } + if (calendarWatcher != null) { + calendarWatcher.stop(); + } /* Unload UpdateWatcher */ if (this.updateWatcher != null) { this.updateWatcher.uninit(); } - Util.debugLog("Cleanup tasks..."); AsyncPacketSender.stop(); - if (sentryErrorReporter != null) { - sentryErrorReporter.unregister(); - } + + Util.debugLog("Cleanup tasks..."); try { Bukkit.getScheduler().cancelTasks(this); } catch (Throwable ignored) { } + + Util.debugLog("Cleanup listeners..."); + HandlerList.unregisterAll(this); + Util.debugLog("All shutdown work is finished."); } @@ -612,7 +626,7 @@ public class QuickShop extends JavaPlugin { If set to true, it will write out the default values, to the target file. However, once written, you will not be able to tell the difference between a default and a value from the configuration. ========================================================================================================================== - getConfig().options().copyDefaults(true).header("Read the example.config.yml file to get commented example config file."); // Load defaults. + getConfig().options().copyDefaults(true).header("Read the example-configuration.yml file to get commented example config file."); // Load defaults. saveDefaultConfig(); reloadConfig(); */ @@ -620,10 +634,10 @@ public class QuickShop extends JavaPlugin { "=================================\n" + "= QuickShop Configuration =\n" + "=================================\n" + - "\nNotes:" + - "Please read the example.config.yml file to get commented example config file.\n" + - "Please read the example.config.yml file to get commented example config file.\n" + - "Please read the example.config.yml file to get commented example config file.\n" + "\nNotes:\n" + + "Please read the example-configuration.yml file to get a commented example config.\n" + + "Please read the example-configuration.yml file to get a commented example config.\n" + + "Please read the example-configuration.yml file to get a commented example config.\n" ); if (getConfig().getInt("config-version", 0) == 0) { getConfig().set("config-version", 1); @@ -649,7 +663,7 @@ public class QuickShop extends JavaPlugin { joiner.add(String.format("- [%s/%s] %s", result.getValue().getResult().getDisplay(), result.getKey().name(), result.getValue().getResultMessage())); } } - bootError = new BootError(this.getLogger(), joiner.toString()); + setupBootError(new BootError(this.getLogger(), joiner.toString())); //noinspection ConstantConditions Util.mainThreadRun(() -> getCommand("qs").setTabCompleter(this)); //Disable tab completer } @@ -673,7 +687,7 @@ public class QuickShop extends JavaPlugin { getLogger().info("Starting plugin self-test, please wait..."); runtimeCheck(EnvCheckEntry.Stage.ON_ENABLE); - QuickShopAPI.setupApi(this); + QuickShopAPI._internal_access_only_setupApi(this); getLogger().info("Reading the configuration..."); this.initConfiguration(); @@ -768,6 +782,12 @@ public class QuickShop extends JavaPlugin { if (display && DisplayItem.getNowUsing() != DisplayType.VIRTUALITEM) { displayDupeRemoverWatcher = new DisplayDupeRemoverWatcher(); } + if (display && DisplayItem.getNowUsing() != DisplayType.VIRTUALITEM) { + timerTaskList.add(displayDupeRemoverWatcher.runTaskTimerAsynchronously(this, 0, 1)); + } + if (display && DisplayItem.getNowUsing() == DisplayType.VIRTUALITEM) { + AsyncPacketSender.start(this); + } /* Load all shops. */ shopLoader = new ShopLoader(this); @@ -808,7 +828,7 @@ public class QuickShop extends JavaPlugin { updateWatcher.init(); } - getLogger().info("QuickShop Loaded! " + enableTimer.endTimer() + " ms."); + /* Delay the Ecoonomy system load, give a chance to let economy system regiser. */ /* And we have a listener to listen the ServiceRegisterEvent :) */ Util.debugLog("Loading economy system..."); @@ -823,19 +843,14 @@ public class QuickShop extends JavaPlugin { // shopVaildWatcher.runTaskTimer(this, 0, 20 * 60); // Nobody use it signUpdateWatcher.runTaskTimer(this, 0, 10); shopContainerWatcher.runTaskTimer(this, 0, 5); // Nobody use it - if (display && DisplayItem.getNowUsing() != DisplayType.VIRTUALITEM) { - displayDupeRemoverWatcher.runTaskTimerAsynchronously(this, 0, 1); - } - if (display && DisplayItem.getNowUsing() == DisplayType.VIRTUALITEM) { - AsyncPacketSender.start(this); - } + if (logWatcher != null) { - logWatcher.runTaskTimerAsynchronously(this, 10, 10); + timerTaskList.add(logWatcher.runTaskTimerAsynchronously(this, 10, 10)); getLogger().info("Log actions is enabled, actions will log in the qs.log file!"); } if (getConfig().getBoolean("shop.ongoing-fee.enable")) { getLogger().info("Ongoing fee feature is enabled."); - ongoingFeeWatcher.runTaskTimerAsynchronously(this, 0, getConfig().getInt("shop.ongoing-fee.ticks")); + timerTaskList.add(ongoingFeeWatcher.runTaskTimerAsynchronously(this, 0, getConfig().getInt("shop.ongoing-fee.ticks"))); } @@ -857,6 +872,7 @@ public class QuickShop extends JavaPlugin { calendarWatcher.start(); Util.debugLog("Now using display-type: " + DisplayItem.getNowUsing().name()); // sentryErrorReporter.sendError(new IllegalAccessError("no fucking way")); + getLogger().info("QuickShop Loaded! " + enableTimer.endTimer() + " ms."); } private void loadItemMatcher() { @@ -1737,6 +1753,10 @@ public class QuickShop extends JavaPlugin { getConfig().set("config-version", ++selectedVersion); } + if (selectedVersion == 129) { + getConfig().set("shop.use-global-virtual-item-queue", false); + getConfig().set("config-version", ++selectedVersion); + } if (getConfig().getInt("matcher.work-type") != 0 && GameVersion.get(ReflectFactory.getServerVersion()).name().contains("1_16")) { getLogger().warning("You are not using QS Matcher, it may meeting item comparing issue mentioned there: https://hub.spigotmc.org/jira/browse/SPIGOT-5063"); @@ -1748,14 +1768,20 @@ public class QuickShop extends JavaPlugin { saveConfig(); reloadConfig(); - //Delete old example.config.yml + //Delete old example configuration files new File(getDataFolder(), "example.config.yml").delete(); + new File(getDataFolder(), "example-configuration.txt").delete(); - Path exampleConfigFile = new File(getDataFolder(), "example-configuration.txt").toPath(); + Path exampleConfigFile = new File(getDataFolder(), "example-configuration.yml").toPath(); try { Files.copy(Objects.requireNonNull(getResource("config.yml")), exampleConfigFile, REPLACE_EXISTING); } catch (IOException ioe) { getLogger().warning("Error when creating the example config file: " + ioe.getMessage()); } } + + public void setupBootError(BootError bootError) { + this.bootError = bootError; + HandlerList.unregisterAll(this); + } } diff --git a/src/main/java/org/maxgamer/quickshop/api/QuickShopAPI.java b/src/main/java/org/maxgamer/quickshop/api/QuickShopAPI.java index efdd9be20..42158651f 100644 --- a/src/main/java/org/maxgamer/quickshop/api/QuickShopAPI.java +++ b/src/main/java/org/maxgamer/quickshop/api/QuickShopAPI.java @@ -33,17 +33,11 @@ public class QuickShopAPI { private static ShopAPI shopAPI; private static DisplayItemAPI displayItemAPI; - /** - * DO NOT CALL ME, IT JUST A INTERNAL METHOD, BUT BECAUSE CROSS-PACKAGE ACCESS, IT IS PUBLIC, SO DO NOT EXECUTE IT. - * Go away =w= - * - * @param qs The QuickShop plugin instance - */ - public static void setupApi(@NotNull JavaPlugin qs) { - if (!(qs instanceof QuickShop)) { + public static void _internal_access_only_setupApi(@NotNull JavaPlugin quickshop) { + if (!(quickshop instanceof QuickShop)) { throw new IllegalArgumentException("You can't setup API, it should only access by QuickShop internal calling."); } - plugin = (QuickShop) qs; + plugin = (QuickShop) quickshop; shopAPI = new ShopAPI(plugin); displayItemAPI = new DisplayItemAPI(plugin); } diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_About.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_About.java index 8de5c8277..51ae95bbf 100644 --- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_About.java +++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_About.java @@ -39,7 +39,7 @@ public class SubCommand_About implements CommandProcesser { ChatColor.AQUA + "QuickShop " + ChatColor.YELLOW + QuickShop.getFork()); MsgUtil.sendMessage(sender, ChatColor.AQUA - + "Ver " + + "Version " + ChatColor.YELLOW + ">> " + ChatColor.GREEN @@ -71,12 +71,12 @@ public class SubCommand_About implements CommandProcesser { } MsgUtil.sendMessage(sender, ChatColor.AQUA - + "Dev " + + "Developers " + ChatColor.YELLOW + ">> " + ChatColor.GREEN + Util.list2String(plugin.getDescription().getAuthors())); - MsgUtil.sendMessage(sender, ChatColor.GOLD + "Powered by Potato Craft Studio"); + MsgUtil.sendMessage(sender, ChatColor.GOLD + "Powered by PotatoCraft Studio"); MsgUtil.sendMessage(sender, ChatColor.RED + "Made with ❤"); } diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Price.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Price.java index f51243764..87de7b3f4 100644 --- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Price.java +++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Price.java @@ -60,25 +60,31 @@ public class SubCommand_Price implements CommandProcesser { final double price; final double minPrice = plugin.getConfig().getDouble("shop.minimum-price"); - try { //TODO Migrate to PriceLimiter - if (plugin.getConfig().getBoolean("whole-number-prices-only")) { - try { - price = Long.parseLong(cmdArg[0]); - } catch (NumberFormatException ex2) { - // input is number, but not Integer - Util.debugLog(ex2.getMessage()); - MsgUtil.sendMessage(p, MsgUtil.getMessage("not-a-integer", p, cmdArg[0])); - return; - } - } else { - price = Double.parseDouble(cmdArg[0]); + //TODO Migrate to PriceLimiter + if (plugin.getConfig().getBoolean("whole-number-prices-only")) { + try { + price = Long.parseLong(cmdArg[0]); + } catch (NumberFormatException ex2) { + // input is number, but not Integer + Util.debugLog(ex2.getMessage()); + MsgUtil.sendMessage(p, MsgUtil.getMessage("not-a-integer", p, cmdArg[0])); + return; } + } else { + try { + price = Double.parseDouble(cmdArg[0]); - } catch (NumberFormatException ex) { + } catch (NumberFormatException ex) { + // No number input + Util.debugLog(ex.getMessage()); + MsgUtil.sendMessage(p, MsgUtil.getMessage("not-a-number", p, cmdArg[0])); + return; + } // No number input - Util.debugLog(ex.getMessage()); - MsgUtil.sendMessage(p, MsgUtil.getMessage("not-a-number", p, cmdArg[0])); - return; + if (Double.isInfinite(price) || Double.isNaN(price)) { + MsgUtil.sendMessage(p, MsgUtil.getMessage("not-a-number", p, cmdArg[0])); + return; + } } final boolean format = plugin.getConfig().getBoolean("use-decimal-format"); diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Reload.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Reload.java index 0e9a1a8a6..1b31fd2b5 100644 --- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Reload.java +++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Reload.java @@ -21,11 +21,20 @@ package org.maxgamer.quickshop.command.subcommand; import lombok.AllArgsConstructor; import org.bukkit.command.CommandSender; +import org.bukkit.plugin.InvalidDescriptionException; +import org.bukkit.plugin.InvalidPluginException; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.PluginManager; import org.jetbrains.annotations.NotNull; import org.maxgamer.quickshop.QuickShop; import org.maxgamer.quickshop.command.CommandProcesser; +import org.maxgamer.quickshop.nonquickshopstuff.com.rylinaux.plugman.util.PluginUtil; import org.maxgamer.quickshop.util.MsgUtil; +import java.io.File; +import java.net.URISyntaxException; +import java.nio.file.Paths; + @AllArgsConstructor public class SubCommand_Reload implements CommandProcesser { @@ -35,8 +44,23 @@ public class SubCommand_Reload implements CommandProcesser { public void onCommand( @NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) { MsgUtil.sendMessage(sender, MsgUtil.getMessage("command.reloading", sender)); - plugin.getServer().getPluginManager().disablePlugin(plugin); - plugin.getServer().getPluginManager().enablePlugin(plugin); + PluginManager pluginManager = plugin.getServer().getPluginManager(); + try { + File file = Paths.get(plugin.getClass().getProtectionDomain().getCodeSource().getLocation().toURI()).toFile(); + Throwable throwable = PluginUtil.unload(plugin); + if (throwable != null) { + throw new RuntimeException("Failed to reload plugin, considering restart the server. (Unload plugin failed)", throwable); + } + Plugin plugin = pluginManager.loadPlugin(file); + if (plugin != null) { + plugin.onLoad(); + pluginManager.enablePlugin(plugin); + } else { + throw new RuntimeException("Failed to reload plugin, considering restart the server. (Load plugin failed)"); + } + } catch (URISyntaxException | InvalidDescriptionException | InvalidPluginException e) { + throw new RuntimeException("Failed to reload plugin, considering restart the server.", e); + } } diff --git a/src/main/java/org/maxgamer/quickshop/database/DatabaseManager.java b/src/main/java/org/maxgamer/quickshop/database/DatabaseManager.java index 7cccf1a2e..c34df1565 100644 --- a/src/main/java/org/maxgamer/quickshop/database/DatabaseManager.java +++ b/src/main/java/org/maxgamer/quickshop/database/DatabaseManager.java @@ -78,7 +78,11 @@ public class DatabaseManager { if (useQueue) { try { - task = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, () -> plugin.getDatabaseManager().runTask(), 1, plugin.getConfig().getLong("database.queue-commit-interval") * 20); + task = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, () -> { + if (!task.isCancelled()) { + plugin.getDatabaseManager().runTask(); + } + }, 1, plugin.getConfig().getLong("database.queue-commit-interval") * 20); } catch (IllegalPluginAccessException e) { Util.debugLog("Plugin is disabled but trying create database task, move to Main Thread..."); plugin.getDatabaseManager().runTask(); diff --git a/src/main/java/org/maxgamer/quickshop/economy/Economy_TNE.java b/src/main/java/org/maxgamer/quickshop/economy/Economy_TNE.java index e8d6af441..0f3fbe466 100644 --- a/src/main/java/org/maxgamer/quickshop/economy/Economy_TNE.java +++ b/src/main/java/org/maxgamer/quickshop/economy/Economy_TNE.java @@ -59,12 +59,11 @@ public class Economy_TNE implements EconomyCore { if (!isValid()) { return null; } - if (currency == null) { - return null; - } - for (TNECurrency apiCurrency : this.api.getCurrencies(world.getName())) { - if (apiCurrency.getIdentifier().equals(currency)) { - return apiCurrency; + if (currency != null) { + for (TNECurrency apiCurrency : this.api.getCurrencies(world.getName())) { + if (apiCurrency.getIdentifier().equals(currency)) { + return apiCurrency; + } } } return this.api.getDefault(world.getName()); // Want to get some default currency available in thi world diff --git a/src/main/java/org/maxgamer/quickshop/listener/WorldListener.java b/src/main/java/org/maxgamer/quickshop/listener/WorldListener.java index 0267433dd..c4ae36e8e 100644 --- a/src/main/java/org/maxgamer/quickshop/listener/WorldListener.java +++ b/src/main/java/org/maxgamer/quickshop/listener/WorldListener.java @@ -30,9 +30,9 @@ import org.maxgamer.quickshop.QuickShop; import org.maxgamer.quickshop.shop.Shop; import org.maxgamer.quickshop.shop.ShopChunk; -import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.concurrent.ConcurrentHashMap; public class WorldListener extends QSListener { @@ -52,7 +52,7 @@ public class WorldListener extends QSListener { plugin.getShopLoader().loadShops(world.getName()); // New world data - final Map> inWorld = new HashMap<>(1); + final Map> inWorld = new ConcurrentHashMap<>(1); // Old world data final Map> oldInWorld = plugin.getShopManager().getShops(world.getName()); @@ -63,7 +63,7 @@ public class WorldListener extends QSListener { } for (Entry> oldInChunk : oldInWorld.entrySet()) { - final Map inChunk = new HashMap<>(1); + final Map inChunk = new ConcurrentHashMap<>(1); // Put the new chunk were the old chunk was inWorld.put(oldInChunk.getKey(), inChunk); diff --git a/src/main/java/org/maxgamer/quickshop/nonquickshopstuff/com/rylinaux/plugman/util/PluginUtil.java b/src/main/java/org/maxgamer/quickshop/nonquickshopstuff/com/rylinaux/plugman/util/PluginUtil.java new file mode 100644 index 000000000..fd2439173 --- /dev/null +++ b/src/main/java/org/maxgamer/quickshop/nonquickshopstuff/com/rylinaux/plugman/util/PluginUtil.java @@ -0,0 +1,183 @@ +package org.maxgamer.quickshop.nonquickshopstuff.com.rylinaux.plugman.util; + +/* + * #%L + * PlugMan + * %% + * Copyright (C) 2010 - 2014 PlugMan + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ + +import org.bukkit.Bukkit; +import org.bukkit.command.Command; +import org.bukkit.command.PluginCommand; +import org.bukkit.command.SimpleCommandMap; +import org.bukkit.event.Event; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.PluginManager; +import org.bukkit.plugin.RegisteredListener; +import org.jetbrains.annotations.Nullable; + +import java.io.IOException; +import java.lang.reflect.Field; +import java.net.URLClassLoader; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.SortedSet; + +/** + * Utilities for managing plugins. + * (Originally from Plugman: https://github.com/r-clancy/PlugMan/blob/master/src/main/java/com/rylinaux/plugman/util/PluginUtil.java) + *

+ * Edited by sandtechnology (Modified and taken the unload method) + * + * @author rylinaux + * @author sandtechnology + */ +public class PluginUtil { + + /** + * Unload a plugin. + * + * @param plugin the plugin to unload + * @return the exception when unloading, null if succeed + */ + @Nullable + public static Throwable unload(Plugin plugin) { + + String name = plugin.getName(); + + PluginManager pluginManager = Bukkit.getPluginManager(); + + SimpleCommandMap commandMap = null; + + List plugins = null; + + Map names = null; + Map commands = null; + Map> listeners = null; + + boolean reloadlisteners = true; + + if (pluginManager != null) { + + pluginManager.disablePlugin(plugin); + + try { + + Field pluginsField = Bukkit.getPluginManager().getClass().getDeclaredField("plugins"); + pluginsField.setAccessible(true); + plugins = (List) pluginsField.get(pluginManager); + + Field lookupNamesField = Bukkit.getPluginManager().getClass().getDeclaredField("lookupNames"); + lookupNamesField.setAccessible(true); + names = (Map) lookupNamesField.get(pluginManager); + + try { + Field listenersField = Bukkit.getPluginManager().getClass().getDeclaredField("listeners"); + listenersField.setAccessible(true); + listeners = (Map>) listenersField.get(pluginManager); + } catch (Exception e) { + reloadlisteners = false; + } + + Field commandMapField = Bukkit.getPluginManager().getClass().getDeclaredField("commandMap"); + commandMapField.setAccessible(true); + commandMap = (SimpleCommandMap) commandMapField.get(pluginManager); + + Field knownCommandsField = SimpleCommandMap.class.getDeclaredField("knownCommands"); + knownCommandsField.setAccessible(true); + commands = (Map) knownCommandsField.get(commandMap); + + } catch (NoSuchFieldException | IllegalAccessException e) { + return e; + } + + } + + pluginManager.disablePlugin(plugin); + + if (plugins != null) + plugins.remove(plugin); + + if (names != null) + names.remove(name); + + if (listeners != null && reloadlisteners) { + for (SortedSet set : listeners.values()) { + for (Iterator it = set.iterator(); it.hasNext(); ) { + RegisteredListener value = it.next(); + if (value.getPlugin() == plugin) { + it.remove(); + } + } + } + } + + if (commandMap != null) { + for (Iterator> it = commands.entrySet().iterator(); it.hasNext(); ) { + Map.Entry entry = it.next(); + if (entry.getValue() instanceof PluginCommand) { + PluginCommand c = (PluginCommand) entry.getValue(); + if (c.getPlugin() == plugin) { + c.unregister(commandMap); + it.remove(); + } + } + } + } + + // Attempt to close the classloader to unlock any handles on the plugin's jar file. + ClassLoader cl = plugin.getClass().getClassLoader(); + + + if (cl instanceof URLClassLoader) { + + try { + + Field pluginField = cl.getClass().getDeclaredField("plugin"); + pluginField.setAccessible(true); + pluginField.set(cl, null); + + Field pluginInitField = cl.getClass().getDeclaredField("pluginInit"); + pluginInitField.setAccessible(true); + pluginInitField.set(cl, null); + + } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException ignored) { + } + + try { + ((URLClassLoader) cl).close(); + } catch (IOException ignored) { + } + + } + + // Will not work on processes started with the -XX:+DisableExplicitGC flag, but lets try it anyway. + // This tries to get around the issue where Windows refuses to unlock jar files that were previously loaded into the JVM. + System.gc(); + + return null; + + } + +} diff --git a/src/main/java/org/maxgamer/quickshop/nonquickshopstuff/com/sk89q/worldedit/util/paste/EngineHubPaster.java b/src/main/java/org/maxgamer/quickshop/nonquickshopstuff/com/sk89q/worldedit/util/paste/EngineHubPaster.java index 95daf75c4..c05539b76 100644 --- a/src/main/java/org/maxgamer/quickshop/nonquickshopstuff/com/sk89q/worldedit/util/paste/EngineHubPaster.java +++ b/src/main/java/org/maxgamer/quickshop/nonquickshopstuff/com/sk89q/worldedit/util/paste/EngineHubPaster.java @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - +/* package org.maxgamer.quickshop.nonquickshopstuff.com.sk89q.worldedit.util.paste; import com.google.gson.Gson; @@ -75,4 +75,4 @@ public class EngineHubPaster { String uploadUrl; Map uploadFields; } -} +}*/ diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java index 1677db4b4..2ab679acd 100644 --- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java +++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java @@ -644,73 +644,60 @@ public class ContainerShop implements Shop { public String[] getSignText() { Util.ensureThread(false); String[] lines = new String[4]; + + //Line 1 OfflinePlayer player = plugin.getServer().getOfflinePlayer(this.getOwner()); - lines[0] = MsgUtil.getMessageOfflinePlayer("signs.header", null, this.ownerName(false), inventoryAvailable() ? MsgUtil.getMessageOfflinePlayer("signs.status-available", null) : MsgUtil.getMessageOfflinePlayer("signs.status-unavailable", null)); - int remainingStock = getRemainingStock(); - int remainingSpace = getRemainingSpace(); - if (this.isSelling()) { - if (this.getItem().getAmount() > 1) { - if (remainingStock == -1) { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.stack-selling", player, - MsgUtil.getMessageOfflinePlayer("signs.unlimited", player)); - } else { - lines[1] = - MsgUtil.getMessageOfflinePlayer("signs.stack-selling", player, - Integer.toString(remainingStock)); - if (remainingStock == 0) { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.out-of-stock", player); - } - } - } else { - if (this.getRemainingStock() == -1) { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.selling", player, - MsgUtil.getMessageOfflinePlayer("signs.unlimited", player)); - } else { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.selling", player, - Integer.toString(this.getRemainingStock())); - if (remainingStock == 0) { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.out-of-stock", player); - } - } - } - } else if (this.isBuying()) { - if (this.getItem().getAmount() > 1) { - if (remainingSpace == -1) { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.stack-buying", player, - MsgUtil.getMessageOfflinePlayer("signs.unlimited", player)); - } else { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.stack-buying", player, - Integer.toString(remainingSpace)); - if (remainingSpace == 0) { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.out-of-space", player); - } - } - } else { - if (remainingSpace == -1) { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.buying", player, - MsgUtil.getMessageOfflinePlayer("signs.unlimited", player)); - } else { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.buying", player, - Integer.toString(remainingSpace)); - if (remainingSpace == 0) { - lines[1] = MsgUtil.getMessageOfflinePlayer("signs.out-of-space", player); - } - } - } + String statusStringKey = inventoryAvailable() ? "signs.status-available" : "signs.status-unavailable"; + lines[0] = MsgUtil.getMessageOfflinePlayer("signs.header", null, this.ownerName(false), MsgUtil.getMessageOfflinePlayer(statusStringKey, null)); + + //Line 2 + String tradingStringKey; + String noRemainingStringKey; + int shopRemaining; + + switch (shopType) { + case BUYING: + shopRemaining = getRemainingSpace(); + tradingStringKey = isStackingShop() ? "signs.stack-buying" : "signs.buying"; + noRemainingStringKey = "signs.out-of-space"; + break; + case SELLING: + shopRemaining = getRemainingStock(); + tradingStringKey = isStackingShop() ? "signs.stack-selling" : "signs.selling"; + noRemainingStringKey = "signs.out-of-stock"; + break; + default: + shopRemaining = 0; + tradingStringKey = "MissingKey for shop type:" + shopType; + noRemainingStringKey = "MissingKey for shop type:" + shopType; } - lines[2] = - MsgUtil.getMessageOfflinePlayer( - "signs.item", player, Util.getItemStackName(this.getItem())); + switch (shopRemaining) { + //Unlimited + case -1: + lines[1] = MsgUtil.getMessageOfflinePlayer(tradingStringKey, player, MsgUtil.getMessageOfflinePlayer("signs.unlimited", player)); + break; + //No remaining + case 0: + lines[1] = MsgUtil.getMessageOfflinePlayer(noRemainingStringKey, player); + break; + //Has remaining + default: + lines[1] = MsgUtil.getMessageOfflinePlayer(tradingStringKey, player, Integer.toString(shopRemaining)); + } + + //line 3 + lines[2] = MsgUtil.getMessageOfflinePlayer("signs.item", player, Util.getItemStackName(this.getItem())); + + //line 4 if (this.isStackingShop()) { lines[3] = MsgUtil.getMessageOfflinePlayer("signs.stack-price", player, Util.format(this.getPrice(), this), Integer.toString(item.getAmount()), Util.getItemStackName(item)); } else { - lines[3] = MsgUtil - .getMessageOfflinePlayer("signs.price", player, Util.format(this.getPrice(), this)); - + lines[3] = MsgUtil.getMessageOfflinePlayer("signs.price", player, Util.format(this.getPrice(), this)); } - //new pattern + + //New pattern for recognizing shop sign lines[1] = shopSignPrefix + lines[1] + " "; return lines; @@ -874,7 +861,11 @@ public class ContainerShop implements Shop { // check price restriction PriceLimiter.CheckResult priceRestriction = plugin.getShopManager().getPriceLimiter().check(item, price); if (priceRestriction.getStatus() != PriceLimiter.Status.PASS) { - if (price < priceRestriction.getMin()) { + if (priceRestriction.getStatus() == PriceLimiter.Status.NOT_VALID) { + setDirty(); + price = priceRestriction.getMin(); + this.update(); + } else if (price < priceRestriction.getMin()) { setDirty(); price = priceRestriction.getMin(); this.update(); diff --git a/src/main/java/org/maxgamer/quickshop/shop/ShopManager.java b/src/main/java/org/maxgamer/quickshop/shop/ShopManager.java index e589b84c8..dd2efc197 100644 --- a/src/main/java/org/maxgamer/quickshop/shop/ShopManager.java +++ b/src/main/java/org/maxgamer/quickshop/shop/ShopManager.java @@ -26,8 +26,10 @@ import com.google.common.collect.Maps; import com.google.common.collect.Sets; import io.papermc.lib.PaperLib; import lombok.Getter; +import org.apache.commons.lang.StringUtils; import org.bukkit.*; import org.bukkit.block.*; +import org.bukkit.block.data.BlockData; import org.bukkit.block.data.Waterlogged; import org.bukkit.block.data.type.WallSign; import org.bukkit.configuration.file.YamlConfiguration; @@ -49,6 +51,7 @@ import org.maxgamer.quickshop.util.holder.Result; import java.text.DecimalFormat; import java.util.*; import java.util.concurrent.TimeUnit; +import java.util.logging.Level; /** * Manage a lot of shops. @@ -69,18 +72,18 @@ public class ShopManager { private final boolean useOldCanBuildAlgorithm; private final boolean autoSign; private final Cache shopRuntimeUUIDCaching = - CacheBuilder.newBuilder() - .expireAfterAccess(10, TimeUnit.MINUTES) - .maximumSize(50) - .weakValues() - .initialCapacity(50) - .build(); + CacheBuilder.newBuilder() + .expireAfterAccess(10, TimeUnit.MINUTES) + .maximumSize(50) + .weakValues() + .initialCapacity(50) + .build(); public ShopManager(@NotNull QuickShop plugin) { Util.ensureThread(false); this.plugin = plugin; this.useFastShopSearchAlgorithm = - plugin.getConfig().getBoolean("shop.use-fast-shop-search-algorithm", false); + plugin.getConfig().getBoolean("shop.use-fast-shop-search-algorithm", false); Util.debugLog("Loading caching tax account..."); String taxAccount = plugin.getConfig().getString("tax-account", "tax"); if (!taxAccount.isEmpty()) { @@ -91,10 +94,10 @@ public class ShopManager { cacheTaxAccount = null; } this.priceLimiter = - new PriceLimiter( - plugin.getConfig().getDouble("shop.minimum-price"), - plugin.getConfig().getInt("shop.maximum-price"), - plugin.getConfig().getBoolean("shop.allow-free-shop")); + new PriceLimiter( + plugin.getConfig().getDouble("shop.minimum-price"), + plugin.getConfig().getInt("shop.maximum-price"), + plugin.getConfig().getBoolean("shop.allow-free-shop")); this.useOldCanBuildAlgorithm = plugin.getConfig().getBoolean("limits.old-algorithm"); this.autoSign = plugin.getConfig().getBoolean("shop.auto-sign"); } @@ -123,10 +126,10 @@ public class ShopManager { int max = plugin.getShopLimit(p); if (owned + 1 > max) { MsgUtil.sendMessage( - p, - MsgUtil.getMessage( - "reached-maximum-can-create", p, String.valueOf(owned), - String.valueOf(max))); + p, + MsgUtil.getMessage( + "reached-maximum-can-create", p, String.valueOf(owned), + String.valueOf(max))); return false; } } @@ -211,6 +214,31 @@ public class ShopManager { return this.shops.get(world); } + private void processWaterLoggedSign(@NotNull Block container, @NotNull Block signBlock) { + boolean signIsWatered = signBlock.getType() == Material.WATER; + signBlock.setType(Util.getSignMaterial()); + BlockState signBlockState = signBlock.getState(); + BlockData signBlockData = signBlockState.getBlockData(); + if (signIsWatered && (signBlockData instanceof Waterlogged)) { + Waterlogged waterable = (Waterlogged) signBlockData; + waterable.setWaterlogged(true); // Looks like sign directly put in water + } + if (signBlockData instanceof WallSign) { + WallSign wallSignBlockData = (WallSign) signBlockData; + BlockFace bf = container.getFace(signBlock); + if (bf != null) { + wallSignBlockData.setFacing(bf); + signBlockState.setBlockData(wallSignBlockData); + } + } else { + plugin.getLogger().warning( + "Sign material " + + signBlockState.getType().name() + + " not a WallSign, make sure you using correct sign material."); + } + signBlockState.update(true); + } + /** * Create a shop use Shop and Info object. * @@ -224,29 +252,8 @@ public class ShopManager { throw new IllegalStateException("The owner creating the shop is offline or not exist"); } if (info.getSignBlock() != null && autoSign) { - if (Util.isAir(info.getSignBlock().getType()) - || info.getSignBlock().getType() == Material.WATER) { - info.getSignBlock().setType(Util.getSignMaterial()); - BlockState bs = info.getSignBlock().getState(); - if (info.getSignBlock().getType() == Material.WATER - && (bs.getBlockData() instanceof Waterlogged)) { - Waterlogged waterable = (Waterlogged) bs.getBlockData(); - waterable.setWaterlogged(true); // Looks like sign directly put in water - } - if (bs.getBlockData() instanceof WallSign) { - WallSign signBlockDataType = (WallSign) bs.getBlockData(); - BlockFace bf = info.getLocation().getBlock().getFace(info.getSignBlock()); - if (bf != null) { - signBlockDataType.setFacing(bf); - bs.setBlockData(signBlockDataType); - } - } else { - plugin.getLogger().warning( - "Sign material " - + bs.getType().name() - + " not a WallSign, make sure you using correct sign material."); - } - bs.update(true); + if (Util.isAir(info.getSignBlock().getType()) || info.getSignBlock().getType() == Material.WATER) { + this.processWaterLoggedSign(shop.getLocation().getBlock(), info.getSignBlock()); } else { if (!plugin.getConfig().getBoolean("shop.allow-shop-without-space-for-sign")) { MsgUtil.sendMessage(player, MsgUtil.getMessage("failed-to-put-sign", player)); @@ -263,18 +270,28 @@ public class ShopManager { addShop(shop.getLocation().getWorld().getName(), shop); // save to database plugin.getDatabaseHelper().createShop(shop, null, e -> - Util.mainThreadRun(() -> { - // also remove from memory when failed - shop.delete(true); - plugin.getLogger() - .warning("Shop create failed, trying to auto fix the database..."); - boolean backupSuccess = Util.backupDatabase(); - if (backupSuccess) { - plugin.getDatabaseHelper().removeShop(shop); - } else { - plugin.getLogger().warning( - "Failed to backup the database, all changes will revert after a reboot."); + Util.mainThreadRun(() -> { + // also remove from memory when failed + shop.delete(true); + plugin.getLogger() + .log(Level.WARNING, "Shop create failed, trying to auto fix the database...", e); + boolean backupSuccess = Util.backupDatabase(); + if (backupSuccess) { + plugin.getDatabaseHelper().removeShop(shop); + } else { + plugin.getLogger().warning( + "Failed to backup the database, all changes will revert after a reboot."); } + plugin.getDatabaseHelper().createShop(shop, null, e2 -> { + plugin.getLogger() + .log(Level.SEVERE, "Shop create failed, auto fix failed, the changes may won't commit to database.", e2); + MsgUtil.sendMessage(player, MsgUtil.getMessage("shop-creation-failed", player)); + Util.mainThreadRun(() -> { + shop.onUnload(); + removeShop(shop); + shop.delete(); + }); + }); })); } @@ -417,7 +434,7 @@ public class ShopManager { @Nullable public Shop getShopFromRuntimeRandomUniqueId( - @NotNull UUID runtimeRandomUniqueId, boolean includeInvalid) { + @NotNull UUID runtimeRandomUniqueId, boolean includeInvalid) { Shop shop = shopRuntimeUUIDCaching.getIfPresent(runtimeRandomUniqueId); if (shop == null) { for (Shop shopWithoutCache : this.getLoadedShops()) { @@ -457,14 +474,14 @@ public class ShopManager { || info.getLocation().distanceSquared(p.getLocation()) > 25) { MsgUtil.sendMessage(p, MsgUtil.getMessage("not-looking-at-shop", p)); return; - } - if (info.getAction() == ShopAction.CREATE) { - actionCreate(p, info, message, bypassProtectionChecks); - } - if (info.getAction() == ShopAction.BUY) { - actionTrade(p, info, message); - } - }); + } + if (info.getAction() == ShopAction.CREATE) { + actionCreate(p, info, message, bypassProtectionChecks); + } + if (info.getAction() == ShopAction.BUY) { + actionTrade(p, info, message); + } + }); } /** @@ -487,8 +504,8 @@ public class ShopManager { */ public void addShop(@NotNull String world, @NotNull Shop shop) { Map> inWorld = - this.getShops() - .computeIfAbsent(world, k -> new MapMaker().initialCapacity(3).makeMap()); + this.getShops() + .computeIfAbsent(world, k -> new MapMaker().initialCapacity(3).makeMap()); // There's no world storage yet. We need to create that map. // Put it in the data universe // Calculate the chunks coordinates. These are 1,2,3 for each chunk, NOT @@ -498,7 +515,7 @@ public class ShopManager { // Get the chunk set from the world info ShopChunk shopChunk = new ShopChunk(world, x, z); Map inChunk = - inWorld.computeIfAbsent(shopChunk, k -> new MapMaker().initialCapacity(1).makeMap()); + inWorld.computeIfAbsent(shopChunk, k -> new MapMaker().initialCapacity(1).makeMap()); // That chunk data hasn't been created yet - Create it! // Put it in the world // Put the shop in its location in the chunk list. @@ -597,12 +614,12 @@ public class ShopManager { } public void actionBuy( - @NotNull UUID buyer, - @NotNull Inventory buyerInventory, - @NotNull Economy eco, - @NotNull Info info, - @NotNull Shop shop, - int amount) { + @NotNull UUID buyer, + @NotNull Inventory buyerInventory, + @NotNull Economy eco, + @NotNull Info info, + @NotNull Shop shop, + int amount) { Util.ensureThread(false); if (shopIsNotValid(buyer, info, shop)) { return; @@ -613,24 +630,24 @@ public class ShopManager { } if (space < amount) { MsgUtil.sendMessage( - buyer, - MsgUtil.getMessage( buyer, - "shop-has-no-space", - Integer.toString(space), - Util.getItemStackName(shop.getItem()))); + MsgUtil.getMessage( + buyer, + "shop-has-no-space", + Integer.toString(space), + Util.getItemStackName(shop.getItem()))); return; } int count = Util.countItems(buyerInventory, shop.getItem()); // Not enough items if (amount > count) { MsgUtil.sendMessage( - buyer, - MsgUtil.getMessage( buyer, - "you-dont-have-that-many-items", - Integer.toString(count), - Util.getItemStackName(shop.getItem()))); + MsgUtil.getMessage( + buyer, + "you-dont-have-that-many-items", + Integer.toString(count), + Util.getItemStackName(shop.getItem()))); return; } if (amount < 1) { @@ -650,52 +667,31 @@ public class ShopManager { total = e.getTotal(); // Allow addon to set it } EconomyTransaction transaction; + EconomyTransaction.EconomyTransactionBuilder builder = EconomyTransaction.builder() + .core(eco) + .amount(total) + .taxModifier(taxModifier) + .taxAccount(cacheTaxAccount) + .currency(shop.getCurrency()) + .world(shop.getLocation().getWorld()) + .to(buyer); if (!shop.isUnlimited() - || (plugin.getConfig().getBoolean("shop.pay-unlimited-shop-owners") - && shop.isUnlimited())) { - transaction = - EconomyTransaction.builder() - .core(eco) - .amount(total) - .from(shop.getOwner()) - .to(buyer) - .taxModifier(taxModifier) - .taxAccount(cacheTaxAccount) - .currency(shop.getCurrency()) - .build(); + || (plugin.getConfig().getBoolean("shop.pay-unlimited-shop-owners") + && shop.isUnlimited())) { + transaction = builder.from(shop.getOwner()).build(); } else { - transaction = - EconomyTransaction.builder() - .core(eco) - .amount(total) - .from(null) - .to(buyer) - .taxModifier(taxModifier) - .taxAccount(cacheTaxAccount) - .currency(shop.getCurrency()) - .build(); + transaction = builder.from(null).build(); } if (!transaction.failSafeCommit()) { if (transaction.getSteps() == EconomyTransaction.TransactionSteps.CHECK) { - MsgUtil.sendMessage( - buyer, - MsgUtil.getMessage( - buyer, - "the-owner-cant-afford-to-buy-from-you", - Objects.requireNonNull( - format(total, shop.getLocation().getWorld(), shop.getCurrency())), - Objects.requireNonNull( - format(eco.getBalance(shop.getOwner(), shop.getLocation().getWorld(), - shop.getCurrency()), shop.getLocation().getWorld(), - shop.getCurrency()) - ))); + MsgUtil.sendMessage(buyer, MsgUtil.getMessage(buyer, "the-owner-cant-afford-to-buy-from-you", + Objects.requireNonNull(format(total, shop.getLocation().getWorld(), shop.getCurrency())), + Objects.requireNonNull(format(eco.getBalance(shop.getOwner(), shop.getLocation().getWorld(), + shop.getCurrency()), shop.getLocation().getWorld(), shop.getCurrency())))); } else { MsgUtil.sendMessage(buyer, MsgUtil.getMessage(buyer, "purchase-failed")); - plugin - .getLogger() - .severe("EconomyTransaction Failed, last error:" + transaction.getLastError()); - QuickShop.getInstance() - .log("EconomyTransaction Failed, last error:" + transaction.getLastError()); + plugin.getLogger().severe("EconomyTransaction Failed, last error:" + transaction.getLastError()); + QuickShop.getInstance().log("EconomyTransaction Failed, last error:" + transaction.getLastError()); } return; } @@ -703,20 +699,13 @@ public class ShopManager { // Notify the owner of the purchase. //TODO: move to a standalone method Player player = plugin.getServer().getPlayer(buyer); - String msg = - MsgUtil.getMessage( - buyer, - "player-sold-to-your-store", + String msg = MsgUtil.getMessage(buyer, "player-sold-to-your-store", player != null ? player.getName() : buyer.toString(), String.valueOf(amount), "##########" + Util.serialize(shop.getItem()) + "##########"); if (space == amount) { - msg += - "\n" - + MsgUtil.getMessage( - buyer, - "shop-out-of-space", + msg += "\n" + MsgUtil.getMessage(buyer, "shop-out-of-space", Integer.toString(shop.getLocation().getBlockX()), Integer.toString(shop.getLocation().getBlockY()), Integer.toString(shop.getLocation().getBlockZ())); @@ -727,12 +716,9 @@ public class ShopManager { } } MsgUtil.send(shop, shop.getOwner(), msg); - shop.buy( - buyer, buyerInventory, player != null ? player.getLocation() : shop.getLocation(), - amount); + shop.buy(buyer, buyerInventory, player != null ? player.getLocation() : shop.getLocation(), amount); MsgUtil.sendSellSuccess(buyer, shop, amount); - ShopSuccessPurchaseEvent se = - new ShopSuccessPurchaseEvent(shop, buyer, buyerInventory, amount, total, taxModifier); + ShopSuccessPurchaseEvent se = new ShopSuccessPurchaseEvent(shop, buyer, buyerInventory, amount, total, taxModifier); plugin.getServer().getPluginManager().callEvent(se); shop.setSignText(); // Update the signs count } @@ -740,7 +726,7 @@ public class ShopManager { @Deprecated public void actionBuy(@NotNull Player p, @NotNull Economy eco, @NotNull Info info, - @NotNull Shop shop, int amount) { + @NotNull Shop shop, int amount) { Util.ensureThread(false); actionBuy(p.getUniqueId(), p.getInventory(), eco, info, shop, amount); } @@ -757,20 +743,15 @@ public class ShopManager { if (player != null) { if (QuickShop.getPermissionManager().hasPermission(player, "quickshop.tax")) { tax = 0; - Util.debugLog("Disable the Tax for player " + player - + " cause they have permission quickshop.tax"); + Util.debugLog("Disable the Tax for player " + player + " cause they have permission quickshop.tax"); } - if (shop.isUnlimited() && QuickShop.getPermissionManager() - .hasPermission(player, "quickshop.tax.bypassunlimited")) { + if (shop.isUnlimited() && QuickShop.getPermissionManager().hasPermission(player, "quickshop.tax.bypassunlimited")) { tax = 0; - Util.debugLog("Disable the Tax for player " + player - + " cause they have permission quickshop.tax.bypassunlimited and shop is unlimited."); + Util.debugLog("Disable the Tax for player " + player + " cause they have permission quickshop.tax.bypassunlimited and shop is unlimited."); } } if (tax >= 1.0) { - plugin.getLogger().warning( - "Disable tax due to is invalid, it should be in 0.0-1.0 (current value is " + tax - + ")"); + plugin.getLogger().warning("Disable tax due to is invalid, it should be in 0.0-1.0 (current value is " + tax + ")"); tax = 0; } if (tax < 0) { @@ -785,30 +766,25 @@ public class ShopManager { } public void actionCreate(@NotNull Player p, @NotNull Info info, @NotNull String message, - boolean bypassProtectionChecks) { + boolean bypassProtectionChecks) { Util.ensureThread(false); if (plugin.getEconomy() == null) { - MsgUtil.sendMessage(p, - "Error: Economy system not loaded, type /qs main command to get details."); + MsgUtil.sendMessage(p, "Error: Economy system not loaded, type /qs main command to get details."); return; } if (plugin.isAllowStack() && !p.hasPermission("quickshop.create.stacks")) { - Util.debugLog("Player " + p - + " no permission to create stacks shop, forcing creating single item shop"); + Util.debugLog("Player " + p + " no permission to create stacks shop, forcing creating single item shop"); info.getItem().setAmount(1); } // Checking the shop can be created Util.debugLog("Calling for protection check..."); - // Fix openInv compatiable issue + // Fix openInv compatible issue if (!bypassProtectionChecks) { Result result = plugin.getPermissionChecker().canBuild(p, info.getLocation()); if (!result.isSuccess()) { - MsgUtil.sendMessage(p, - MsgUtil.getMessage("3rd-plugin-build-check-failed", p, result.getMessage())); - Util.debugLog( - "Failed to create shop because protection check failed, found:" + result - .getMessage()); + MsgUtil.sendMessage(p, MsgUtil.getMessage("3rd-plugin-build-check-failed", p, result.getMessage())); + Util.debugLog("Failed to create shop because protection check failed, found:" + result.getMessage()); return; } } @@ -827,7 +803,7 @@ public class ShopManager { return; } if (info.getLocation().getBlock().getType() - == Material.ENDER_CHEST) { // FIXME: Need a better impl + == Material.ENDER_CHEST) { // FIXME: Need a better impl if (!QuickShop.getPermissionManager().hasPermission(p, "quickshop.create.enderchest")) { return; } @@ -839,13 +815,14 @@ public class ShopManager { MsgUtil.sendMessage(p, MsgUtil.getMessage("failed-to-put-sign", p)); return; } - } - Material signType = info.getSignBlock().getType(); - if (signType != Material.WATER - && !Util.isAir(signType) - && !plugin.getConfig().getBoolean("shop.allow-shop-without-space-for-sign")) { - MsgUtil.sendMessage(p, MsgUtil.getMessage("failed-to-put-sign", p)); - return; + } else { + Material signType = info.getSignBlock().getType(); + if (signType != Material.WATER + && !Util.isAir(signType) + && !plugin.getConfig().getBoolean("shop.allow-shop-without-space-for-sign")) { + MsgUtil.sendMessage(p, MsgUtil.getMessage("failed-to-put-sign", p)); + return; + } } } @@ -869,15 +846,15 @@ public class ShopManager { return; } String strFormat = new DecimalFormat("#.#########").format(Math.abs(price)) - .replace(",", "."); + .replace(",", "."); String[] processedDouble = strFormat.split("\\."); if (processedDouble.length > 1) { int maximumDigitsLimit = plugin.getConfig() - .getInt("maximum-digits-in-price", -1); + .getInt("maximum-digits-in-price", -1); if (processedDouble[1].length() > maximumDigitsLimit - && maximumDigitsLimit != -1) { + && maximumDigitsLimit != -1) { MsgUtil.sendMessage(p, MsgUtil.getMessage("digits-reach-the-limit", p, - String.valueOf(maximumDigitsLimit))); + String.valueOf(maximumDigitsLimit))); return; } } @@ -906,11 +883,14 @@ public class ShopManager { return; case PRICE_RESTRICTED: Map.Entry materialLimit = Util - .getPriceRestriction(info.getItem().getType()); + .getPriceRestriction(info.getItem().getType()); MsgUtil.sendMessage(p, MsgUtil.getMessage("restricted-prices", p, - Util.getItemStackName(info.getItem()), - String.valueOf(materialLimit.getKey()), - String.valueOf(materialLimit.getValue()))); + Util.getItemStackName(info.getItem()), + String.valueOf(materialLimit.getKey()), + String.valueOf(materialLimit.getValue()))); + return; + case NOT_VALID: + MsgUtil.sendMessage(p, MsgUtil.getMessage("not-a-number", p, message)); return; } @@ -931,10 +911,10 @@ public class ShopManager { new YamlConfiguration()); if (!bypassProtectionChecks) { Result result = plugin.getIntegrationHelper() - .callIntegrationsCanCreate(p, info.getLocation()); + .callIntegrationsCanCreate(p, info.getLocation()); if (!result.isSuccess()) { MsgUtil.sendMessage(p, - MsgUtil.getMessage("integrations-check-failed-create", p, result.getMessage())); + MsgUtil.getMessage("integrations-check-failed-create", p, result.getMessage())); Util.debugLog("Cancelled by integrations: " + result); return; } @@ -956,27 +936,28 @@ public class ShopManager { } if (createCost > 0) { EconomyTransaction economyTransaction = - EconomyTransaction.builder() - .taxAccount(cacheTaxAccount) - .taxModifier(0.0) - .core(plugin.getEconomy()) - .from(p.getUniqueId()) - .to(null) - .amount(createCost) - .currency(plugin.getCurrency()) - .build(); + EconomyTransaction.builder() + .taxAccount(cacheTaxAccount) + .taxModifier(0.0) + .core(plugin.getEconomy()) + .from(p.getUniqueId()) + .to(null) + .amount(createCost) + .currency(plugin.getCurrency()) + .world(shop.getLocation().getWorld()) + .build(); if (!economyTransaction.failSafeCommit()) { if (economyTransaction.getSteps() == EconomyTransaction.TransactionSteps.CHECK) { MsgUtil.sendMessage(p, MsgUtil.getMessage("you-cant-afford-a-new-shop", p, - Objects.requireNonNull(format(createCost, shop.getLocation().getWorld(), - shop.getCurrency())))); + Objects.requireNonNull(format(createCost, shop.getLocation().getWorld(), + shop.getCurrency())))); } else { MsgUtil.sendMessage(p, MsgUtil.getMessage("purchase-failed", p)); plugin.getLogger().severe( - "EconomyTransaction Failed, last error:" + economyTransaction - .getLastError()); + "EconomyTransaction Failed, last error:" + economyTransaction + .getLastError()); plugin.log("EconomyTransaction Failed, last error:" + economyTransaction - .getLastError()); + .getLastError()); } return; } @@ -1009,19 +990,19 @@ public class ShopManager { @Deprecated public void actionSell( - @NotNull Player p, @NotNull Economy eco, @NotNull Info info, @NotNull Shop shop, - int amount) { + @NotNull Player p, @NotNull Economy eco, @NotNull Info info, @NotNull Shop shop, + int amount) { Util.ensureThread(false); actionSell(p.getUniqueId(), p.getInventory(), eco, info, shop, amount); } public void actionSell( - @NotNull UUID seller, - @NotNull Inventory sellerInventory, - @NotNull Economy eco, - @NotNull Info info, - @NotNull Shop shop, - int amount) { + @NotNull UUID seller, + @NotNull Inventory sellerInventory, + @NotNull Economy eco, + @NotNull Info info, + @NotNull Shop shop, + int amount) { Util.ensureThread(false); if (shopIsNotValid(seller, info, shop)) { return; @@ -1032,12 +1013,12 @@ public class ShopManager { } if (stock < amount) { MsgUtil.sendMessage( - seller, - MsgUtil.getMessage( seller, - "shop-stock-too-low", - Integer.toString(stock), - Util.getItemStackName(shop.getItem()))); + MsgUtil.getMessage( + seller, + "shop-stock-too-low", + Integer.toString(stock), + Util.getItemStackName(shop.getItem()))); return; } if (amount < 1) { @@ -1048,7 +1029,7 @@ public class ShopManager { int pSpace = Util.countSpace(sellerInventory, shop.getItem()); if (amount > pSpace) { MsgUtil.sendMessage( - seller, MsgUtil.getMessage(seller, "not-enough-space", String.valueOf(pSpace))); + seller, MsgUtil.getMessage(seller, "not-enough-space", String.valueOf(pSpace))); return; } @@ -1064,54 +1045,35 @@ public class ShopManager { // Money handling // SELLING Player -> Shop Owner EconomyTransaction transaction; + EconomyTransaction.EconomyTransactionBuilder builder = EconomyTransaction.builder() + .allowLoan(plugin.getConfig().getBoolean("shop.allow-economy-loan", false)) + .core(eco) + .from(seller) + .amount(total) + .taxModifier(taxModifier) + .taxAccount(cacheTaxAccount) + .world(shop.getLocation().getWorld()) + .currency(shop.getCurrency()); if (!shop.isUnlimited() - || (plugin.getConfig().getBoolean("shop.pay-unlimited-shop-owners") - && shop.isUnlimited())) { - transaction = - EconomyTransaction.builder() - .allowLoan(plugin.getConfig().getBoolean("shop.allow-economy-loan", false)) - .core(eco) - .from(seller) - .to(shop.getOwner()) - .amount(total) - .taxModifier(taxModifier) - .taxAccount(cacheTaxAccount) - .currency(shop.getCurrency()) - .build(); + || (plugin.getConfig().getBoolean("shop.pay-unlimited-shop-owners") + && shop.isUnlimited())) { + transaction = builder.to(shop.getOwner()).build(); } else { - transaction = - EconomyTransaction.builder() - .allowLoan(plugin.getConfig().getBoolean("shop.allow-economy-loan", false)) - .core(eco) - .from(seller) - .to(null) - .amount(total) - .taxModifier(taxModifier) - .taxAccount(cacheTaxAccount) - .world(shop.getLocation().getWorld()) - .currency(shop.getCurrency()) - .build(); + transaction = builder.to(null).build(); } if (!transaction.failSafeCommit()) { if (transaction.getSteps() == EconomyTransaction.TransactionSteps.CHECK) { - MsgUtil.sendMessage( - seller, - MsgUtil.getMessage( - seller, - "you-cant-afford-to-buy", + MsgUtil.sendMessage(seller, MsgUtil.getMessage(seller, "you-cant-afford-to-buy", Objects.requireNonNull( - format(total, shop.getLocation().getWorld(), shop.getCurrency())), + format(total, shop.getLocation().getWorld(), shop.getCurrency())), Objects.requireNonNull(format( - eco.getBalance(seller, shop.getLocation().getWorld(), - shop.getCurrency()), shop.getLocation().getWorld(), - shop.getCurrency())))); + eco.getBalance(seller, shop.getLocation().getWorld(), + shop.getCurrency()), shop.getLocation().getWorld(), + shop.getCurrency())))); } else { MsgUtil.sendMessage(seller, MsgUtil.getMessage(seller, "purchase-failed")); - plugin - .getLogger() - .severe("EconomyTransaction Failed, last error:" + transaction.getLastError()); - QuickShop.getInstance() - .log("EconomyTransaction Failed, last error:" + transaction.getLastError()); + plugin.getLogger().severe("EconomyTransaction Failed, last error:" + transaction.getLastError()); + QuickShop.getInstance().log("EconomyTransaction Failed, last error:" + transaction.getLastError()); } return; } @@ -1120,20 +1082,14 @@ public class ShopManager { // Notify the shop owner //TODO: move to a standalone method Player player = plugin.getServer().getPlayer(seller); if (plugin.getConfig().getBoolean("show-tax")) { - msg = - MsgUtil.getMessage( - seller, - "player-bought-from-your-store-tax", + msg = MsgUtil.getMessage(seller, "player-bought-from-your-store-tax", player != null ? player.getName() : seller.toString(), Integer.toString(amount * shop.getItem().getAmount()), "##########" + Util.serialize(shop.getItem()) + "##########", Double.toString(total), Util.format(CalculateUtil.multiply(taxModifier, total), shop)); } else { - msg = - MsgUtil.getMessage( - seller, - "player-bought-from-your-store", + msg = MsgUtil.getMessage(seller, "player-bought-from-your-store", player != null ? player.getName() : seller.toString(), Integer.toString(amount * shop.getItem().getAmount()), "##########" + Util.serialize(shop.getItem()) + "##########", @@ -1141,11 +1097,7 @@ public class ShopManager { } // Transfers the item from A to B if (stock == amount) { - msg += - "\n" - + MsgUtil.getMessage( - seller, - "shop-out-of-stock", + msg += "\n" + MsgUtil.getMessage(seller, "shop-out-of-stock", Integer.toString(shop.getLocation().getBlockX()), Integer.toString(shop.getLocation().getBlockY()), Integer.toString(shop.getLocation().getBlockZ()), @@ -1158,14 +1110,9 @@ public class ShopManager { MsgUtil.send(shop, staff, msg); } } - shop.sell( - seller, - sellerInventory, - player != null ? player.getLocation() : shop.getLocation(), - amount); + shop.sell(seller, sellerInventory, player != null ? player.getLocation() : shop.getLocation(), amount); MsgUtil.sendPurchaseSuccess(seller, shop, amount); - ShopSuccessPurchaseEvent se = - new ShopSuccessPurchaseEvent(shop, seller, sellerInventory, amount, total, taxModifier); + ShopSuccessPurchaseEvent se = new ShopSuccessPurchaseEvent(shop, seller, sellerInventory, amount, total, taxModifier); plugin.getServer().getPluginManager().callEvent(se); } @@ -1177,7 +1124,7 @@ public class ShopManager { private boolean shopIsNotValid(@Nullable Player p, @NotNull Info info, @NotNull Shop shop) { if (plugin.getEconomy() == null) { MsgUtil.sendMessage(p, - "Error: Economy system not loaded, type /qs main command to get details."); + "Error: Economy system not loaded, type /qs main command to get details."); return true; } if (!Util.canBeShop(info.getLocation().getBlock())) { @@ -1195,14 +1142,13 @@ public class ShopManager { Util.ensureThread(false); if (plugin.getEconomy() == null) { MsgUtil.sendMessage( - p, "Error: Economy system not loaded, type /qs main command to get details."); + p, "Error: Economy system not loaded, type /qs main command to get details."); return; } Result result = plugin.getIntegrationHelper() - .callIntegrationsCanTrade(p, info.getLocation()); + .callIntegrationsCanTrade(p, info.getLocation()); if (!result.isSuccess()) { - MsgUtil.sendMessage( - p, MsgUtil.getMessage("integrations-check-failed-trade", p, result.getMessage())); + MsgUtil.sendMessage(p, MsgUtil.getMessage("integrations-check-failed-trade", p, result.getMessage())); Util.debugLog("Cancel by integrations."); return; } @@ -1215,8 +1161,7 @@ public class ShopManager { MsgUtil.sendMessage(p, MsgUtil.getMessage("chest-was-removed", p)); return; } - if (p.getGameMode() == GameMode.CREATIVE - && plugin.getConfig().getBoolean("shop.disable-creative-mode-trading")) { + if (p.getGameMode() == GameMode.CREATIVE && plugin.getConfig().getBoolean("shop.disable-creative-mode-trading")) { MsgUtil.sendMessage(p, MsgUtil.getMessage("trading-in-creative-mode-is-disabled", p)); return; } @@ -1226,18 +1171,19 @@ public class ShopManager { return; } if (shop.isBuying()) { - try { + + if (StringUtils.isNumeric(message)) { amount = Integer.parseInt(message); - } catch (NumberFormatException e) { + } else { if (message.equalsIgnoreCase( - plugin.getConfig().getString("shop.word-for-trade-all-items", "all"))) { + plugin.getConfig().getString("shop.word-for-trade-all-items", "all"))) { int shopHaveSpaces = - Util.countSpace(((ContainerShop) shop).getInventory(), shop.getItem()); + Util.countSpace(((ContainerShop) shop).getInventory(), shop.getItem()); int invHaveItems = Util.countItems(p.getInventory(), shop.getItem()); // Check if shop owner has enough money double ownerBalance = eco - .getBalance(shop.getOwner(), shop.getLocation().getWorld(), - shop.getCurrency()); + .getBalance(shop.getOwner(), shop.getLocation().getWorld(), + shop.getCurrency()); int ownerCanAfford; if (shop.getPrice() != 0) { @@ -1262,40 +1208,40 @@ public class ShopManager { if (shopHaveSpaces == 0) { // when typed 'all' but the shop doesn't have any empty space MsgUtil.sendMessage( - p, - MsgUtil.getMessage( - "shop-has-no-space", p, - Integer.toString(shopHaveSpaces), - Util.getItemStackName(shop.getItem()))); + MsgUtil.getMessage( + "shop-has-no-space", + p, + Integer.toString(shopHaveSpaces), + Util.getItemStackName(shop.getItem()))); return; } if (ownerCanAfford == 0 - && (!shop.isUnlimited() - || plugin.getConfig().getBoolean("shop.pay-unlimited-shop-owners"))) { + && (!shop.isUnlimited() + || plugin.getConfig().getBoolean("shop.pay-unlimited-shop-owners"))) { // when typed 'all' but the shop owner doesn't have enough money to buy at least 1 // item (and shop isn't unlimited or pay-unlimited is true) MsgUtil.sendMessage( - p, - MsgUtil.getMessage( - "the-owner-cant-afford-to-buy-from-you", p, - Objects.requireNonNull( - format(shop.getPrice(), shop.getLocation().getWorld(), - shop.getCurrency())), - Objects.requireNonNull( - format(ownerBalance, shop.getLocation().getWorld(), - shop.getCurrency())))); + MsgUtil.getMessage( + "the-owner-cant-afford-to-buy-from-you", + p, + Objects.requireNonNull( + format(shop.getPrice(), shop.getLocation().getWorld(), + shop.getCurrency())), + Objects.requireNonNull( + format(ownerBalance, shop.getLocation().getWorld(), + shop.getCurrency())))); return; } // when typed 'all' but player doesn't have any items to sell MsgUtil.sendMessage( - p, - MsgUtil.getMessage( - "you-dont-have-that-many-items", p, - Integer.toString(amount), - Util.getItemStackName(shop.getItem()))); + MsgUtil.getMessage( + "you-dont-have-that-many-items", + p, + Integer.toString(amount), + Util.getItemStackName(shop.getItem()))); return; } } else { @@ -1303,19 +1249,19 @@ public class ShopManager { // player know that there should be positive number or 'all' MsgUtil.sendMessage(p, MsgUtil.getMessage("not-a-integer", p, message)); Util.debugLog( - "Receive the chat " + message + " and it format failed: " + e.getMessage()); + "Receive the chat " + message + " and it format failed: " + message); return; } } actionBuy(p.getUniqueId(), p.getInventory(), eco, info, shop, amount); } else if (shop.isSelling()) { - try { + if (StringUtils.isNumeric(message)) { amount = Integer.parseInt(message); - } catch (NumberFormatException e) { + } else { if (message.equalsIgnoreCase( - plugin.getConfig().getString("shop.word-for-trade-all-items", "all"))) { + plugin.getConfig().getString("shop.word-for-trade-all-items", "all"))) { int shopHaveItems = Util - .countItems(((ContainerShop) shop).getInventory(), shop.getItem()); + .countItems(((ContainerShop) shop).getInventory(), shop.getItem()); int invHaveSpaces = Util.countSpace(p.getInventory(), shop.getItem()); if (!shop.isUnlimited()) { amount = Math.min(shopHaveItems, invHaveSpaces); @@ -1327,33 +1273,33 @@ public class ShopManager { // typed 'all', check if player has enough money than price * amount double price = shop.getPrice(); double balance = eco.getBalance(p.getUniqueId(), shop.getLocation().getWorld(), - shop.getCurrency()); + shop.getCurrency()); amount = Math.min(amount, (int) Math.floor(balance / price)); if (amount < 1) { // typed 'all' but the auto set amount is 0 // when typed 'all' but player can't buy any items if (!shop.isUnlimited() && shopHaveItems < 1) { // but also the shop's stock is 0 MsgUtil.sendMessage(p, MsgUtil.getMessage("shop-stock-too-low", p, - Integer.toString(shop.getRemainingStock()), - Util.getItemStackName(shop.getItem()))); + Integer.toString(shop.getRemainingStock()), + Util.getItemStackName(shop.getItem()))); } else { // when if player's inventory is full if (invHaveSpaces <= 0) { MsgUtil.sendMessage(p, MsgUtil.getMessage("not-enough-space", p, - String.valueOf(invHaveSpaces))); + String.valueOf(invHaveSpaces))); return; } MsgUtil.sendMessage( - p, - MsgUtil.getMessage( - "you-cant-afford-to-buy", p, - Objects.requireNonNull( - format(price, shop.getLocation().getWorld(), - shop.getCurrency())), - Objects.requireNonNull( - format(balance, shop.getLocation().getWorld(), - shop.getCurrency())))); + MsgUtil.getMessage( + "you-cant-afford-to-buy", + p, + Objects.requireNonNull( + format(price, shop.getLocation().getWorld(), + shop.getCurrency())), + Objects.requireNonNull( + format(balance, shop.getLocation().getWorld(), + shop.getCurrency())))); } return; } @@ -1362,7 +1308,7 @@ public class ShopManager { // number or 'all' MsgUtil.sendMessage(p, MsgUtil.getMessage("not-a-integer", p, message)); Util.debugLog( - "Receive the chat " + message + " and it format failed: " + e.getMessage()); + "Receive the chat " + message + " and it format failed: " + message); return; } } diff --git a/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java b/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java index a21f76916..2fc13d1c2 100644 --- a/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java +++ b/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java @@ -63,6 +63,8 @@ public class VirtualDisplayItem extends DisplayItem { //The List which store packet sender private final Set packetSenders = new ConcurrentSkipListSet<>(); + private volatile AsyncPacketSender.AsyncSendingTask asyncPacketSenderTask = null; + private volatile boolean isDisplay; //If packet initialized @@ -322,6 +324,12 @@ public class VirtualDisplayItem extends DisplayItem { } } + if (asyncPacketSenderTask != null) { + asyncPacketSenderTask.stop(); + } + asyncPacketSenderTask = AsyncPacketSender.create(); + asyncPacketSenderTask.start(plugin); + if (packetAdapter == null) { packetAdapter = new PacketAdapter(plugin, ListenerPriority.HIGH, PacketType.Play.Server.MAP_CHUNK) { @Override @@ -336,7 +344,7 @@ public class VirtualDisplayItem extends DisplayItem { int x = integerStructureModifier.read(0); //chunk z int z = integerStructureModifier.read(1); - AsyncPacketSender.offer(() -> { + asyncPacketSenderTask.offer(() -> { if (chunkLocation == null) { World world = shop.getLocation().getWorld(); Chunk chunk; @@ -359,29 +367,11 @@ public class VirtualDisplayItem extends DisplayItem { packetSenders.add(player.getUniqueId()); sendFakeItem(player); } -// Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> { -// if (chunkLocation == null) { -// World world = shop.getLocation().getWorld(); -// Chunk chunk = shop.getLocation().getChunk(); -// chunkLocation = new ShopChunk(world.getName(), chunk.getX(), chunk.getZ()); -// } -// if (chunkLocation.isSame(event.getPlayer().getWorld().getName(), x, z)) { -// packetSenders.add(event.getPlayer().getUniqueId()); -// sendFakeItem(event.getPlayer()); -// } -// }, 1); }); } }; - protocolManager.addPacketListener(packetAdapter); //TODO: This may affects performance -// asyncSendingTask = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, () -> { -// Runnable runnable = asyncPacketSendQueue.poll(); -// while (runnable != null) { -// runnable.run(); -// runnable = asyncPacketSendQueue.poll(); -// } -// }, 0, 1); } + protocolManager.addPacketListener(packetAdapter); //TODO: This may affects performance } private void unload() { @@ -389,6 +379,9 @@ public class VirtualDisplayItem extends DisplayItem { if (packetAdapter != null) { protocolManager.removePacketListener(packetAdapter); } + if (asyncPacketSenderTask != null) { + asyncPacketSenderTask.stop(); + } } diff --git a/src/main/java/org/maxgamer/quickshop/util/AsyncPacketSender.java b/src/main/java/org/maxgamer/quickshop/util/AsyncPacketSender.java index 8a2b4f474..bac17f1dc 100644 --- a/src/main/java/org/maxgamer/quickshop/util/AsyncPacketSender.java +++ b/src/main/java/org/maxgamer/quickshop/util/AsyncPacketSender.java @@ -21,38 +21,79 @@ package org.maxgamer.quickshop.util; import org.bukkit.scheduler.BukkitTask; import org.maxgamer.quickshop.QuickShop; -import java.util.Queue; -import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.LinkedBlockingQueue; -public final class AsyncPacketSender { +public class AsyncPacketSender { - private static final Queue asyncPacketSendQueue = new ConcurrentLinkedQueue<>(); - private static BukkitTask asyncSendingTask; + private static AsyncSendingTask instance = null; + private static boolean isUsingGlobal = false; + private static volatile boolean enabled = false; + + public synchronized static void start(QuickShop plugin) { + isUsingGlobal = plugin.getConfig().getBoolean("use-global-virtual-item-queue"); + if (isUsingGlobal) { + createAndCancelExistingTask(plugin); + } + enabled = true; + } private AsyncPacketSender() { } - public static void start(QuickShop plugin) { - //lazy initialize - if (asyncSendingTask == null || asyncSendingTask.isCancelled()) { - asyncSendingTask = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, () -> { - Runnable nextTask = asyncPacketSendQueue.poll(); - while (nextTask != null) { - nextTask.run(); - nextTask = asyncPacketSendQueue.poll(); - } - }, 0, 1); + private synchronized static void createAndCancelExistingTask(QuickShop plugin) { + if (instance != null) { + instance.stop(); + } + instance = new AsyncSendingTask(); + instance.start(plugin); + } + + public static AsyncSendingTask create() { + if (!enabled) { + throw new IllegalStateException("Please start AsyncPacketSender first!"); + } + if (isUsingGlobal) { + return instance; + } else { + return new AsyncSendingTask(); } } - public static void offer(Runnable runnable) { - asyncPacketSendQueue.offer(runnable); + public synchronized static void stop() { + if (isUsingGlobal) { + instance.stop(); + } } - public static void stop() { - if (asyncSendingTask != null && !asyncSendingTask.isCancelled()) { - asyncSendingTask.cancel(); + public static class AsyncSendingTask { + private final LinkedBlockingQueue asyncPacketSendQueue = new LinkedBlockingQueue<>(); + private BukkitTask asyncSendingTask; + + public void start(QuickShop plugin) { + //lazy initialize + if (asyncSendingTask == null || asyncSendingTask.isCancelled()) { + asyncSendingTask = plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, () -> { + if (asyncSendingTask.isCancelled()) { + return; + } + Runnable nextTask = asyncPacketSendQueue.poll(); + if (nextTask != null) { + nextTask.run(); + } + }, 0, 1); + } + } + + + public void stop() { + if (asyncSendingTask != null && !asyncSendingTask.isCancelled()) { + asyncSendingTask.cancel(); + } + asyncPacketSendQueue.clear(); + } + + public void offer(Runnable runnable) { + asyncPacketSendQueue.offer(runnable); } - asyncPacketSendQueue.clear(); } } diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java index 6df12653f..37e492fff 100644 --- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java +++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java @@ -787,7 +787,7 @@ public class MsgUtil { } sendMessageToOps(content); plugin.getLogger().warning(content); - Objects.requireNonNull(plugin.getLogWatcher()).add(content); + plugin.log(content); } /** @@ -1450,6 +1450,10 @@ public class MsgUtil { setAndUpdate("controlpanel.freeze-hover"); setAndUpdate("language-version", ++selectedVersion); } + if (selectedVersion == 52) { + setAndUpdate("shop-creation-failed"); + setAndUpdate("language-version", ++selectedVersion); + } setAndUpdate("_comment", "Please edit this file after format with json formatter"); } diff --git a/src/main/java/org/maxgamer/quickshop/util/PriceLimiter.java b/src/main/java/org/maxgamer/quickshop/util/PriceLimiter.java index 3c4058a03..b0569285b 100644 --- a/src/main/java/org/maxgamer/quickshop/util/PriceLimiter.java +++ b/src/main/java/org/maxgamer/quickshop/util/PriceLimiter.java @@ -36,6 +36,9 @@ public class PriceLimiter { @NotNull public CheckResult check(@NotNull ItemStack stack, double price) { + if (Double.isInfinite(price) || Double.isNaN(price)) { + return new CheckResult(Status.NOT_VALID, minPrice, maxPrice); + } if (allowFreeShop) { if (price != 0 && price < minPrice) { return new CheckResult(Status.REACHED_PRICE_MIN_LIMIT, minPrice, maxPrice); @@ -77,6 +80,7 @@ public class PriceLimiter { PASS, REACHED_PRICE_MAX_LIMIT, REACHED_PRICE_MIN_LIMIT, - PRICE_RESTRICTED + PRICE_RESTRICTED, + NOT_VALID } } diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java index ec06c5ea9..8935f06b1 100644 --- a/src/main/java/org/maxgamer/quickshop/util/Util.java +++ b/src/main/java/org/maxgamer/quickshop/util/Util.java @@ -53,6 +53,7 @@ import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.Yaml; import java.io.*; +import java.lang.management.ManagementFactory; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.nio.charset.StandardCharsets; @@ -867,8 +868,9 @@ public class Util { * @return true if the given location is loaded or not. */ public static boolean isLoaded(@NotNull Location loc) { + // plugin.getLogger().log(Level.WARNING, "Checking isLoaded(Location loc)"); - if (loc.getWorld() == null) { + if ((!getNMSVersion().contains("1_13") && !loc.isWorldLoaded()) || loc.getWorld() == null) { // plugin.getLogger().log(Level.WARNING, "Is not loaded. (No world)"); return false; } @@ -1324,6 +1326,15 @@ public class Util { return !QuickShop.getInstance().getBuildInfo().getGitBranch().equalsIgnoreCase("release"); } + /** + * Getting startup flags + * + * @return Java startup flags without some JVM args + */ + public static List getStartupFlags() { + return ManagementFactory.getRuntimeMXBean().getInputArguments(); + } + /** * Get the plugin is under dev-mode(debug mode) * diff --git a/src/main/java/org/maxgamer/quickshop/util/envcheck/CheckResult.java b/src/main/java/org/maxgamer/quickshop/util/envcheck/CheckResult.java index 480aa7823..522a95e5f 100644 --- a/src/main/java/org/maxgamer/quickshop/util/envcheck/CheckResult.java +++ b/src/main/java/org/maxgamer/quickshop/util/envcheck/CheckResult.java @@ -20,7 +20,7 @@ package org.maxgamer.quickshop.util.envcheck; public enum CheckResult { - PASSED("Pass"), WARNING("Warning"), STOP_WORKING("Error"), DISABLE_PLUGIN("Fatal"), KILL_SERVER("Kill"); + SKIPPED("Skip"), PASSED("Pass"), WARNING("Warning"), STOP_WORKING("Error"), DISABLE_PLUGIN("Fatal"), KILL_SERVER("Kill"); private final String display; CheckResult(String display) { diff --git a/src/main/java/org/maxgamer/quickshop/util/envcheck/EnvironmentChecker.java b/src/main/java/org/maxgamer/quickshop/util/envcheck/EnvironmentChecker.java index 4a69a2d7d..e4c0e68a3 100644 --- a/src/main/java/org/maxgamer/quickshop/util/envcheck/EnvironmentChecker.java +++ b/src/main/java/org/maxgamer/quickshop/util/envcheck/EnvironmentChecker.java @@ -93,9 +93,12 @@ public class EnvironmentChecker { public ResultReport run(EnvCheckEntry.Stage stage) { sortTests(); - CheckResult result = CheckResult.PASSED; + Map results = new LinkedHashMap<>(); boolean skipAllTest = false; + ResultContainer executeResult = null; + CheckResult result = CheckResult.PASSED; + Properties properties = System.getProperties(); for (Method declaredMethod : this.tests) { if (skipAllTest) { @@ -107,12 +110,20 @@ public class EnvironmentChecker { Util.debugLog("Skip test: " + envCheckEntry.name() + ": Except stage: " + Arrays.toString(envCheckEntry.stage()) + " Current stage: " + stage); continue; } - ResultContainer executeResult = (ResultContainer) declaredMethod.invoke(this); - //plugin.getLogger().info("Result: "+executeResult.getResultMessage()); - if (executeResult.getResult().ordinal() > result.ordinal()) { //set bad result if it worse than latest one. - result = executeResult.getResult(); + if (!properties.containsKey("org.maxgamer.quickshop.util.envcheck.skip." + envCheckEntry.name().toUpperCase(Locale.ROOT).replace(" ", "_"))) { + executeResult = (ResultContainer) declaredMethod.invoke(this); + //plugin.getLogger().info("Result: "+executeResult.getResultMessage()); + if (executeResult.getResult().ordinal() > result.ordinal()) { //set bad result if its worse than the latest one. + result = executeResult.getResult(); + } + } else { + result = CheckResult.SKIPPED; } - switch (executeResult.getResult()) { + switch (result) { + case SKIPPED: + plugin.getLogger().info("[SKIP] " + envCheckEntry.name()); + Util.debugLog("Runtime check [" + envCheckEntry.name() + "] has been skipped (Startup Flag)."); + break; case PASSED: if (Util.isDevEdition() || Util.isDevMode()) { plugin.getLogger().info("[OK] " + envCheckEntry.name()); @@ -132,12 +143,16 @@ public class EnvironmentChecker { case DISABLE_PLUGIN: plugin.getLogger().warning("[FATAL] " + envCheckEntry.name() + ": " + executeResult.getResultMessage()); Util.debugLog("[Fatal-Disable] " + envCheckEntry.name() + ": " + executeResult.getResultMessage()); - skipAllTest = true; //We need disable plugin NOW! Some HUGE exception is here, hurry up! + skipAllTest = true; //We need to disable the plugin NOW! Some HUGE exception is happening here, hurry up! break; } - results.put(envCheckEntry, executeResult); + if (executeResult != null) { + results.put(envCheckEntry, executeResult); + } else { + results.put(envCheckEntry, new ResultContainer(CheckResult.SKIPPED, "Startup flag mark this check should be skipped.")); + } } catch (Exception e) { - plugin.getLogger().log(Level.WARNING, "Failed executing EnvCheckEntry [" + declaredMethod.getName() + "]: Exception thrown out without caught. Something going wrong!", e); + plugin.getLogger().log(Level.WARNING, "Failed to execute EnvCheckEntry [" + declaredMethod.getName() + "]: Exception thrown out without getting caught. Something went wrong!", e); plugin.getLogger().warning("[FAIL] " + declaredMethod.getName()); } } @@ -172,7 +187,7 @@ public class EnvironmentChecker { InputStream stream2 = loader.getResourceAsStream("META-INF/SELFSIGN.DSA"); InputStream stream3 = loader.getResourceAsStream("META-INF/SELFSIGN.SF")) { if (stream1 == null || stream2 == null || stream3 == null) { - plugin.getLogger().warning("The signature not exists in QuickShop jar. The jar has been modified or you're running custom build."); + plugin.getLogger().warning("The signature could not be found! The QuickShop jar has been modified or you're running a custom build."); return new ResultContainer(CheckResult.STOP_WORKING, "Security risk detected, QuickShop jar has been modified."); } } @@ -183,7 +198,7 @@ public class EnvironmentChecker { JarFile jarFile = new JarFile(jarPath); List modifiedEntry = tool.verify(jarFile); if (modifiedEntry.isEmpty()) { - return new ResultContainer(CheckResult.PASSED, "The jar is valid. No issues detected"); + return new ResultContainer(CheckResult.PASSED, "The jar is valid. No issues detected."); } else { modifiedEntry.forEach(jarEntry -> { plugin.getLogger().warning(">> Modified Class Detected <<"); @@ -191,13 +206,14 @@ public class EnvironmentChecker { plugin.getLogger().warning("CRC: " + jarEntry.getCrc()); plugin.getLogger().warning(JsonUtil.getGson().toJson(jarEntry)); }); - plugin.getLogger().severe("QuickShop detected the jar has been modified. This usually caused by the file downloaded damaged or virus infected. You should run virus scanning to prevent virus infected."); - plugin.getLogger().severe("To prevent serve server fail, QuickShop has been disabled."); + plugin.getLogger().severe("QuickShop detected that the jar has been modified! This is usually caused by the file being damaged or virus infected."); + plugin.getLogger().severe("To prevent severe server failure, QuickShop has been disabled."); + plugin.getLogger().severe("For further information, Please join our support Discord server: https://discord.com/invite/bfefw2E."); return new ResultContainer(CheckResult.STOP_WORKING, "Security risk detected, QuickShop jar has been modified."); } } catch (IOException ioException) { - plugin.getLogger().log(Level.WARNING, "ALERT: QuickShop cannot validate itself. This may caused by your have deleted QuickShop's jar while server running.", ioException); - return new ResultContainer(CheckResult.WARNING, "Failed to validate file digital signature, Security "); + plugin.getLogger().log(Level.WARNING, "ALERT: QuickShop cannot validate itself. This may be caused by you having deleted QuickShop's jar while the server is running.", ioException); + return new ResultContainer(CheckResult.WARNING, "Failed to validate digital signature! Security may be compromised!"); } //tool.verify() @@ -217,41 +233,35 @@ public class EnvironmentChecker { if (isOutdatedJvm()) { String jvmWarning = "\n" + "============================================================\n" + - " Warning! You're running an outdated version of Java\n" + + " Warning! You're running an outdated version of Java!\n" + "============================================================\n" + - "* QuickShop will stop being compatible in future!\n" + + "* QuickShop will stop being compatible with your current Java version in the future!\n" + "*\n" + - "* You should schedule an upgrade for Java on your server,\n" + - "* because we will drop support with any version Java that\n" + - "* lower Java 16.\n" + + "* You should schedule a Java upgrade on your server,\n" + + "* because we will drop support for any Java versions lower than Java 16.\n" + "*\n" + "* That means:\n" + - "* 1) The new version of QuickShop in future will stop working on your server.\n" + - "* 2) No more supporting for QuickShop that running\n" + - "* on an outdated Java builds.\n" + - "* 3) You will get performance improvements in the\n" + - "* new version of Java builds.\n" + + "* 1) Future QuickShop builds will no longer work on your server.\n" + + "* 2) No support for QuickShop builds that run on outdated Java versions will be given.\n" + "* \n" + "* Why:\n" + - "* 1) We didn't want to keep compatibility with legacy software\n" + - "* and systems. As Paper did it, we will follow the step.\n" + - "* 2) Newer Java builds support legacy plugin that built for 8 \n" + - "* or legacy, so the most plugins will still working.\n" + - "* 3) New Java API allows access resources and processing it\n" + - "* faster than before, and that means performance improvement.\n" + + "* 1) We don't want to keep compatibility with outdated software\n" + + "* and systems. As Paper upgraded, we did too.\n" + + "* 2) Java is downward compatible, so most legacy (Java 8+) Plugins should still work.\n" + + "* 3) Newer Java APIs allow accessing resources and processing them\n" + + "* faster than before, meaning a performance improvement.\n" + "* \n" + "* What should I do?\n" + - "* You should update your server Java builds as soon as you can.\n" + - "* Java 16 or any version after 16 is okay. \n" + + "* You should update your server's Java version\n" + + "* as soon as you can to Java 16 or higher.\n" + "*\n" + - "* Most plugins can run on Java 16+ without problems un-\n" + - "* less the code is really bad/hacky and you should uninstall it.\n" + + "* Most plugins can run on Java 16+ without problems\n" + + "* unless their code is really outdated.\n" + + "* If a Plugin is not compatible with Java 16 and the developer\n" + + "* doesn't update it, then you should replace them.\n" + "*\n" + - "* You can get Java at here:\n" + + "* You can get Java 16 here:\n" + "* https://www.oracle.com/java/technologies/javase-downloads.html\n" + - "* Attention: Mojang decide upgrading Java 16\n" + - "* So if you still use Java lower 16, you probably cannot start Minecraft server and client.\n" + - "*\n" + "*\n" + String.format("* Current Java version: %s", System.getProperty("java.version")); plugin.getLogger().warning(jvmWarning); @@ -276,7 +286,7 @@ public class EnvironmentChecker { } return success; } catch (Exception e) { - plugin.getLogger().log(Level.WARNING, "Failed to check Spigot API, the server " + plugin.getServer().getBukkitVersion() + " may not Spigot or Spigot's forks"); + plugin.getLogger().log(Level.WARNING, "Failed to check Spigot API!" + plugin.getServer().getBukkitVersion() + " may not be Spigot based."); return failed; } @@ -285,7 +295,7 @@ public class EnvironmentChecker { @EnvCheckEntry(name = "Old QuickShop Test", priority = 3) public ResultContainer oldQuickShopTest() { if (Util.isClassAvailable("org.maxgamer.quickshop.Util.NMS")) { - return new ResultContainer(CheckResult.STOP_WORKING, "FATAL: Old QuickShop is installed, You must remove old QuickShop jar from plugins folder!"); + return new ResultContainer(CheckResult.STOP_WORKING, "FATAL: Old QuickShop build is installed! You must remove old QuickShop jar from the plugins folder!"); } return new ResultContainer(CheckResult.PASSED, "No old QuickShop jar installled on this server"); } @@ -307,17 +317,19 @@ public class EnvironmentChecker { public ResultContainer moddedBasedTest() { boolean trigged = false; if (isForgeBasedServer()) { - plugin.getLogger().warning("WARN: QuickShop not designed and tested on Forge platform, you're running QuickShop modded server and use at your own risk."); - plugin.getLogger().warning("WARN: You won't get any support under Forge platform."); + plugin.getLogger().warning("WARN: QuickShop is not designed and tested for Forge!"); + plugin.getLogger().warning("WARN: Use at you own risk!."); + plugin.getLogger().warning("WARN: No support will be given!"); trigged = true; } if (isFabricBasedServer()) { - plugin.getLogger().warning("WARN: QSRR not designed and tested on Fabric platform, you're running QuickShop modded server and use at your own risk."); - plugin.getLogger().warning("WARN: You won't get any support under Fabric platform."); + plugin.getLogger().warning("WARN: QSRR is not designed and tested for Fabric!"); + plugin.getLogger().warning("WARN: Use at you own risk!."); + plugin.getLogger().warning("WARN: No support will be given!"); trigged = true; } if (trigged) { - return new ResultContainer(CheckResult.WARNING, "Modded server won't get any support."); + return new ResultContainer(CheckResult.WARNING, "No support will be given to modded servers."); } return new ResultContainer(CheckResult.PASSED, "Server is unmodified."); } @@ -343,7 +355,7 @@ public class EnvironmentChecker { } if (julySafe.getConfig().getBoolean("quickshop_bug_fix.enabled")) { julySafe.getConfig().set("quickshop_bug_fix.enabled", false); // Disables JulySafe's QuickShopBugFix module in configuration. - plugin.getLogger().warning("========================================");// Send chinese alert to users cause this plugin is Chinese plugins. + plugin.getLogger().warning("========================================");// Send chinese alert to users because this is a Chinese plugin. plugin.getLogger().warning("警告:检测到您已安装 JulySafe 插件,且已开启 QuickShop 偷东西bug修复模块"); plugin.getLogger().warning("警告:我们已确认不存在此 BUG 且此模块对正常 Gameplay 造成了严重影响且"); plugin.getLogger().warning("警告:实际上并不会真正做到修复的效果。并且存在潜在破坏 QuickShop 本身保护机制的行为。"); @@ -374,7 +386,7 @@ public class EnvironmentChecker { if (checkJulySafe()) { return new ResultContainer(CheckResult.WARNING, "JulySafe is installed and \"QuickShop *bugfix* \" module is enabled"); } - return new ResultContainer(CheckResult.PASSED, "JulySafe not installed or qs bug fix module is disabled."); + return new ResultContainer(CheckResult.PASSED, "JulySafe is not installed or qs bug fix module is disabled."); } @EnvCheckEntry(name = "CoreSupport Test", priority = 6) @@ -382,10 +394,10 @@ public class EnvironmentChecker { String nmsVersion = Util.getNMSVersion(); GameVersion gameVersion = GameVersion.get(nmsVersion); if (!gameVersion.isCoreSupports()) { - return new ResultContainer(CheckResult.STOP_WORKING, "Your Minecraft version is no-longer supported: " + ReflectFactory.getServerVersion() + " (" + nmsVersion + ")"); + return new ResultContainer(CheckResult.STOP_WORKING, "Your Minecraft version is no longer supported: " + ReflectFactory.getServerVersion() + " (" + nmsVersion + ")"); } if (gameVersion == GameVersion.UNKNOWN) { - return new ResultContainer(CheckResult.WARNING, "QuickShop may not fully support your current version " + nmsVersion + "/" + ReflectFactory.getServerVersion() + ", Some features may not working."); + return new ResultContainer(CheckResult.WARNING, "QuickShop may not fully support version " + nmsVersion + "/" + ReflectFactory.getServerVersion() + ", Some features may not work."); } return new ResultContainer(CheckResult.PASSED, "Passed checks"); } @@ -395,7 +407,7 @@ public class EnvironmentChecker { String nmsVersion = Util.getNMSVersion(); GameVersion gameVersion = GameVersion.get(nmsVersion); if (!gameVersion.isVirtualDisplaySupports()) { - return new ResultContainer(CheckResult.WARNING, "Virtual DisplayItem seems won't working on this Minecraft server, Make sure you have up-to-date QuickShop and server core jar."); + return new ResultContainer(CheckResult.WARNING, "Virtual DisplayItem seems to not work on this Minecraft server, Make sure your QuickShop and server builds are up to date."); } return new ResultContainer(CheckResult.PASSED, "Passed checks"); } @@ -405,15 +417,15 @@ public class EnvironmentChecker { String nmsVersion = Util.getNMSVersion(); GameVersion gameVersion = GameVersion.get(nmsVersion); if (!gameVersion.isPersistentStorageApiSupports()) { - return new ResultContainer(CheckResult.WARNING, "PersistentStorageApi seems won't working on this Minecraft server, You may hit exploit risk. Make sure you have up-to-date server at least higher than 1.13.2"); + return new ResultContainer(CheckResult.WARNING, "PersistentStorageApi seems to not work on this Minecraft server, You may be at risk for an exploit. Make sure your server is running at least 1.13.2."); } return new ResultContainer(CheckResult.PASSED, "Passed checks"); } - @EnvCheckEntry(name = "PacketListenerAPI conflict Test", priority = 9) + @EnvCheckEntry(name = "PacketListenerAPI Conflict Test", priority = 9) public ResultContainer plapiConflictTest() { if (plugin.isDisplay() && DisplayItem.getNowUsing() == DisplayType.VIRTUALITEM && Bukkit.getPluginManager().isPluginEnabled("ProtocolLib") && Bukkit.getPluginManager().isPluginEnabled("PacketListenerAPI")) { - return new ResultContainer(CheckResult.WARNING, "Virtual DisplayItem may stop working on your server. We already know plugin [PacketListenerAPI] conflict with plugin [ProtocolLib] (that we required to sending fake items). If you display not showing, please uninstall [PacketListenerAPI]. And it's fine to keep them if nothing wrong."); + return new ResultContainer(CheckResult.WARNING, "Virtual DisplayItem may stop working on your server. We are already aware that [PacketListenerAPI] and [ProtocolLib] are conficting. (QuickShops requirement to send fake items). If your display is not showing, please uninstall [PacketListenerAPI]."); } return new ResultContainer(CheckResult.PASSED, "Passed checks"); } diff --git a/src/main/java/org/maxgamer/quickshop/util/reporter/error/RollbarErrorReporter.java b/src/main/java/org/maxgamer/quickshop/util/reporter/error/RollbarErrorReporter.java index aa2127cf9..75a5c1d51 100644 --- a/src/main/java/org/maxgamer/quickshop/util/reporter/error/RollbarErrorReporter.java +++ b/src/main/java/org/maxgamer/quickshop/util/reporter/error/RollbarErrorReporter.java @@ -38,7 +38,6 @@ import org.maxgamer.quickshop.util.paste.Paste; import java.io.IOException; import java.net.ProtocolException; import java.util.*; -import java.util.concurrent.atomic.AtomicReference; import java.util.logging.Filter; import java.util.logging.Level; import java.util.logging.LogRecord; @@ -128,31 +127,32 @@ public class RollbarErrorReporter { return dataMapping; } - private UUID sendError0(@NotNull Throwable throwable, @NotNull String... context) { + private void sendError0(@NotNull Throwable throwable, @NotNull String... context) { try { if (plugin.getBootError() != null) { - return null; // Don't report any errors if boot failed. + return; // Don't report any errors if boot failed. } if (tempDisable) { this.tempDisable = false; - return null; + return; } if (disable) { - return null; + return; } if (!enabled) { - return null; - } - - if (!checkWasCauseByQS(throwable)) { - return null; + return; } if (!canReport(throwable)) { - return null; + return; } if (ignoredException.contains(throwable.getClass())) { - return null; + return; + } + if (throwable.getCause() != null) { + if (ignoredException.contains(throwable.getCause())) { + return; + } } if (lastPaste == null) { String pasteURL; @@ -171,21 +171,23 @@ public class RollbarErrorReporter { plugin .getLogger() .warning( - "A exception was thrown, QuickShop already caught this exception and reported it, switch to debug mode to see the full errors."); + "A exception was thrown, QuickShop already caught this exception and reported it. This error will only shown once before next restart."); plugin.getLogger().warning("====QuickShop Error Report BEGIN==="); plugin.getLogger().warning("Description: " + throwable.getMessage()); plugin.getLogger().warning("Server ID: " + plugin.getServerUniqueID()); + plugin.getLogger().warning("Exception : "); + ignoreThrows(); + throwable.printStackTrace(); + resetIgnores(); plugin.getLogger().warning("====QuickShop Error Report E N D==="); Util.debugLog(throwable.getMessage()); Arrays.stream(throwable.getStackTrace()).forEach(a -> Util.debugLog(a.getClassName() + "." + a.getMethodName() + ":" + a.getLineNumber())); if (Util.isDevMode()) { throwable.printStackTrace(); } - return null; } catch (Exception th) { ignoreThrow(); plugin.getLogger().log(Level.WARNING, "Something going wrong when automatic report errors, please submit this error on Issue Tracker", th); - return null; } } @@ -194,16 +196,13 @@ public class RollbarErrorReporter { * * @param throwable Throws * @param context BreadCrumb - * @return Event Uniqud ID */ - public @Nullable UUID sendError(@NotNull Throwable throwable, @NotNull String... context) { - AtomicReference uuid = new AtomicReference<>(); + public void sendError(@NotNull Throwable throwable, @NotNull String... context) { if (Bukkit.isPrimaryThread()) { - Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> uuid.set(sendError0(throwable, context))); + Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> sendError0(throwable, context)); //ignore async response - return null; } else { - return sendError0(throwable, context); + sendError0(throwable, context); } } @@ -227,7 +226,9 @@ public class RollbarErrorReporter { // version. return false; } - if (!checkWasCauseByQS(throwable)) { + + PossiblyLevel possiblyLevel = checkWasCauseByQS(throwable); + if (possiblyLevel == PossiblyLevel.IMPOSSIBLE) { return false; } if (throwable.getMessage().startsWith("#")) { @@ -239,6 +240,12 @@ public class RollbarErrorReporter { } else { stackTraceElement = throwable.getStackTrace()[2]; } + if (stackTraceElement.getClassName().contains("org.maxgamer.quickshop.util.reporter.error")) { + ignoreThrows(); + plugin.getLogger().log(Level.WARNING, "Uncaught exception in ErrorRollbar", throwable); + resetIgnores(); + return false; + } String text = stackTraceElement.getClassName() + "#" @@ -259,32 +266,38 @@ public class RollbarErrorReporter { * @param throwable Throws * @return Cause or not */ - public boolean checkWasCauseByQS(@Nullable Throwable throwable) { + public PossiblyLevel checkWasCauseByQS(@Nullable Throwable throwable) { if (throwable == null) { - return false; + return PossiblyLevel.IMPOSSIBLE; } if (throwable.getMessage() == null) { - return false; + return PossiblyLevel.IMPOSSIBLE; } if (throwable.getMessage().contains("Could not pass event")) { - return throwable.getMessage().contains("QuickShop"); + if (throwable.getMessage().contains("QuickShop")) { + return PossiblyLevel.CONFIRM; + } else { + return PossiblyLevel.IMPOSSIBLE; + } } while (throwable.getCause() != null) { throwable = throwable.getCause(); } - long element = - Arrays.stream(throwable.getStackTrace()) - .limit(5) - .filter( - stackTraceElement -> - stackTraceElement.getClassName().contains("org.maxgamer.quickshop")) - .count(); - if (element > 0) { - return true; + + if (throwable.getStackTrace()[0].getClassName().contains("org.maxgamer.quickshop")) { + return PossiblyLevel.CONFIRM; + } + long errorCount = Arrays.stream(throwable.getStackTrace()) + .limit(3) + .filter(stackTraceElement -> stackTraceElement.getClassName().contains("org.maxgamer.quickshop")) + .count(); + + if (errorCount > 0) { + return PossiblyLevel.MAYBE; } else if (throwable.getCause() != null) { return checkWasCauseByQS(throwable.getCause()); } - return false; + return PossiblyLevel.IMPOSSIBLE; } /** @@ -322,6 +335,12 @@ public class RollbarErrorReporter { return buffer.toString(); } + enum PossiblyLevel { + CONFIRM, + MAYBE, + IMPOSSIBLE + } + class GlobalExceptionFilter implements Filter { @Nullable @@ -358,7 +377,15 @@ public class RollbarErrorReporter { sendError(record.getThrown(), record.getMessage()); return defaultValue(record); } else { - return sendError(record.getThrown(), record.getMessage()) == null; + sendError(record.getThrown(), record.getMessage()); + PossiblyLevel possiblyLevel = checkWasCauseByQS(record.getThrown()); + if (possiblyLevel == PossiblyLevel.IMPOSSIBLE) + return true; + if (possiblyLevel == PossiblyLevel.MAYBE) { + plugin.getLogger().warning("This seems not a QuickShop but we still sent this error to QuickShop developers. If you have any question, you should ask QuickShop developer."); + return true; + } + return false; } } @@ -399,7 +426,15 @@ public class RollbarErrorReporter { sendError(record.getThrown(), record.getMessage()); return defaultValue(record); } else { - return sendError(record.getThrown(), record.getMessage()) == null; + sendError(record.getThrown(), record.getMessage()); + PossiblyLevel possiblyLevel = checkWasCauseByQS(record.getThrown()); + if (possiblyLevel == PossiblyLevel.IMPOSSIBLE) + return true; + if (possiblyLevel == PossiblyLevel.MAYBE) { + plugin.getLogger().warning("This seems not a QuickShop but we still sent this error to QuickShop developers. If you have any question, you should ask QuickShop developer."); + return true; + } + return false; } } diff --git a/src/main/java/org/maxgamer/quickshop/watcher/CalendarWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/CalendarWatcher.java index 52023494e..52f56bcbb 100644 --- a/src/main/java/org/maxgamer/quickshop/watcher/CalendarWatcher.java +++ b/src/main/java/org/maxgamer/quickshop/watcher/CalendarWatcher.java @@ -23,6 +23,7 @@ import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.scheduler.BukkitRunnable; +import org.bukkit.scheduler.BukkitTask; import org.maxgamer.quickshop.QuickShop; import org.maxgamer.quickshop.event.CalendarEvent; import org.maxgamer.quickshop.util.Util; @@ -38,6 +39,7 @@ public class CalendarWatcher extends BukkitRunnable { @Getter private final YamlConfiguration configuration; private final QuickShop plugin; + private BukkitTask task; public CalendarWatcher(QuickShop plugin) { this.plugin = plugin; @@ -53,13 +55,15 @@ public class CalendarWatcher extends BukkitRunnable { } public void start() { - this.runTaskTimerAsynchronously(plugin, 20, 20); + task = this.runTaskTimerAsynchronously(plugin, 20, 20); } public void stop() { save(); try { - this.cancel(); + if (task != null && !task.isCancelled()) { + task.cancel(); + } } catch (IllegalStateException ignored) { } } diff --git a/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java index fee2d9392..fbae78748 100644 --- a/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java +++ b/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java @@ -24,9 +24,7 @@ import lombok.SneakyThrows; import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream; import org.apache.commons.compress.compressors.gzip.GzipParameters; import org.bukkit.scheduler.BukkitRunnable; -import org.jetbrains.annotations.NotNull; import org.maxgamer.quickshop.QuickShop; -import org.maxgamer.quickshop.util.Util; import java.io.*; import java.nio.file.Files; @@ -35,6 +33,7 @@ import java.time.Instant; import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; +import java.util.Iterator; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.logging.Level; @@ -43,12 +42,12 @@ public class LogWatcher extends BukkitRunnable implements AutoCloseable { private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS").withZone(ZoneId.systemDefault()); private static final DateTimeFormatter logFileFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()); private final Queue logs = new ConcurrentLinkedQueue<>(); - private FileWriter logFileWriter = null; - private PrintWriter pw; + private PrintWriter printWriter = null; public LogWatcher(QuickShop plugin, File log) { try { + boolean deleteFailed = false; if (!log.exists()) { //noinspection ResultOfMethodCallIgnored log.createNewFile(); @@ -69,15 +68,25 @@ public class LogWatcher extends BukkitRunnable implements AutoCloseable { try (GzipCompressorOutputStream archiveOutputStream = new GzipCompressorOutputStream(new BufferedOutputStream(new FileOutputStream(targetPath.toFile())), gzipParameters)) { Files.copy(log.toPath(), archiveOutputStream); archiveOutputStream.finish(); - //noinspection ResultOfMethodCallIgnored - log.delete(); - //noinspection ResultOfMethodCallIgnored - log.createNewFile(); + if (log.delete()) { + //noinspection ResultOfMethodCallIgnored + log.createNewFile(); + deleteFailed = false; + } else { + deleteFailed = true; + } } } } - logFileWriter = new FileWriter(log, true); - pw = new PrintWriter(logFileWriter); + FileWriter logFileWriter; + if (deleteFailed) { + //If could not delete, just override it + logFileWriter = new FileWriter(log, false); + } else { + //Otherwise append + logFileWriter = new FileWriter(log, true); + } + printWriter = new PrintWriter(logFileWriter); } catch (FileNotFoundException e) { plugin.getLogger().log(Level.SEVERE, "Log file was not found!", e); } catch (IOException e) { @@ -87,42 +96,29 @@ public class LogWatcher extends BukkitRunnable implements AutoCloseable { @SneakyThrows public void close() { - if (logFileWriter != null) { - logFileWriter.flush(); - logFileWriter.close(); + if (printWriter != null) { + printWriter.flush(); + printWriter.close(); } } public void log(@NonNull String log) { - this.add("[" + dateTimeFormatter.format(Instant.now()) + "] " + log); - } - - public void add(@NotNull String s) { - logs.add(s); + logs.add("[" + dateTimeFormatter.format(Instant.now()) + "] " + log); } @Override public void run() { - for (String log : logs) { - if (logFileWriter == null) { - continue; - } - if (pw == null) { - continue; - } - pw.println(log); + if (printWriter == null) { + //Waiting for init + return; } - logs.clear(); - if (logFileWriter != null) { - try { - if (pw != null) { - pw.flush(); - } - logFileWriter.flush(); - } catch (IOException ioe) { - Util.debugLog("Failed to flush log to disk: " + ioe.getMessage()); - } + Iterator iterator = logs.iterator(); + while (iterator.hasNext()) { + String log = iterator.next(); + printWriter.println(log); + iterator.remove(); } + printWriter.flush(); } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 4ad30cf18..9102a37b7 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,32 +1,32 @@ -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -#This is example config, don't direct modify this file, all changes will revert when you reload the plugin. -# READ ABOVE READ ABOVE READ ABOVE READ ABOVE READ ABOVE READ ABOVE READ ABOVE READ ABOVE READ ABOVE READ ABOVE -# IF YOU WANT EDIT CONFIGURATION, THE FILE "config.yml" IS THE CORRECT FILE +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#This is an example config, don't directly modify this file, all changes will revert when you reload the plugin. +#READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE | READ ABOVE +# TO EDIT QUICKSHOP'S CONFIGURATION, USE THE "config.yml" FILE! -#Do not touch if you not clear know about this -config-version: 129 +#Do not touch this if you don't know what you're doing! +config-version: 130 #Select the language you want to use, (e.g de), use only supported language codes from the list below. -#If you use a not exist/not support language, plugin will move to use en_US to keep everything working. -#After you set the new language, you need to delete `messages.yml` to let plugin regen it with your desired language file. +#If you use a not existant/not supported language, then QuickShop will use en_US. +#After you have selected your language, you need to delete the `messages.yml` file and reload the plugin to apply the new language. #Available languages: #af-ZA @@ -61,45 +61,47 @@ config-version: 129 language: en-US -#After you setup this, quickshop will download items/blocks/enchs and potions translation from MOJANGAPI -#You can find supported language in your Minecraft Client Languages menu, fill this with the language Code. -#E.g [English (en-US)] The Language Code is en-US +#After you have setup a language, QuickShop will download all the required Game language files from Mojang. +#You can find all supported languages in your Minecraft Client Languages Menu. +#Enter the language Code here (e.g English (en-US) -> Language Code = en-US). game-language: default -#This enables developer mode, Do not touch this if you not know what it does +#This enables the developer mode, do not touch this if you don't not know what it does! dev-mode: false -#Tax amount (decimal) - Eg, P1 buys $50 worth of stuff from P2. Therefore, P1 loses $50, P2 gains $(1-0.05)*50, and tax-account gains $(0.05)*50. +#Tax amount (decimal) +#Example: P1 buys $50 worth of stuff from P2. Therefore, P1 loses $50, P2 gains $(1-0.05)*50, and the tax-account gains $(0.05)*50. tax: 0.05 -#The fake player where money from taxing people goes to -#set it to "" to safely disable it (taxing will still work but not deposit to any account) +#The fake player where the tax money goes to. +#Set this to "" to disable it (Taxing will still work but not deposit to any account) tax-account: tax #Whether to show taxes paid when selling to a shop show-tax: false -#Whether to respect item flag (e.g. hide the enchantment info when item have HIDE_ENCHANTS flag) +#Whether to respect item flags (e.g. hide the enchantment info when item have HIDE_ENCHANTS flag). respect-item-flag: true -#The currency used for creating shop -#Leave blank to use default currency -#Only require to setup of using multi-currency plugin +#The currency used to create shops. +#Set this to "" to use default currency. +#Only required if you use multiple currencies. #B E T A currency: "" logging: #Enable logging? + #The log file is located at "plugins\QuickShop\qs.log". enable: true - #Should we log shop trade/creations to Plugins\QuickShop\qs.log? + #Should QuickShop log shop trading/creations? log-actions: true - #Should we log balance before and after in shop trade to Plugins\QuickShop\qs.log? + #Should QuickShop log balance before and after when trading? log-balance: true - #The target size to split large files (MB) to Plugins\QuickShop\logs folder + #The target size (in MB) to split log files to the "plugins\QuickShop\logs" folder. file-size: 10.0 -#Some eco plugins will caching player balance, sometime will cause insufficient balance -#This workaround using getBalance to refresh it, but is time-costing -#So turn on this ONLY when you have this problem +#Some economy plugins cache player balances, this sometimes causes insufficient balance when trying to use a shop +#This workaround uses getBalance to refresh it, but its time costing. +#So ONLY turn this on when you have this problem! trying-fix-banlance-insuffient: false #For item-item based economies that don't use virtual coins. @@ -108,240 +110,270 @@ whole-number-prices-only: false #Force bukkit chat handler (https://github.com/KaiKikuchi/QuickShop/issues/10) force-bukkit-chat-handler: false -#Disallow QuickShop-Reremake to send metrics data to bStats. +#Disallow QuickShop to send metrics data to bStats (https://bstats.org/plugin/bukkit/QuickShop-Reremake/3320). +#Please let the metrics enabled, it helps the author :). disabled-metrics: false #Should QS be allowed to check for updates on SpigotMC.org? updater: true -#Should QS be allowed to auto report errors to the author? -#It will also create a paste for data-recovery or debug when server boot up +#Should QS be allowed to automatically report errors to the author? +#It will also create a paste for data-recovery or debug when the server boots up. auto-report-errors: true #Should QS use OfflinePlayer list for TabComplete? -#This might give players a better experience, but may cause lag due to searching what can be a long list. -#false = Only use the OnlinePlayer list, true = A list of all players that have ever joined your server before. +#This might improve player experience, but may cause lag due to searching what can be a long list. +#false = Only use the OnlinePlayer list. +#true = A list of all players that have ever joined your server. include-offlineplayer-list: false -#What economy provider you want let QuickShop use? +#What economy provider should QuickShop use? #0=Vault #3=GemsEconomy with Multi-Currency on #4=TNE with Multi-Currency on -#DO NOT TOUCH THIS IF YOU DIDN'T KNOW WHAT WILL HAPPEN. ASK FOR SUPPORT BEFORE TOUCH THIS! -#DO NOT TOUCH THIS IF YOU DIDN'T KNOW WHAT WILL HAPPEN. ASK FOR SUPPORT BEFORE TOUCH THIS! -#DO NOT TOUCH THIS IF YOU DIDN'T KNOW WHAT WILL HAPPEN. ASK FOR SUPPORT BEFORE TOUCH THIS! +#DO NOT TOUCH THIS IF YOU DON'T KNOW WHAT IT DOES. ASK FOR SUPPORT BEFORE TOUCHING THIS! +#DO NOT TOUCH THIS IF YOU DON'T KNOW WHAT IT DOES. ASK FOR SUPPORT BEFORE TOUCHING THIS! +#DO NOT TOUCH THIS IF YOU DON'T KNOW WHAT IT DOES. ASK FOR SUPPORT BEFORE TOUCHING THIS! economy-type: 0 -#The decimal format the double output, includes player money output -#Default is #,###.## -# whether to use decimal format output. +#Whether to use decimal format to display money. use-decimal-format: false +#The decimal format to display money in. +#The default is #,###.## decimal-format: "#,###.##" -#Allow plugin send alert when something trying make a displayItem exploit +#Allow QuickShop to send alerts when someone tries to make a displayItem exploit. send-display-item-protection-alert: false -#Allow plugin send alert when something trying steal shop +#Allow QuickShop to send alerts when someone tries to steal from a shop. send-shop-protection-alert: false #Still WIP server-platform: 0 -#Use caching for shop finding to optimize performance if possible +#Use caching to find shops to optimize performance if possible. use-caching: true -#Control which one chat system QuickShop should to use. -#0=BungeeChat (Spigot Defaults) +#Select which chat system QuickShop should use. +#0=BungeeChat (Spigot default) #1=Adventure (Removed In Current Version) chat-type: 0 #MySQL database settings. database: - # false = use local SQLite database, true = use local/remote MySQL database. + #false = use local SQLite database. + #true = use local/remote MySQL database. mysql: false host: localhost port: 3306 database: quickshop user: root password: passwd - # Set prefix to "none" to remove prefix + #Set prefix to "none" to remove prefix prefix: none usessl: false #Whether to use async queue? queue: true - #How long between each commit when using queue? (seconds) + #How long should the interval between each commit be when using queue (in seconds)? queue-commit-interval: 2 - # Auto set table encoding to utf8mb4 (beta) + #Auto set table encoding to utf8mb4 (beta) auto-fix-encoding-issue-in-database: false -#Limits the number of shops a person can create and own at a single time. +#Limits the number of shops a person can create and own at a time. limits: - #Disable these if you're not using them! If this is false, the rest of this section is ignored + #Disable these if you're not using them! If this is false, the rest of this section gets ignored. use: false - #The default number of shops players can make + #The default number of shops a players can make. default: 10 - #Use old algorithm to calc unlimited shops into limits. + #Use old algorithm to calculate unlimited shops into limits. old-algorithm: false - #Players with these permissions can create these amounts of shops. + #Here you can setup shop amount limits with permissions. + #You can create as many as you like! ranks: - #Anyone with 'quickshop.vip' permissions, can create 20 shops instead of 10. quickshop: - vip: 20 #Players with quickshop.vip can make 20 shops. + example: 20 #Players with the quickshop.example permission can create 20 shops. -#A list of block (materials) which can be used to create shops. +#The list of blocks that can be used to create shops. #By default, chests are added to this list. -#This will only work for blocks which implement InventoryHolder -#in other words, no enderchest shops, no shops on dirt blocks, etc. -#May cause unexpected behavior with some blocks... Eg don't make a -#shop on a hopper (It sucks the display item in) and furnace shops -#allow players to put whatever item they want in all 3 slots and -#dispenser shops aren't protected from redstone... Etc. +#This will only work for blocks that implement an InventoryHolder! +#In other words, You cannot create shops with normal blocks like dirt or stone. +#Enderchests can only be used as shop blocks when the "openinv" plugin is installed! +#May cause unexpected behavior with some blocks...eg: +#-Hopper shops suck the display item in, +#-Furnace shops allow players whatever item they want in all 3 slots, +#-Dispenser shops aren't protected from redstone, +#-Etc... shop-blocks: - CHEST - TRAPPED_CHEST - ENDER_CHEST + shop: - #Cost to make a shop + #The cost to make a shop. cost: 10 - #Should we refund the player when their shops are deleted/removed/broken? + #Should QS refund the player when their shops are deleted/removed/broken? refund: false - #Should we send stock message to staffs? + #Should QS send stock messages to staffs? sending-stock-message-to-staffs: false - #Should we disable trading for creative mode? + #Should QS disable trading in creative mode? disable-creative-mode-trading: false - #Should we disable super tool?(It's a tool which allow you break shop in creative mode by gold axe) + #Should QS disable the super tool? + #The Super Tool is a Golden Axe that allows creative mode players to break shops. disable-super-tool: false - #Should we allow the owner of shop break the sign (for sign replacement, but may cause sign dupe when auto-sign is true)? + #Should QS allow the owner of a shop to break the sign to let players replace the sign? + #This may cause a sign dupe when auto-sign is true! allow-owner-break-shop-sign: false - #Is there a fee for changing prices on a shop (Help deter endless undercutting) + #Should there be a fee for changing shop prices? + #This can help with endless price undercutting. price-change-requires-fee: true - #If price changes require a fee, how much is the fee + #The amount of this fee. fee-for-price-change: 50 - #Should we try and lock their shops from other players, so people can't steal from them? + #Should QS try to lock shops for other players? + #This prevents players from stealing from them. lock: true - #Should we disable the quick way of creating shop? (click a chest with item) + #Should QS disable the quick creation of shop? + #To quickly create a shop click a chest with an Item. disable-quick-create: false - #Interact options + #Interaction settings. interact: - #Interact mode - #0=Only mode, Only can interact with sneak or normal interact - #1=Both mode, interact with sneak (if enabled) and normal interact will do - #2=Reversed mode, disable interact with sneak if you enable blow option + #Interaction mode + #0=Only interaction with sneak OR normal. + #1=Interaction with sneak (if enabled) AND normal. + #2=Disables interaction with sneak. interact-mode: 0 sneak-to-create: false sneak-to-trade: false sneak-to-control: false - #Swap left and right click behavior + #Swap left and right click behavior. swap-click-behavior: false #Should we automatically create the sign for the chest? auto-sign: true - #Should we pay/take money to/from unlimited shops owner? + #Should we pay/take money to/from unlimited shops owners? pay-unlimited-shop-owners: false - #Should we place display items on the chests? This may cause duped items, especially for modded servers. + #Should we place display items on the chests? + #This may cause duped items, especially for modded servers! display-items: true - #The plugin will check if the display item is in a valid position every specified amount of ticks. 0 to disable. + #QuickShop will check if the display item is in a valid position every specified amount of ticks. + #Set to 0 to disable it. display-items-check-ticks: 6000 #The display type you want use. - #0=Normal Dropped Item, 1=ArmorStand, 2=Virtual Item(ProtocolLib needed, fallback to normal dropped item if ProtocoLib not installed) + #0=Normal Dropped Item + #1=ArmorStand + #2=Virtual Item (Requires ProtocolLib, fallback to type 0 if ProtocolLib is not installed) display-type: 2 - #Allow quickshop auto despawn-spawn the display when no-player or player close the shop. + #Should QS use global virtual item queue? + #Virtual item displays need to send fake packets, + #which will create a task for each shop. + #Having too many of those tasks can impact performance. + #Turn this ONLY on when you think that the amount of tasks from the virtual item displays causes lag! + use-global-virtual-item-queue: false + + #Allow QuickShop to automatically despawn displays when no players are in range of the shop. display-auto-despawn: false - #When range region no players, the display will despawn. + #The range at which displays will despawn. display-despawn-range: 20 - #How long ticks we should check the shops once to decide despawn/spawn display? + #The interval (in ticks) at which QS checks the shops range to despawn/spawn displays. display-check-time: 40 - #Allow display show stacks effect when stack creation turned on + #Allow displays to show stack effects when stack creation is turned on. display-allow-stacks: false - #Use enhance display protect + #Use enhanced display protection. enchance-display-protect: false - #Use enhance shop protect + #Use enhanced shop protection. enchance-shop-protect: false - #/qs find command options - #This command lets users shop quickly without wasting time searching + #/qs find command settings. + #This command lets users shop quickly without wasting time searching. finding: - #Should we use the old logic? (looking for closet shop and let player look at it) + #Should QS use the old logic? (looking for closest shop and let players look at it) oldLogic: false - #How far should we search in blocks? + #How far should QS search? (in blocks) distance: 45 #How many nearby shop should be displayed? limit: 10 - #Including non-loaded shops? + #Should non-loaded shops be incuded in the search? all: true - #Check out-of-stock/space shop, may hurt the performance + #Should QS exclude out-of-stock/space shops? + #This may improve performance. exclude-out-of-stock: false - #If vault doesn't return a coins symbol, QuickShop will use this symbol to replace it. + #If vault doesn't return a currency symbol, QuickShop will use this symbol. alternate-currency-symbol: '$' - #This symbol setting for multi-currency supports - #If no any hit in this list, will fallback to the name of currency it self + #This setting is for multi-currency setups. + #If nothing matches in this list, it falls back to the name of currency itself. alternate-currency-symbol-list: - CNY;¥ - USD;$ - #It should fix Vault or an economy plugin that is not correctly processing the price and returns a "0" result problem. - #If you turn on this option, plugin will force use "alternate-currency-symbol" option. + #This should fix Vault or an economy plugin incorrectly processing the price and returning a "0" result. + #If you enable this setting, then QS will force use the "alternate-currency-symbol". disable-vault-format: false - #If show currency symbol on the right side - #By default, is on the left side - #Only work when disable-vault-format is true + #If the currency symbol should be displayed on the right side (eg 1234$). + #By default, it is on the left side (eg $1234). + #Only works when disable-vault-format is true. currency-symbol-on-right: false - #Ignore trade messages if the shop is unlimited + #Ignore trade messages if the shop is unlimited. ignore-unlimited-shop-messages: false - #Allow auto fetching player shops, if you disable this, players need to use /qs fetchmessage to fetch the shops history messages. (Disabling it may cause database issues.) + #Allow auto fetching of player shops. + #If you disable this, then the players need to use "/qs fetchmessage" to fetch the shops history messages. + #Disabling it may cause database issues! auto-fetch-shop-messages: true - #Ignore cancel chat event, can improve compatibility with other chat plugin in some cases. + #Ignore cancelled chat event, can sometimes improve compatibility with some chat plugins. ignore-cancel-chat-event: false - #Allow shops to be created in a place where a sign cannot placed - #(e.g There is blocks on all sides of the shop / The player doesn't have permission to put down a sign at that location) + #Allow shops to be created in places where a sign cannot be placed? + #(e.g There are blocks on all sides of the shop / The player doesn't have permission to put down a sign at that location) allow-shop-without-space-for-sign: false - #The minimum price for shop, This will not affect existing shops, default is 0.01. + #The minimum price for a shop. + #The default is 0.01 + #This will not affect existing shops! minimum-price: 0.01 - #The maximum price for shop, This will not affect existing shops, set it to -1 to disable it. + #The maximum price for a shop. + #Set this to -1 to disable it. (Unlimited maximum shop price) + #This will not affect existing shops! maximum-price: -1 - #Setting per item price restriction + #Per item price restrictions. #Format: ;; #e.g: - #price-restriction: # - DIAMOND;100;200 price-restriction: [] - #The number of digits after decimal, set it to -1 to disable it + #The maximum number of digits after the decimal. + #Set this to -1 to disable it. (Unlimited maximum digits) maximum-digits-in-price: -1 - #if shop is adminshop, and player has permission to change shop owner, Whether in controll panel, print the owner's uuid? + #If a player that has quickshop.setowner permission changes the owner of an adminshop, + #should the owner's uuid get printed in the control panel? show-owner-uuid-in-controlpanel-if-op: false #The wall sign material. - #In 1.13 and legacy versions, only WALL_SIGN is available. + #For 1.13.2, only WALL_SIGN is available. # #For 1.14, you can use these: #ACACIA_WALL_SIGN @@ -353,313 +385,330 @@ shop: sign-material: OAK_WALL_SIGN #If this is enabled, the enchantment name will be shown - #in the sign instead of 'Enchanted Book' - # - #NOTE: Only one ecnhantment is shown - # This may be chosen arbitrarily + #in the sign instead of "Enchanted Book". + #NOTE: Only one enchantment is shown and is randomly chosen. use-enchantment-for-enchanted-book: false - #The worlds name for you didn't want create new shop. + #The list of worlds in which creating new shops is disabled. blacklist-world: - disabled_world_name - #The lores keyword on you didn't want allow sell item. - #Won't effect already created shops. + #The list of lore keywords that are blocked from being sold. + #This will not affect existing shops! blacklist-lores: - "SoulBound" #Protection check - #Note: This will send a FAKE BlockBreakEvent to check if you can break block - #It may conflict with some protection or game plugin, if you don't want this, please disable and using integration below instead + #This will send a FAKE BlockBreakEvent to check if you can break a block. + #This may conflict with some protection plugins! + #If you don't want this, then please disable it and use the integration below instead. protection-checking: true - #Disallow executing protection checking in worlds. + #The list of worlds in which protection checking is disabled. protection-checking-blacklist: - disabled_world - #Choose which one handler should we use for protection checking + #Choose which handler QS should use for protection checking. #0=Bukkit defaults - #1=QuickShop (May have compatibility issue) but allow you use protection-checking-listener-blacklist + #1=QuickShop (May have compatibility issues but allows you to use protection-checking-listener-blacklist) protection-checking-handler: 0 - #The listener list to skipped when do protection-checking - #Required protection-checking-handler set to 1 - # Examples: - # xx.xxx.xxx.xxxxx.BlockBreakListenerClass <- This will skip calling to xx.xxx.xxx.xxxxx.BlockBreakListenerClass (have better performance cause this way not string based but others is) - # xx.xx.xxx.xxxxx <- This will skip calling all class start with xx.xx.xxx.xxxxx - # @PluginName <- This will skip calling all listener registered by this plugin - # REGEX <- It also supports regex. + #The listener list to skip when protection-checking. + #Requires "protection-checking-handler" set to 1. + #Examples: + #- xx.xxx.xxx.xxxxx.BlockBreakListenerClass + # This will skip calling the xx.xxx.xxx.xxxxx.BlockBreakListenerClass. + # This can improve performance because its not string based. + # + #- xx.xx.xxx.xxxxx + # This will skip calling all classes that start with xx.xx.xxx.xxxxx. + # + #- @PluginName + # This will skip calling all listeners registered by this plugin. + # + #- REGEX + # It also supports regex. protection-checking-listener-blacklist: - ignored_listener - #How many shops can be checked in once? (Container exists check) + #How many shops should at max be checked at once for existance? max-shops-checks-in-once: 100 #Add display name to the spawned DisplayItem entity? display-item-use-name: false - #Update the signs when Hopper or somethings trigged InventoryMoveItemEvent. - #Disable it if you feel it damage your server performance. + #Update the signs when something (eg Hoppers) triggers InventoryMoveItemEvent? + #Disable this if you think that it impacts your server performance. update-sign-when-inventory-moving: false - #Allow player loan (Require economy plugin support) + #Allow player loans? (Requires an economy plugin with support) allow-economy-loan: false - #The word to trade all items in player inventory + #The word to trade all items in player inventory. word-for-trade-all-items: "all" - #Allow player to create 0$ shop. - #THIS MAY BROKEN SOMETHING + #Allow players to create 0$ (free) shops? + #THIS MAY BREAK SOMETHING! allow-free-shop: false - #Use fast algorithm for ShopManager#getShopIncludeAttached, it should improve HUGE performance on it. + #Use fast algorithm for ShopManager#getShopIncludeAttached, + #This should drastically improve performance. use-fast-shop-search-algorithm: true - #The shop ongoing fee, if a shop's owner had no enough money, shop will auto-remove. + #The shop ongoing fee. + #If the shop owner doesn't have enough money, the shop will automatically be removed. ongoing-fee: enable: false - #How often we will take the ongoing-fee from the players? + #How often should the ongoing fee be due for payment? ticks: 42000 - #How many money we take from the shop's owner every times? + #How much should the ongoing fee be? cost-per-shop: 2 - #Should we ignore the unlimited shop? + #Should we ignore unlimited shops? ignore-unlimited: true - #Allow QuickShop use hack util to force load shops from higher Minecraft. - #WARNING: It may destory your server data and QuickShop shops, backup before enable it! + #Allow QuickShop to use a hack util to force-load shops from higher Minecraft versions. + #WARNING: This may destroy your server data and QuickShop shops, backup before enabling it! force-load-downgrade-items: enable: false #WorkMode - #0=Call Bukkit try update the ItemStack - #1=Call Bukkit direct load the ItemStack + #0=Call Bukkit to try to update the ItemStack + #1=Call Bukkit to directly load the ItemStack method: 0 - #If a block/entity trigged protection, quickshop should break/kill it? + #If a block/entity has trigged the protection, should QuickShop break/kill it? remove-protection-trigger: true - #Allow quickshop selling/buying multi items in once transaction. + #Allow QuickShop to sell/buy multiple items in one transaction? allow-stacks: false - #This option to control QuickShop ignore the item custom display name. + #This setting controls if QuickShop should ignore the item's custom display name. force-use-item-original-name: false -#List of items that can't be sold in shops. Anyone with quickshop.bypass. can bypass it +#List of items that can't be sold in shops. +#Anyone with the quickshop.bypass. permission can bypass it. blacklist: - Bedrock lockette: - #Fix Quickshop not canceling a break lock sign event (Making it impossible to break a locked chest)\ + #Fix Quickshop not canceling a break lock sign event (Making it impossible to break a locked chest). enable: true private: "[Private]" more_users: "[More Users]" -# Enable or disable plugin support. +#Enable or disable plugin support. plugin: - #If you have Multiverse-Core, QSRR will try load world when shop's world don't exist and will throw an exception and auto repair the shops. + #If you have Multiverse-Core, QuickShop will try to load worlds when the shop's world doesn't exist. + #This will throw an exception and automatically repair the shops. Multiverse-Core: true - #If you have OpenInv, QSRR will enable EnderChest feature. + #If you have OpenInv, QuickShop will enable the EnderChest feature for shop-blocks. OpenInv: true - #If you have PlaceHolderAPI, QuickShop will use PlaceHolderAPI to process all messages. + #If you have PlaceHolderAPI, QuickShop will use it to process all messages. PlaceHolderAPI: true - #If you have LWC/LWCX,QSRR will check access + #If you have LWC/LWCX, QuickShop will check access. LWC: true - #If you have BKCommonLib, QSRR will load fast utils to improve performance + #If you have BKCommonLib, QuickShop will load fast utils to improve performance. BKCommonLib: true - #Should QuickShop support for plugin BlockHub to use BlockHub to check region access for players? + #If you use BlockHub, Should QuickShop use BlockHub to check region access for players? BlockHub: enable: true - #Only use BlockHub for permission checker? + #Should BlockHub only be used for permission checks? only: false effect: sound: ontabcomplete: true oncommand: true onclick: true -#Item matcher, don't touch it if you didn't know how to use it. +#Item matcher. +#Do not touch it if you don't know what you're doing! matcher: - # Matcher type + #Matcher type #0= QuickShop item matcher with configurable options below. #1= Bukkit item matcher, can be more accurate. - #2= More strict matcher by Bukkit equals method + #2= Stricter Bukkit matcher, equals method. work-type: 0 #For Item item: - #Plugin should check the item damage? + #Should the Plugin check the item damage? damage: true - #Plugin should check the item repair cost? + #Should the Plugin check the item repair cost? repaircost: false - #Plugin should check the item display name? + #Should the Plugin check the item display name? displayname: true - #Plugin should check the item lores? + #Should the Plugin check the item lores? lores: true - #Plugin should check the item enchs? + #Should the Plugin check the item enchs? enchs: true - #Plugin should check the item potions? + #Should the Plugin check the item potions? potions: true - #Plugin should check the item attributes? + #Should the Plugin check the item attributes? attributes: true - #Plugin should check the item itemflags? + #Should the Plugin check the item itemflags? itemflags: true - #Plugin should check the item custommodeldata? + #Should the Plugin check the item custommodeldata? custommodeldata: true - #Plugin should check the item bookmetas? + #Should the Plugin check the item bookmetas? books: true - #Plugin should check the banner meta? + #Should the Plugin check the banner meta? banner: true - #Plugin should check the skull meta? + #Should the Plugin check the skull meta? skull: true - #Plugin should check the firework meta? + #Should the Plugin check the firework meta? firework: true - #Plugin should check the map meta? + #Should the Plugin check the map meta? map: true - #Plugin should check the leather armor meta? + #Should the Plugin check the leather armor meta? leatherArmor: true - #Plugin should check the fishBucket meta? + #Should the Plugin check the fishBucket meta? fishBucket: true - #Plugin should check the suspiciousStew meta? + #Should the Plugin check the suspiciousStew meta? suspiciousStew: true - #Plugin should check the shulkerBox contents? + #Should the Plugin check the shulkerBox contents? shulkerBox: true mixedeconomy: deposit: "eco give {0} {1}" withdraw: "eco take {0} {1}" #Integration is under BETA stage, please report any bugs to our Issue Tracker. -#Must disable protection-checks before enable integration +#You must disable protection-checks before enabling integration. integration: - #Towny Integration Component + #Towny Integration towny: enable: false - #If ignore disabled world checking + #If QS should ignore disabled worlds. ignore-disabled-worlds: true - #If a player want to create a shop, player must pass which checks? - #You can use multi checks in same time. - #Priority: UP to DOWN. + #Which checks does a player need to pass to create a shop? + #You can use multiple checks at the same time. + #Priority: UP > DOWN # - #Avaliable field: - #OWN = Player must create the shop on their plot. - #MODIFY = Player must have ability to build at the target plot. - #SHOPTYPE = Player must create the shop on SHOP type plot. + #Available fields: + #OWN = The player must own the plot to create a shop. + #MODIFY = The player must have the ability to build on the target plot to create a shop. + #SHOPTYPE = The player must create the shop on a SHOP type plot. create: - SHOPTYPE - MODIFY - #If a player want to trade with the shop, player must pass which checks? - #You can use multi checks in same time. - #Priority: UP to DOWN. + #Which checks does a player need to pass to trade with a shop? + #You can use multiple checks at the same time. + #Priority: UP > DOWN # - #Avaliable field: - #OWN = Player must create the shop on their plot. - #MODIFY = Player must have ability to build at the target plot. - #SHOPTYPE = Player must create the shop on SHOP type plot. + #Available fields: + #OWN = The player must own the plot to trade with a shop. + #MODIFY = The player must have the ability to build on the target plot to trade with a shop. + #SHOPTYPE = The player must trade with the shop on a SHOP type plot. trade: [] delete-shop-on-resident-leave: false delete-shop-on-plot-clear: true - #WorldGuard Integration Component - #CHANGE NEEDS RESTART THE SERVER - #CHANGE NEEDS RESTART THE SERVER - #CHANGE NEEDS RESTART THE SERVER + #WorldGuard Integration + #CHANGES REQUIRE A SERVER RESTART! + #CHANGES REQUIRE A SERVER RESTART! + #CHANGES REQUIRE A SERVER RESTART! worldguard: enable: false - #Should we prevent create a shop or trade with shop outside this plugin area + #Should we prevent the creation of a shop or trade with a shop outside of WorldGuard regions? whitelist-mode: false - #Allow player to create the shop if player is owner in this location ANY region. + #Allow players to create a shop if the player is the owner of in this location or ANY region. any-owner: true - #If a player want to create a shop, player must pass which checks? - #You can use multi checks in same time. - #Priority: UP to DOWN + #Which checks does a player need to pass to create a shop? + #You can use multiple checks at the same time. + #Priority: UP > DOWN # - #Avaliable field: - #FLAG = Region must set quickshop-create flag available for players. - #BUILD = Player must have ability to build at the target region. - #CHEST_ACCESS = Player must can access chest. - #INTERACT = Player must have ability to interact in the target region. - #OWN = Player owns this region. + #Available fields: + #FLAG = The region must have the quickshop-create flag set. + #BUILD = The player must have the ability to build in the target region. + #CHEST_ACCESS = The player must be able to access chests. + #INTERACT = The player must have the ability to interact in the target region. + #OWN = The player must owns this region. create: - FLAG - CHEST_ACCESS - #If a player want to create a shop, player must pass which checks? - #You can use multi checks in same time. - #Priority: UP to DOWN - # - #Avaliable field: - #FLAG = Region must set quickshop-trade flag available for players. - #BUILD = Player must have ability to build at the target region. - #CHEST_ACCESS = Player must can access chest. - #INTERACT = Player must have ability to interact in the target region. + #Which checks does a player need to pass to trade with a shop? + #You can use multiple checks at the same time. + #Priority: UP > DOWN + # + #Available fields: + #FLAG = The region must have the quickshop-trade flag set. + #BUILD = The player must have the ability to build in the target region. + #CHEST_ACCESS = The player must be able to access chests. + #INTERACT = The player must have the ability to interact in the target region. trade: [] + #PlotSquared Integration plotsquared: - #If a player want to create a shop, player must have quickshop-create flag - #If a player want to trade a shop, player must have quickshop-trade flag + #If a player wants to create a shop, the player must have the quickshop-create flag. + #If a player wants to trade with a shop, the player must have the quickshop-trade flag. enable: false - #Should we prevent create a shop or trade with shop outside this plugin area + #Should we prevent the creation of a shop or trade with a shop outside PlotSquared's area? whitelist-mode: true - #Should we delete shops that created by players but untrusted + #Should we delete shops that were created by players that get untrusted? delete-when-user-untrusted: true + #Lands Integration lands: - #If a player want to create a shop, player must have be trusted or is owner - #Player can always trade with a shop. + #If a player wants to create a shop, the player must be owner or be trusted. + #Players can always trade with a shop. enable: false - #Should we prevent create a shop or trade with shop outside this plugin area + #Should we prevent the creation of a shop or trade with a shop outside Land's area? whitelist-mode: false - #If ignore disabled world checking + #If QS should ignore disabled worlds. ignore-disabled-worlds: true - #Should we delete the shop in the land when the shop owner lose the permission - #in this land? + #Should we delete the shop in a land when the shop owner loses the permission for this land? delete-on-lose-permission: false + #FabledSkyblock Integration fabledskyblock: - # If a player want to create a shop, player must have quickshop-create flag - # If a player want to trade a shop, player must have quickshop-trade flag + # If a player wants to create a shop, the player must have the quickshop-create flag. + # If a player wants to trade a shop, the player must have the quickshop-trade flag. enable: false - #Should we prevent create a shop or trade with shop outside this plugin area + #Should we prevent the creation of a shop or trade with a shop outside FabledSkyblock's area? whitelist-mode: false + #GriefPrevention Integration griefprevention: enable: false - #Should we prevent create a shop or trade with shop outside this plugin area + #Should we prevent the creation of a shop or trade with a shop outside GriefPrevetion's area? whitelist-mode: false - #If a player want to create a shop, player must pass which checks? - #You can use multi checks in the same time. - #Priority: UP to DOWN + #Which checks does a player need to pass to create a shop? + #You can use multiple checks at the same time. + #Priority: UP > DOWN # - #Avaliable field: - #BUILD = Player must have ability to build at the target claim. - #CONTAINER_ACCESS = Player must can access container. - #ACCESS = Player must have ability to access the target claim. + #Available fields: + #BUILD = The player must have the ability to build in the target claim. + #CONTAINER_ACCESS = The player must be able to access containers. + #ACCESS = The Player must have the ability to access the target claim. create: - CONTAINER_ACCESS - #If a player want to trade with a shop, player must pass which checks? - #You can use multi checks in same time. - #Priority: UP to DOWN + #Which checks does a player need to pass to trade with a shop? + #You can use multiple checks at the same time. + #Priority: UP > DOWN # - #Avaliable field: - #BUILD = Player must have ability to build at the target claim. - #CONTAINER_ACCESS = Player must can access container. - #ACCESS = Player must have ability to access the target claim. + #Available fields: + #BUILD = The player must have the ability to build in the target claim. + #CONTAINER_ACCESS = The player must be able to access containers. + #ACCESS = The Player must have the ability to access the target claim. trade: [ ] - #Should QuickShop delete shops if shop owner has been untrusted in claim? + #Should QuickShop delete shops if the shop owner has been untrusted on the claim? delete-on-untrusted: true + #Residence Integration residence: enable: false - #Should we prevent create a shop or trade with shop outside this plugin area + #Should we prevent the creation of a shop or trade with a shop outside Residence's area? whitelist-mode: true - #If a player want to create a shop, player must pass which checks? - #You can use multi checks in the same time. - #Priority: UP to DOWN + #Which checks does a player need to pass to create a shop? + #You can use multiple checks at the same time. + #Priority: UP > DOWN # - #Avaliable field: - #FLAG = Region must set quickshop.create flag available for players. - # = Other available flags in Residence plugin or Residence addons registered flags. + #Available fields: + #FLAG = The region must have the quickshop.create flag set. + # = Other available registered flags in the Residence plugin or addons. create: - FLAG - interact - use - #If a player want to trade with a shop, player must pass which checks? - #You can use multi checks in same time. - #Priority: UP to DOWN - # - #Avaliable field: - #FLAG = Region must set quickshop.create flag available for players. - # = Other avaliable flags in Residence plugin or Residence addons registered flags. + #Which checks does a player need to pass to trade with a shop? + #You can use multiple checks at the same time. + #Priority: UP > DOWN + # + #Available fields: + #FLAG = The region must have the quickshop.trade flag set. + # = Other available registered flags in the Residence plugin or addons. trade: [] + #Factions Integration factions: enable: false - #Should we prevent create a shop or trade with shop outside this plugin area + #Should we prevent the creation of a shop or trade with a shop outside Factions's area? whitelist-mode: true - #If a player want to create a shop, player must pass which checks? + #Which checks does a player need to pass to create a shop? create: - #Faction require the status must match with under: + #Factions requires the status to match with these: require: open: false normal: true @@ -669,13 +718,13 @@ integration: safezone: false own: false warzone: false - #Player must have flags in the faction: + #The player must have these flags in the faction: flags: - CONTAINER - ECONOMY - #Faction require the status must match with under? + #Which checks does a player need to pass to trade with a shop? trade: - #Faction require: + #Factions requires the status to match with these: require: open: false normal: true @@ -685,23 +734,24 @@ integration: safezone: false own: false warzone: false - #Player must have flags in the faction: + #The player must have these flags in the faction: flags: [ ] #Superior Skyblock Integration superiorskyblock: enable: false - #Does only island owner can create shops on island? + #Is only the island owner allowed to create shops? owner-create-only: false - #Delete shop when the shop owner kicked/quited from island + #Delete shops when the shop owner got kicked/quited from the island. delete-shop-on-member-leave: true -#the protection that shop should check +#The protection that a shop should check. protect: explode: true hopper: true entity: true -#This option allow you custom item max stacksize. -# (* means all item, if not match all stacksize options then will use it) -# Example: +#This option allows you to set custom item max stacksizes. +#If nothing matches, then all items (*) will be used. +#* means all items. +#Examples: # #custom-item-stacksize: # - "*:128" @@ -710,18 +760,19 @@ protect: custom-item-stacksize: [ ] debug: - #Should we disable debug logger? - #It will save lots of execution time but lack information when reporting bugs and asking support + #Should we disable the debug logger? + #This will save a lot of execution time but will make reporting bugs + #and getting support harder because of the lack of information. disable-debuglogger: false - #logging stacktrace when deleting shop + #Log stacktrace when deleting shop? shop-deletion: false - #Delete corrupt shops while loading (false = skip loading) + #Delete corrupt shops while loading? + #Setting this to false will disable the loading of corrupt shops! delete-corrupt-shops: false - -#Keep this is false, DO NOT TOUCH IT! +#Let this stay false, DO NOT TOUCH IT! config-damaged: false diff --git a/src/main/resources/lang-original/messages.json b/src/main/resources/lang-original/messages.json index bb3d4ee94..2e8c084ae 100644 --- a/src/main/resources/lang-original/messages.json +++ b/src/main/resources/lang-original/messages.json @@ -4,7 +4,7 @@ "translation-version": "Support Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/af-ZA/messages.json b/src/main/resources/lang/af-ZA/messages.json index bb3d4ee94..2e8c084ae 100644 --- a/src/main/resources/lang/af-ZA/messages.json +++ b/src/main/resources/lang/af-ZA/messages.json @@ -4,7 +4,7 @@ "translation-version": "Support Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/ar-SA/messages.json b/src/main/resources/lang/ar-SA/messages.json index 1707b26a8..9649e0947 100644 --- a/src/main/resources/lang/ar-SA/messages.json +++ b/src/main/resources/lang/ar-SA/messages.json @@ -4,7 +4,7 @@ "translation-version": "إصدار الدعم: إعادة التشكيل", "translation-contributors": "المساهمون: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken و Andre_601", "translation-country": "منطقة اللغة: العربية (ar_AR)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cلا يمكن العثور على QuickShop. تحتاج إلى النظر إلى واحد.", "no-anythings-in-your-hand": "&cلا يوجد شيء في يديك.", "no-permission": "لا تملك الصلاحيّات للقيام بذلك.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/ca-ES/messages.json b/src/main/resources/lang/ca-ES/messages.json index 1ba4bf49c..cc414c68d 100644 --- a/src/main/resources/lang/ca-ES/messages.json +++ b/src/main/resources/lang/ca-ES/messages.json @@ -4,7 +4,7 @@ "translation-version": "Versiò suportada: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Zona de l'idioma: Català (ca_ES)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "No s'ha trobat cap QuickShop. Has de mirar a una.", "no-anythings-in-your-hand": "Ni hi ha res a la teva mà.", "no-permission": "No tens permisos per a fer això.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/cs-CZ/messages.json b/src/main/resources/lang/cs-CZ/messages.json index 978cef87d..89f2ef3ad 100644 --- a/src/main/resources/lang/cs-CZ/messages.json +++ b/src/main/resources/lang/cs-CZ/messages.json @@ -4,7 +4,7 @@ "translation-version": "Verze: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: Czech (cs_CZ)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cNelze najít QuickShop. Musíš se na něj podívat.", "no-anythings-in-your-hand": "&cNemáš v ruce žádný předmět.", "no-permission": "&cNa tuto akci nemáš práva.", @@ -315,5 +315,6 @@ "backup-success": "&aZáloha úspěšná.", "console-only": "&cTento příkaz může být spuštěn pouze v konzoli.", "console-only-danger": "&cTento příkaz může být spuštěn pouze v konzoli.", - "clean-warning": "&eTento příkaz vyčistí &volat obchody v případě, že je obchod poškozen nebo vytvořen v nepovoleném světě nebo prodávat/nakupuje nepovolené položky a &c&lIN NEZAMĚŘENO SVĚTY SHOPS&e, Ujistěte se, že máte úplnou zálohu dat vašich obchodů a použijte &b/qs cleanghost potvrdit &eto pokračování." -} \ No newline at end of file + "clean-warning": "&eTento příkaz vyčistí &volat obchody v případě, že je obchod poškozen nebo vytvořen v nepovoleném světě nebo prodávat/nakupuje nepovolené položky a &c&lIN NEZAMĚŘENO SVĚTY SHOPS&e, Ujistěte se, že máte úplnou zálohu dat vašich obchodů a použijte &b/qs cleanghost potvrdit &eto pokračování.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/da-DK/messages.json b/src/main/resources/lang/da-DK/messages.json index eddf52108..81f63bf17 100644 --- a/src/main/resources/lang/da-DK/messages.json +++ b/src/main/resources/lang/da-DK/messages.json @@ -4,7 +4,7 @@ "translation-version": "Supportversion: Reremake", "translation-contributors": "Bidragydere: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken og Andre_601", "translation-country": "Sprogzone: dansk (da_DA)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cKunne ikke finde en QuickShop. Du skal kigge på en.", "no-anythings-in-your-hand": "&cDer er intet i din hånd.", "no-permission": "&cDu har ikke rettighederne til at gøre dette.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/de-DE/messages.json b/src/main/resources/lang/de-DE/messages.json index 98ef2d6b3..c8b852fa9 100644 --- a/src/main/resources/lang/de-DE/messages.json +++ b/src/main/resources/lang/de-DE/messages.json @@ -4,7 +4,7 @@ "translation-version": "Unterstütze Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Sprache: Deutsch (de_DE)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cKonnte keinen QuickShop finden. Du musst auf einen schauen.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup erfolgreich.", "console-only": "&cDieser Befehl kann nur per Konsole ausgeführt werden.", "console-only-danger": "&cDies ist ein gefährlicher Befehl, weswegen er nur per Konsole ausgeführt werden kann.", - "clean-warning": "&eDieser Befehl wird &calle &eshops entfernen, welche beschädigt, in einer unerlaubten Welt sind, oder unerlaubte Items kaufen/verkaufen und &c&lIN NICHT GELADENEN SHOPWELTEN &esind. Stelle sicher dass du ein vollständiges Backup aller Shopdaten hast und fahre fort mit &b/qs cleanghost confirm &ezum bestätigen." -} \ No newline at end of file + "clean-warning": "&eDieser Befehl wird &calle &eshops entfernen, welche beschädigt, in einer unerlaubten Welt sind, oder unerlaubte Items kaufen/verkaufen und &c&lIN NICHT GELADENEN SHOPWELTEN &esind. Stelle sicher dass du ein vollständiges Backup aller Shopdaten hast und fahre fort mit &b/qs cleanghost confirm &ezum bestätigen.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/el-GR/messages.json b/src/main/resources/lang/el-GR/messages.json index bb3d4ee94..2e8c084ae 100644 --- a/src/main/resources/lang/el-GR/messages.json +++ b/src/main/resources/lang/el-GR/messages.json @@ -4,7 +4,7 @@ "translation-version": "Support Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/en-US/messages.json b/src/main/resources/lang/en-US/messages.json index 9b4028663..be71de4bf 100644 --- a/src/main/resources/lang/en-US/messages.json +++ b/src/main/resources/lang/en-US/messages.json @@ -4,7 +4,7 @@ "translation-version": "Support Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfull.", "console-only": "&cThis command can only be executed by Console.", "console-only-danger": "&cThis is a dangerous command, so that only the Console can execute it.", - "clean-warning": "&eThis command will purge &call &eshops if the shop is damaged, was created in not allowed worlds, is selling/buying not allowed items or &c&lEXISTS IN A UNLOADED WORLD&e. Make sure to create a full backup of your shop data first and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &eshops if the shop is damaged, was created in not allowed worlds, is selling/buying not allowed items or &c&lEXISTS IN A UNLOADED WORLD&e. Make sure to create a full backup of your shop data first and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/es-ES/messages.json b/src/main/resources/lang/es-ES/messages.json index 17b4c29b7..9d616b359 100644 --- a/src/main/resources/lang/es-ES/messages.json +++ b/src/main/resources/lang/es-ES/messages.json @@ -4,7 +4,7 @@ "translation-version": "&c&lVersión soportada: &b&lReremake", "translation-contributors": "Contribuidores: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken y Andre_601", "translation-country": "&c&lZona de idioma: &b&lEspañol (es_ES)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cNo se pudo encontrar ninguna QuickShop. Tienes que mirar hacia una.", "no-anythings-in-your-hand": "&cNo hay nada en tu mano.", "no-permission": "&cNo tienes permiso para hacer eso.", @@ -170,10 +170,10 @@ "transfer": "&eTransferir TODAS las tiendas de alguien a otros", "removeworld": "&ese removieron ALL tiendas en el mundo", "currency": "&eEstablecer o remover la configuración de divisa en la tienda", - "ban": "&eBanning a player from the shop", - "unban": "&eUnbanning a player from the shop", - "freeze": "&eDisable or Enable shop trading", - "lock": "&eSwitch the shop lock status" + "ban": "&eBanear a un jugador de la tienda", + "unban": "&eDesbaneando a un jugador de la tienda", + "freeze": "&eDesactivar o activar el trading en la tienda", + "lock": "&eCambiar el estado de bloqueo de la tienda" }, "disabled": "&cEste comando esta deshabilitado: &e{0}", "feature-not-enabled": "La característica no está habilitada en la configuración." @@ -190,9 +190,9 @@ "unlimited": "Ilimitado", "status-available": "&a", "status-unavailable": "&c", - "out-of-stock": "Out of Stock", - "out-of-space": "Out of Space", - "freeze": "Trade disabled" + "out-of-stock": "Agotado", + "out-of-space": "Sin espacio", + "freeze": "Operación desactivada" }, "controlpanel": { "setowner": "&aPropietario: &b{0} &e[&d&lCambiar&e]", @@ -218,10 +218,10 @@ "item-hover": "&eClic para cambiar el artículo de la tienda", "currency": "&aMoneda: &b{0} &e[&d&lSet&e]", "currency-hover": "&eClick para establecer o remover la divisa que utiliza la tienda", - "lock": "&eShop lock: &b{0} &e[&d&lToggle&e]", - "lock-hover": "&eEnable/Disable shop lock protection.", - "freeze": "&eFreeze mode: &b{0} &e[&d&lToggle&e]", - "freeze-hover": "&eToggle shop freeze status," + "lock": "&eTienda bloqueada: &b{0} &e[&d&lToggle&e]", + "lock-hover": "&eActivar/Desactivar protección contra bloqueo de la tienda.", + "freeze": "&eTienda bloqueada: &b{0} &e[&d&lToggle&e]", + "freeze-hover": "&eCambiar estado de congelación de la tienda" }, "tableformat": { "full_line": "+---------------------------------------------------+", @@ -315,5 +315,6 @@ "backup-success": "&aCopia de seguridad exitosa.", "console-only": "&cEste comando solo puede ser ejecutado por Consola.", "console-only-danger": "&cPor seguridad, este comando solo puede ser ejecutado por Consola.", - "clean-warning": "&eEste comando purgará &e las tiendas si la tienda está dañada o creada en mundos no permitidos o compras/objetos no permitidos y &c&LEN MUNDOS DE TIENDAS NO CARGADOS, asegúrate de tener una copia de seguridad completa de los datos de tu tienda y usa &b/qs confirmar &eo continuar." -} \ No newline at end of file + "clean-warning": "&eEste comando purgará &e las tiendas si la tienda está dañada o creada en mundos no permitidos o compras/objetos no permitidos y &c&LEN MUNDOS DE TIENDAS NO CARGADOS, asegúrate de tener una copia de seguridad completa de los datos de tu tienda y usa &b/qs confirmar &eo continuar.", + "shop-creation-failed": "&cFalló la creación de la tienda, por favor contacte con el administrador del servidor." +} diff --git a/src/main/resources/lang/fi-FI/messages.json b/src/main/resources/lang/fi-FI/messages.json index 2b1064186..6a5494132 100644 --- a/src/main/resources/lang/fi-FI/messages.json +++ b/src/main/resources/lang/fi-FI/messages.json @@ -4,7 +4,7 @@ "translation-version": "Tuettu versio: Reremake", "translation-contributors": "Avustajat: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Kielialue: Suomi (fi_FI)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cQuickShoppia ei löytynyt. Sinun täytyy katsoa yhtä.", "no-anythings-in-your-hand": "&cKädessäsi ei ole mitään.", "no-permission": "&cSinulla ei ole oikeutta tehdä noin.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/fr-FR/messages.json b/src/main/resources/lang/fr-FR/messages.json index 4b635d982..dfe521117 100644 --- a/src/main/resources/lang/fr-FR/messages.json +++ b/src/main/resources/lang/fr-FR/messages.json @@ -4,7 +4,7 @@ "translation-version": "Version suportée: Reremake", "translation-contributors": "Contributeurs : Timtower, Netherfoam, KaiNoMood, Mgazul, JackThePicken, Andre_601 et brunopaiva15, HiiRaZ", "translation-country": "Langue: Français (fr_FR)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cImpossible de trouver un QuickShop. Vous devez en regarder un.", "no-anythings-in-your-hand": "&cVous n'avez aucun objet dans votre main.", "no-permission": "&cVous n'avez pas la permission de faire ceci.", @@ -170,10 +170,10 @@ "transfer": "&eTransférer TOUS les shops d'un joueur vers un autre", "removeworld": "&eSupprime TOUTES les boutiques dans un monde spécifié", "currency": "&eDéfinir ou supprimer les paramètres actuelles de la boutique", - "ban": "&eBanning a player from the shop", - "unban": "&eUnbanning a player from the shop", - "freeze": "&eDisable or Enable shop trading", - "lock": "&eSwitch the shop lock status" + "ban": "&eInterdire un joueur de la boutique", + "unban": "&eDébannir un joueur de la boutique", + "freeze": "&eDésactiver ou activer le trading en magasin", + "lock": "&eChanger l'état de verrouillage de la boutique" }, "disabled": "&cCette commande est désactivée : &e{0}", "feature-not-enabled": "La fonctionnalité n'est pas activée dans la configuration." @@ -190,9 +190,9 @@ "unlimited": "Illimité", "status-available": "&a", "status-unavailable": "&c", - "out-of-stock": "Out of Stock", - "out-of-space": "Out of Space", - "freeze": "Trade disabled" + "out-of-stock": "Rupture de stock", + "out-of-space": "Espace insuffisant", + "freeze": "Transaction désactivée" }, "controlpanel": { "setowner": "&aPropriétaire: &b{0} &e[&dChanger&e]", @@ -218,10 +218,10 @@ "item-hover": "&eCliquez pour changer l'objet de la boutique", "currency": "blocks away from you", "currency-hover": "&eCliquez pour définir ou supprimer le mode utilisée par cette boutique", - "lock": "&eShop lock: &b{0} &e[&d&lToggle&e]", - "lock-hover": "&eEnable/Disable shop lock protection.", - "freeze": "&eFreeze mode: &b{0} &e[&d&lToggle&e]", - "freeze-hover": "&eToggle shop freeze status," + "lock": "&eVerrouillage de la boutique : &b{0} &e[&d&lActiver&e]", + "lock-hover": "&eActiver/Désactiver la protection de verrouillage de la boutique.", + "freeze": "&eVerrouillage de la boutique : &b{0} &e[&d&lActiver&e]", + "freeze-hover": "&eActiver/désactiver le statut de blocage de la boutique," }, "tableformat": { "full_line": "+---------------------------------------------------+", @@ -315,5 +315,6 @@ "backup-success": "&aSauvegarde réussie.", "console-only": "&cCette commande ne peut être exécutée que par la Console.", "console-only-danger": "&cIl s'agit d'une commande dangereuse qui ne peut être exécutée que par la Console.", - "clean-warning": "&eCette commande purgera &ctoutes &eles boutiques si la boutique est endommagée ou créée dans des mondes non autorisés ou vendant/achetant des objets non autorisés et &c&lDANS DES BOUTIQUES DE MONDES NON CHARGÉS&e, assurez-vous d'avoir une sauvegarde complète des données de vos boutiques et utilisez la commande &b/qs cleanghost confirm &epour continuer." -} \ No newline at end of file + "clean-warning": "&eCette commande purgera &ctoutes &eles boutiques si la boutique est endommagée ou créée dans des mondes non autorisés ou vendant/achetant des objets non autorisés et &c&lDANS DES BOUTIQUES DE MONDES NON CHARGÉS&e, assurez-vous d'avoir une sauvegarde complète des données de vos boutiques et utilisez la commande &b/qs cleanghost confirm &epour continuer.", + "shop-creation-failed": "&cLa création de la boutique a échoué, veuillez contacter l'administrateur du serveur." +} diff --git a/src/main/resources/lang/he-IL/messages.json b/src/main/resources/lang/he-IL/messages.json index bb3d4ee94..2e8c084ae 100644 --- a/src/main/resources/lang/he-IL/messages.json +++ b/src/main/resources/lang/he-IL/messages.json @@ -4,7 +4,7 @@ "translation-version": "Support Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/hu-HU/messages.json b/src/main/resources/lang/hu-HU/messages.json index ca48feb31..d63418b71 100644 --- a/src/main/resources/lang/hu-HU/messages.json +++ b/src/main/resources/lang/hu-HU/messages.json @@ -4,7 +4,7 @@ "translation-version": "Támogatott Verzió: Reremake", "translation-contributors": "Közreműködők: Timtower, Netherfoam, KaiNoMood and Mgazul", "translation-country": "Nyelv Zóna: Magyar (hu_HU)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cEz nem egy bolt amire nézel.", "no-anythings-in-your-hand": "&cNincs semmi a kezedben.", "no-permission": "&cNincs jogod ehhez!", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/it-IT/messages.json b/src/main/resources/lang/it-IT/messages.json index d9651283b..47999df64 100644 --- a/src/main/resources/lang/it-IT/messages.json +++ b/src/main/resources/lang/it-IT/messages.json @@ -4,7 +4,7 @@ "translation-version": "Versione di Supporto: Reremake", "translation-contributors": "Collaboratori: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (it_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cImpossibile trovare un negozio. È necessario guardarne uno.", "no-anythings-in-your-hand": "&cNon hai nulla in mano.", "no-permission": "&cNon hai il permesso per farlo.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup completato.", "console-only": "&cQuesto comando può essere eseguito solo dalla Console.", "console-only-danger": "&cQuesto è un comando di pericolo, quindi può essere eseguito solo dalla Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/ja-JP/messages.json b/src/main/resources/lang/ja-JP/messages.json index 09c7aa7a4..2c12a3f15 100644 --- a/src/main/resources/lang/ja-JP/messages.json +++ b/src/main/resources/lang/ja-JP/messages.json @@ -4,7 +4,7 @@ "translation-version": "&c&lサポートバージョン: &b&lReremake", "translation-contributors": "貢献者: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken, Andre_601 and Namiu", "translation-country": "&c&l言語圏: &b&l日本語 (ja_JP)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cQuickShopが見つかりませんでした。確認する必要があります。", "no-anythings-in-your-hand": "&cあなたは手に何も持っていません。", "no-permission": "&cあなたは権限を持っていないため実行できません。", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/ko-KR/messages.json b/src/main/resources/lang/ko-KR/messages.json index 239989022..cba223889 100644 --- a/src/main/resources/lang/ko-KR/messages.json +++ b/src/main/resources/lang/ko-KR/messages.json @@ -1,42 +1,42 @@ { - "file-test": "이것은텍스트파일일까요? 한국어 일까yo?", - "translation-author": "번역: Ghost_chu, 치키이예(ruddls030), jho5245, Kim dong kwon", + "file-test": "이것은텍스트파일일까요? 한국어 일까yo? :)", + "translation-author": "번역: Ghost_chu, Chicki_yeah(번역에 이상한 부분이 있다면 치키이예#0032로 연락해주시면 수정하겠습니다.), jho5245, Kim dong kwon, Ppag", "translation-version": "지원 버전: Reremake", "translation-contributors": "기여자: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "언어 지역: 한국어 (Ko)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&c퀵샵을 찾을수 없습니다. 상점을 보고있어야만합니다!", "no-anythings-in-your-hand": "&c당신의 손에 아무것도 없습니다.", - "no-permission": "&c이것을 하기위해선 권한이 필요합니다.", - "integrations-check-failed-create": "통합 {0} 이(가) 상점 생성 거부", - "integrations-check-failed-trade": "통합 {0} 이(가) 상점 거래를 거부함", - "3rd-plugin-build-check-failed": "&c플러그인 &l{0}&r&c가 권한 검사를 거부했는데, 권한 설정을 하셨습니까?", - "no-creative-break": "&c크리에이티브 모드 상태론 다른 플레이어의 상점을 파괴할 수 없습니다, 서바이벌 모드로 전환하거나 대신 슈퍼툴 {0} 을(를) 사용해주세요.", - "trading-in-creative-mode-is-disabled": "&c크리에이티브 모드에서는 상점에서 거래할 수 없습니다.", + "no-permission": "&c당신에게는 이것을 사용할 권한이 없습니다.", + "integrations-check-failed-create": "통합 {0} 이(가) 상점 생성을 거부(취소)시켰습니다.", + "integrations-check-failed-trade": "통합 {0} 이(가) 상점 거래를 거부(취소)시켰습니다.", + "3rd-plugin-build-check-failed": "&c플러그인 &l{0}&r&c가 권한 검사를 거부하였습니다., 권한 설정을 하셨나요?", + "no-creative-break": "&c크리에이티브 모드 상태론 다른 플레이어의 상점을 파괴할 수 없습니다, 서바이벌 모드로 전환하거나 슈퍼툴 {0} 을(를) 사용해주세요.", + "trading-in-creative-mode-is-disabled": "&c크리에이티브 모드 상태에서는 상점에서 거래할 수 없습니다.", "supertool-is-disabled": "&c슈퍼툴이 비활성화 되어있습니다. 어느 상점도 부술 수 없습니다.", - "no-double-chests": "&c당신은 큰상자를 이용한 상점을 만들 수 없습니다.", - "not-managed-shop": "&c당신은 상점의 주인 또는 관리자가 아닙니다", + "no-double-chests": "&c당신은 큰상자(일반 상자를 두개붙인)를 이용한 상점을 만들 수 없습니다.", + "not-managed-shop": "&c당신은 상점의 주인이나 관리자가 아닙니다", "shop-already-owned": "&c이것은 이미 상점입니다.", "chest-was-removed": "&c상자는 제거되었습니다.", - "price-too-cheap": "&c가격은 반드시 &e${0} 원 &c보다 높아야합니다.", + "price-too-cheap": "&c가격은 반드시 &e${0} 원 &c보다 높아야만 합니다.", "no-price-change": "&c입력한 금액이 이전 가격과 똑같습니다. 금액을 변경 하려면 다른 금액을 입력해주세요.", "you-cant-afford-a-new-shop": "&c새 상점 생성에 {0} 원이 소모됩니다!", - "player-bought-from-your-store-tax": "&c{0} 님이 유저님의 상점 에서 {1} {2} 을(를) 구입했으며 유저님은 {3} 원 을(를) 얻으셨습니다! (세금 : {4}원)", - "you-cant-afford-to-change-price": "&c상점 가격을 변경하는 데 {0}원이 소모됩니다!", + "player-bought-from-your-store-tax": "&c{0} 님이 유저님의 상점 에서 {1} {2} 을(를) 구입했으며 당신은 {3} 원 을(를) 얻으셨습니다! (세금 : {4}원)", + "you-cant-afford-to-change-price": "&c상점 물품의 가격을 변경할때 {0} 원이 소모됩니다.", "success-created-shop": "&c상점이 정상적으로 생성되었습니다.", - "success-removed-shop": "&c상점을 제거했습니다.", + "success-removed-shop": "&a상점을 제거했습니다.", "shops-arent-locked": "&c기억하세요, 상점은 도둑질로부터 보호되지 &4&l않습니다!!! &c도둑질로부터 보호하고 싶으면 잠금 플러그인을 이용하여 상자를 잠궈주세요!", "shop-creation-cancelled": "&c상점 생성이 취소되었습니다.", - "shop-purchase-cancelled": "&c상점 구입이 취소되었습니다.", + "shop-purchase-cancelled": "&c구입이 취소되었습니다.", "shop-stock-too-low": "&c상점에는 오직 {0} {1} 개의 상품이 남아 있습니다!", "you-cant-afford-to-buy": "&c비용은 {0} 원 이지만, 당신은 {1} 원 만 가지고 있습니다. (잔액이 모자랍니다.)", - "negative-amount": "&c음수로는 가격을 지정할 수 없습니다.", + "negative-amount": "&c갯수는 음수일수 없습니다. 양수로 입력해주세요.", "not-a-number": "&c당신은 숫자만을 입력해야하지만 {0} 을 입력하였습니다.", - "exceeded-maximum": "&c최대 값을 초과했습니다.", + "exceeded-maximum": "&c자바에서 허용하는 최대 값을 초과했습니다.", "not-a-integer": "&c당신은 숫자만을 입력해야하지만 {0} 을 입력하였습니다.", - "player-bought-from-your-store": "&c{0} 님이 유저님의 상점 에서 {1} {2} 을(를) 구입했으며 유저님은 {3} 원 을(를) 얻으셨습니다!", - "shop-out-of-stock": "&5{0}, {1}, {2} 에 있는 유저님의 가게의 물품 {3} 이 (가) 부족합니다.", - "shop-has-no-space": "&c가게에는 {0} 이상의 {1}의 공간 만 있습니다.", + "player-bought-from-your-store": "&c{0} 님이 당신의 상점 에서 {1} {2} 을(를) 구입했으며 당신은 {3} 원 을(를) 얻으셨습니다!", + "shop-out-of-stock": "&5{0}, {1}, {2} 에 있는 당신의 가게의 물품 {3} 이 (가) 부족합니다.", + "shop-has-no-space": "&c상점에는 {0} 이상의 {1} 의 공간 만 있습니다.", "you-dont-have-that-many-items": "&c유저님은 {0} {1} 밖에 없습니다.", "the-owner-cant-afford-to-buy-from-you": "&c비용은 {0} 이지만, 상점의 주인이 {1} 원을 가지고 있습니다. (상점 주인의 잔액이 부족합니다.)", "player-sold-to-your-store": "&a{0} 님이 {1} {2} 을 (를) 유저님의 상점에 판매했습니다.", @@ -45,7 +45,7 @@ "price-is-now": "&a새로운 상점의 가격은 &e{0}&a입니다.", "thats-not-a-number": "&c잘못된 숫자입니다. 확인하시고 다시 입력하세요.", "forbidden-vanilla-behavior": "&c 바닐라 동작과 일치하지 않기 때문에 작업이 금지됩니다.", - "no-price-given": "&c유효한 가격을 주세요.", + "no-price-given": "&c유효한 가격을 입력해주세요.", "average-price-nearby": "&a근처 평균 가격: &e{0} 원", "shop-has-changed": "&c유저님이 사용하려고 했던 상점이 유저님이 클릭한 이후로 변경되었습니다! 상점을 다시 클릭해주세요!", "shop-not-exist": "&c그곳에는 상점이 없습니다.", @@ -125,7 +125,7 @@ "new-owner": "&a새 주인 : &e{0}", "now-buying": "&a이제 &e{0}&a를 구매합니다.", "now-selling": "&a이제 &e{0}&a를 판매합니다.", - "cleaning": "&a어떤 물량도 없는 상점들을 제거하는중입니다.", + "cleaning": "&a어떤 물량도 없는 상점들을 제거하는중입니다...", "reloading": "&a리로드 중...", "cleaned": "&e{0}개&a의 상점을 제거했습니다.", "no-type-given": "&c사용법: /qs find <아이템 이름>", @@ -172,8 +172,8 @@ "currency": "&a상점의 통화 설정을 설정하거나 제거합니다.", "ban": "&e플레이어 차단", "unban": "&e플레이어 차단헤제", - "freeze": "&eDisable or Enable shop trading", - "lock": "&eSwitch the shop lock status" + "freeze": "&e상점 거래 비활성화 또는 활성화", + "lock": "상점 잠금 상태 전환" }, "disabled": "&c이 명령어는 비활성화 되어있습니다: &e{0}", "feature-not-enabled": "이옵션은 컨피그에서 비활성 상태입니다" @@ -190,9 +190,9 @@ "unlimited": "무제한", "status-available": "&a", "status-unavailable": "&c", - "out-of-stock": "Out of Stock", - "out-of-space": "Out of Space", - "freeze": "Trade disabled" + "out-of-stock": "일시 품절", + "out-of-space": "공간 부족", + "freeze": "거래 비활성화" }, "controlpanel": { "setowner": "&a주인: &b{0} &e[&d&l바꾸기&e]", @@ -218,10 +218,10 @@ "item-hover": "&e클릭하여 상점의 아이템을 변경합니다", "currency": "&c통화 : &b{0} &e[&d&l설정&e]", "currency-hover": "&e클릭하여 이 상점이 사용중인 통화를 설정하거나 제거합니다.", - "lock": "&eShop lock: &b{0} &e[&d&lToggle&e]", - "lock-hover": "&eEnable/Disable shop lock protection.", - "freeze": "&eFreeze mode: &b{0} &e[&d&lToggle&e]", - "freeze-hover": "&eToggle shop freeze status," + "lock": "&e동결 생태: &b{0} &e[&d&l전환&e]", + "lock-hover": "&e상점 잠금 보호를 활성화/비활성화 합니다. ", + "freeze": "&e동결 상태: &b{0} &e[&d&l전환&e]", + "freeze-hover": "&e상점 동결 상태 전환," }, "tableformat": { "full_line": "+---------------------------------------------------+", @@ -280,7 +280,7 @@ "complete": "&a완료!", "quickshop-gui-preview": "QuickShop GUI 아이템 미리보기", "shops-recovering": "상점을 백업본으로부터 복구하는 중입니다...", - "shops-backingup": "데이터베이스로부터 상점백업을 만들고 있습니다", + "shops-backingup": "상점백업을 데이터베이스에 만들고 있습니다", "saved-to-path": "백업이 {0} 에 저장되었습니다.", "backup-failed": "데이터베이스에 백업할 수 없습니다, 자세한 내용은 콘솔을 확인해주세요.", "translate-not-completed-yet-click": "{0} 언어의 번역이 {1} 완료되었습니다, 번역을 향상시키고 싶으신가요? 여기를 클릭하세요!", @@ -315,5 +315,6 @@ "backup-success": "&a백업 완료.", "console-only": "&c이 명령어는 콘솔에서만 사용할 수 있습니다.", "console-only-danger": "&c이 명령어는 위험하기 때문에 콘솔에서만 실행할수 있습니다. ", - "clean-warning": "이 명령어은 허용되지 않는 월드 또는 허용되지 않는 아이템을 판매/구매하거나 구입하거나 로드되지 않은 월드 샵에서 모든 샵을 삭제합니다 샵 데이터를 전체 백업하고 /qs cleanhost를 사용하여 계속 진행하십시오." -} \ No newline at end of file + "clean-warning": "이 명령어은 허용되지 않는 월드 또는 허용되지 않는 아이템을 판매/구매중인 상점과 &c&l로드되지 않은 월드의 모든 샵을 삭제합니다 샵 데이터를 전체 백업하고 /qs cleanhost를 사용하여 계속 진행하십시오.", + "shop-creation-failed": "&c상점을 만들지 못했습니다, 서버 관리자에게 문의해주세요." +} diff --git a/src/main/resources/lang/nl-NL/messages.json b/src/main/resources/lang/nl-NL/messages.json index dc0e18600..e530a0de9 100644 --- a/src/main/resources/lang/nl-NL/messages.json +++ b/src/main/resources/lang/nl-NL/messages.json @@ -4,7 +4,7 @@ "translation-version": "ondersteunende versie: Reremake", "translation-contributors": "Medewerkers", "translation-country": "Taal Zone: Engels (nl_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cGeen QuickShop gevonden, je moet naar een QuickShop kijken.", "no-anythings-in-your-hand": "&cJe hebt niks in je hand.", "no-permission": "&cJe hebt hiervoor geen rechten.", @@ -315,5 +315,6 @@ "backup-success": "&aBack-up succesvol.", "console-only": "&cDeze opdracht kan alleen worden uitgevoerd door Console.", "console-only-danger": "&cDit is een gevaars-commando zodat alleen door Console kan worden uitgevoerd.", - "clean-warning": "&eThis command zal &call shops verwijderen als de winkel beschadigd is of gemaakt is in niet-toegestane werelden of als het kopen van niet-toegestane artikelen en &c&lIN NIET LOADED WORLD SHOPS&e, zorg ervoor dat u volledige back-up van uw winkels gegevens heeft en gebruik &b/qs cleanghost bevestig &eto continu." -} \ No newline at end of file + "clean-warning": "&eThis command zal &call shops verwijderen als de winkel beschadigd is of gemaakt is in niet-toegestane werelden of als het kopen van niet-toegestane artikelen en &c&lIN NIET LOADED WORLD SHOPS&e, zorg ervoor dat u volledige back-up van uw winkels gegevens heeft en gebruik &b/qs cleanghost bevestig &eto continu.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/no-NO/messages.json b/src/main/resources/lang/no-NO/messages.json index bb3d4ee94..2e8c084ae 100644 --- a/src/main/resources/lang/no-NO/messages.json +++ b/src/main/resources/lang/no-NO/messages.json @@ -4,7 +4,7 @@ "translation-version": "Support Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/pl-PL/messages.json b/src/main/resources/lang/pl-PL/messages.json index 2605e6509..2d643d7cc 100644 --- a/src/main/resources/lang/pl-PL/messages.json +++ b/src/main/resources/lang/pl-PL/messages.json @@ -4,7 +4,7 @@ "translation-version": "Wspierana wersja: Reremake", "translation-contributors": "Współtwórcy: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken i Andre_601", "translation-country": "Język: Polski (pl_PL)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cNie można znaleźć QuickShop. Musisz na niego patrzeć.", "no-anythings-in-your-hand": "&cW twojej ręce nic nie ma.", "no-permission": "&cNie masz uprawnień, aby to zrobić.", @@ -170,10 +170,10 @@ "transfer": "&ePrzenieś czyjeś WSZYSTKIE sklepy do innych", "removeworld": "&eUsuń WSZYSTKIE sklepy w określonym świecie", "currency": "&eUstaw lub usuń ustawienia waluty sklepu", - "ban": "&eBanning a player from the shop", - "unban": "&eUnbanning a player from the shop", - "freeze": "&eDisable or Enable shop trading", - "lock": "&eSwitch the shop lock status" + "ban": "&eBanowanie gracza ze sklepu", + "unban": "&eOdbanowanie gracza ze sklepu", + "freeze": "&eWyłącz lub włącz handel sklepowy", + "lock": "&eZmień status blokady sklepu" }, "disabled": "&cTa komenda jest wyłączona: &e{0}", "feature-not-enabled": "Funkcja nie jest włączona w konfiguracji." @@ -190,9 +190,9 @@ "unlimited": "Nieograniczony", "status-available": "&a", "status-unavailable": "&c", - "out-of-stock": "Out of Stock", - "out-of-space": "Out of Space", - "freeze": "Trade disabled" + "out-of-stock": "Wyprzedano produkt", + "out-of-space": "Za mało miejsca", + "freeze": "Handel wyłączony" }, "controlpanel": { "setowner": "&aWłaściciel: &b{0} &e[&d&lZmień&e]", @@ -218,10 +218,10 @@ "item-hover": "&eKliknij, aby zmienić przedmiot sklepu", "currency": "&aWaluta: &b{0} &e[&d&lUstaw&e]", "currency-hover": "&eKliknij, aby ustawić lub usunąć walutę, której używa ten sklep", - "lock": "&eShop lock: &b{0} &e[&d&lToggle&e]", - "lock-hover": "&eEnable/Disable shop lock protection.", - "freeze": "&eFreeze mode: &b{0} &e[&d&lToggle&e]", - "freeze-hover": "&eToggle shop freeze status," + "lock": "&eBlokada sklepu: &b{0} &e[&d&lPrzełącz&e]", + "lock-hover": "&eWłącz/Wyłącz ochronę blokady sklepu.", + "freeze": "&eTryb zamrożenia: &b{0} &e[&d&lPrzełącz&e]", + "freeze-hover": "&ePrzełącz status zamrożenia sklepu" }, "tableformat": { "full_line": "+---------------------------------------------------+", @@ -315,5 +315,6 @@ "backup-success": "&aKopia zapasowa powiodła się.", "console-only": "&cTa komenda może być wykonana tylko przez Konsolę.", "console-only-danger": "&cTo jest polecenie niebezpieczne, więc może być wykonane tylko przez Konsolę.", - "clean-warning": "&eTa komenda wyczyści &cwszystkie &e sklepy, jeśli sklep jest uszkodzony lub stworzony w niedozwolonych światach lub sprzedaje/kupuje niedozwolone przedmioty i &c&lNIE JEST ZAŁADOWANY W SKLEPIE ŚWIATOWYM&e, upewnij się, że masz pełną kopię zapasową danych sklepów i użyj &b/qs cleanghost confirm &eaby kontynuować." -} \ No newline at end of file + "clean-warning": "&eTa komenda wyczyści &cwszystkie &e sklepy, jeśli sklep jest uszkodzony lub stworzony w niedozwolonych światach lub sprzedaje/kupuje niedozwolone przedmioty i &c&lNIE JEST ZAŁADOWANY W SKLEPIE ŚWIATOWYM&e, upewnij się, że masz pełną kopię zapasową danych sklepów i użyj &b/qs cleanghost confirm &eaby kontynuować.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/pt-BR/messages.json b/src/main/resources/lang/pt-BR/messages.json index 70bccbf2f..cac2e93dc 100644 --- a/src/main/resources/lang/pt-BR/messages.json +++ b/src/main/resources/lang/pt-BR/messages.json @@ -4,7 +4,7 @@ "translation-version": "Versão de suporte: Remake", "translation-contributors": "Contribuidores: Torre de Timor, Netherfoam, KaiNoMood, Mgazul, JackTheChicken e Andre_601", "translation-country": "Zona do idioma: Português Brasileiro (pt_BR)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "Não conseguimos encontrar uma QuickShop. Você precisa estar olhando para uma.", "no-anythings-in-your-hand": "&cNão há nada na sua mão.", "no-permission": "&cVocê não tem permissão para fazer isso.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup realizado com sucesso.", "console-only": "&cEste comando só pode ser executado pelo Console.", "console-only-danger": "&cEste é um comando de perigo para que apenas possa ser executado pelo Console.", - "clean-warning": "&eEste comando irá apagar &chamar as lojas &e se a loja for danificada ou criada em mundos não permitidos ou venda/compra de itens não permitidos e &c&lIN NOT LOADED SHOPS&e, Certifique-se de ter um backup completo dos dados das suas lojas e use a limpeza &b/qs confirmar &epara continuar." -} \ No newline at end of file + "clean-warning": "&eEste comando irá apagar &chamar as lojas &e se a loja for danificada ou criada em mundos não permitidos ou venda/compra de itens não permitidos e &c&lIN NOT LOADED SHOPS&e, Certifique-se de ter um backup completo dos dados das suas lojas e use a limpeza &b/qs confirmar &epara continuar.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/pt-PT/messages.json b/src/main/resources/lang/pt-PT/messages.json index bb3d4ee94..0638ec0c5 100644 --- a/src/main/resources/lang/pt-PT/messages.json +++ b/src/main/resources/lang/pt-PT/messages.json @@ -1,10 +1,10 @@ { "file-test": "This is a test textfile. We use it to test if the messages.json is broken. You can fill it with any easter eggs you like here :)", - "translation-author": "Translator: Ghost_chu, Andre_601", + "translation-author": "Tradutor: Ghost_chu, Andre_601", "translation-version": "Support Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -91,7 +91,7 @@ "enchants": "&5Enchantments", "stored-enchants": "&5Stored Enchantments", "shop-information": "&aShop Information:", - "owner": "&aOwner: {0}", + "owner": "&aProprietário: {0}", "item": "&aItem: &e{0}", "item-holochat-error": "&c[Error]", "preview": "&b[Item Preview]", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/ro-RO/messages.json b/src/main/resources/lang/ro-RO/messages.json index a84973a29..f75132b45 100644 --- a/src/main/resources/lang/ro-RO/messages.json +++ b/src/main/resources/lang/ro-RO/messages.json @@ -4,7 +4,7 @@ "translation-version": "Versiune suport: Reproducere", "translation-contributors": "Contribuitori: Turnul, Netherfoam, KaiNoMood, Mgazul, JackTheChicken și Andre_601", "translation-country": "Zona de Limbă: Engleză (ro_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cNu am putut gasi un magazin. Trebuie sa te uiti la unul.", "no-anythings-in-your-hand": "&cNu este nimic in mana.", "no-permission": "&cNu ai permisiunea să faci asta.\".", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/ru-RU/messages.json b/src/main/resources/lang/ru-RU/messages.json index a32c409a3..fa297f0a5 100644 --- a/src/main/resources/lang/ru-RU/messages.json +++ b/src/main/resources/lang/ru-RU/messages.json @@ -4,7 +4,7 @@ "translation-version": "Поддерживаемая версия: Reremake", "translation-contributors": "Участники: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken и Andre_601", "translation-country": "Языковой регион: Русский (ru_RU)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cНе удалось найти игрока, который использует магазина. Возможно игрок не зарегистрирован.", "no-anythings-in-your-hand": "&cУ вас нет товаров в руках.", "no-permission": "У вас недостаточно прав.", @@ -315,5 +315,6 @@ "backup-success": "&aРезервное копирование успешно.", "console-only": "&cЭта команда может быть выполнена только консолью.", "console-only-danger": "&cЭто опасная команда, так что может быть выполнена только консолью.", - "clean-warning": "&eЭта команда очистит &cвсех &eмагазинов, если магазин повреждён или создан в запрещённых мирах или продажах/покупке запрещенных товаров и &c&lНЕ ЗАГРУЖЕН МИРА МАГАЗИНОВ&e, убедитесь, что у вас есть полная резервная копия данных ваших магазинов и используйте &b/qs cleanghost confirm &eдля продолжение." -} \ No newline at end of file + "clean-warning": "&eЭта команда очистит &cвсех &eмагазинов, если магазин повреждён или создан в запрещённых мирах или продажах/покупке запрещенных товаров и &c&lНЕ ЗАГРУЖЕН МИРА МАГАЗИНОВ&e, убедитесь, что у вас есть полная резервная копия данных ваших магазинов и используйте &b/qs cleanghost confirm &eдля продолжение.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/sr-SP/messages.json b/src/main/resources/lang/sr-SP/messages.json index bb3d4ee94..2e8c084ae 100644 --- a/src/main/resources/lang/sr-SP/messages.json +++ b/src/main/resources/lang/sr-SP/messages.json @@ -4,7 +4,7 @@ "translation-version": "Support Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/sv-SE/messages.json b/src/main/resources/lang/sv-SE/messages.json index fec07047d..35d1c3791 100644 --- a/src/main/resources/lang/sv-SE/messages.json +++ b/src/main/resources/lang/sv-SE/messages.json @@ -4,7 +4,7 @@ "translation-version": "Supportversion: Reremake", "translation-contributors": "Medhjälpare: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken och Andre_601", "translation-country": "Språkområde: Engelska (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cKunde inte hitta en QuickShop. Du måste titta på en.", "no-anythings-in-your-hand": "&cDet finns inget i din hand.", "no-permission": "&cDu har inte tillåtelse till att göra detta.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup framgångsrik.", "console-only": "&cDetta kommando kan endast köras av Konsolen.", "console-only-danger": "&cDetta är ett farligt kommando så att endast kan utföras av Konsolen.", - "clean-warning": "&eDetta kommando kommer att rensa &ebutiker om butiken är skadad eller skapad i otillåtna världar eller sälja/köpa otillåtna föremål och &c&lIN INTE LADDA ORLD SHOPS&e, se till att du har full säkerhetskopiering av dina butikers data och använd &b/qs cleanghost confirm &eför att fortsätta." -} \ No newline at end of file + "clean-warning": "&eDetta kommando kommer att rensa &ebutiker om butiken är skadad eller skapad i otillåtna världar eller sälja/köpa otillåtna föremål och &c&lIN INTE LADDA ORLD SHOPS&e, se till att du har full säkerhetskopiering av dina butikers data och använd &b/qs cleanghost confirm &eför att fortsätta.", + "shop-creation-failed": "&cSkapandet av butiken misslyckades, kontakta serveradministratören." +} diff --git a/src/main/resources/lang/tr-TR/messages.json b/src/main/resources/lang/tr-TR/messages.json index 17a8ac4cc..7c5ae38ca 100644 --- a/src/main/resources/lang/tr-TR/messages.json +++ b/src/main/resources/lang/tr-TR/messages.json @@ -4,7 +4,7 @@ "translation-version": "Destek Versiyonu: Reremake", "translation-contributors": "Katkıda Bulunanlar: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Dil Bölgesi: Türkçe (tr_TR)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&sHiç QuickShop bulunamadı. Birine bakman lazım.", "no-anythings-in-your-hand": "&cElinde hiçbir şey yok.", "no-permission": "&cBunu yapmaya iznin yok.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/uk-UA/messages.json b/src/main/resources/lang/uk-UA/messages.json index bb3d4ee94..2e8c084ae 100644 --- a/src/main/resources/lang/uk-UA/messages.json +++ b/src/main/resources/lang/uk-UA/messages.json @@ -4,7 +4,7 @@ "translation-version": "Support Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/vi-VN/messages.json b/src/main/resources/lang/vi-VN/messages.json index bb3d4ee94..2e8c084ae 100644 --- a/src/main/resources/lang/vi-VN/messages.json +++ b/src/main/resources/lang/vi-VN/messages.json @@ -4,7 +4,7 @@ "translation-version": "Support Version: Reremake", "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601", "translation-country": "Language Zone: English (en_US)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.", "no-anythings-in-your-hand": "&cThere is nothing in your hand.", "no-permission": "&cYou do not have permission to do that.", @@ -315,5 +315,6 @@ "backup-success": "&aBackup successfully.", "console-only": "&cThis command only can be executed by Console.", "console-only-danger": "&cThis is a danger command so that only can be executed by Console.", - "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue." -} \ No newline at end of file + "clean-warning": "&eThis command will purge &call &e shops if the shop is damaged or created in disallowed worlds or selling/buying disallowed items and &c&lIN NOT LOADED WORLD SHOPS&e, make sure you have full backup of your shops data and use &b/qs cleanghost confirm &eto continue.", + "shop-creation-failed": "&cShop creation failed, please contact with server administrator." +} diff --git a/src/main/resources/lang/zh-CN/messages.json b/src/main/resources/lang/zh-CN/messages.json index 2913d8ebc..a5233cbfa 100644 --- a/src/main/resources/lang/zh-CN/messages.json +++ b/src/main/resources/lang/zh-CN/messages.json @@ -4,7 +4,7 @@ "translation-version": "支持版本:Reremake", "translation-contributors": "开发贡献者:Timtower, Netherfoam, KaiNoMood JackTheChicken 和 Andre_601", "translation-country": "本地化语言:简体中文 (zh_CN)", - "language-version": "53", + "language-version": "54", "not-looking-at-shop": "&c无法找到商店,您需要注视着你想要操作的商店。", "no-anythings-in-your-hand": "&c你的手里没有任何物品。", "no-permission": "&c你没有权限这样做。", @@ -175,7 +175,7 @@ "freeze": "&e禁用或启用商店交易", "lock": "&e切换商店锁状态" }, - "disabled": "&c此命令已禁用", + "disabled": "&c此命令已禁用: &e{0}", "feature-not-enabled": "配置中未启用此功能。" }, "signs": { @@ -192,7 +192,7 @@ "status-unavailable": "&c", "out-of-stock": "缺货", "out-of-space": "空间不足", - "freeze": "关闭交易" + "freeze": "交易已被禁用" }, "controlpanel": { "setowner": "&a所有者: &b{0} &e[&d&l修改&e]", @@ -237,7 +237,7 @@ "price": "[价格]", "range": "[范围]", "amount": "[数量]", - "currency": "货币名称", + "currency": "[货币名称]", "item": "[物品]" }, "updatenotify": { @@ -308,12 +308,13 @@ "help-us": "&a[帮助我们提高翻译质量]" }, "currency-not-exists": "&c无法找到您想要设置的货币,也许是拼写错误或该货币在这个世界不可用。", - "currency-set": "&aShop货币成功设置为 {0}。", - "currency-unset": "&aShop货币已成功删除。现在使用默认设置。", + "currency-set": "&a商店货币单位已被成功设置为 {0}。", + "currency-unset": "&a商店货币单位已被成功删除。现在会使用默认货币单位。", "currency-not-support": "&c此经济插件不支持多货币功能。", - "item-not-exist": "&c项目 &e{0} &cdo不存在,请检查您的拼写。", + "item-not-exist": "&物品 &e{0} &c不存在,请检查您的拼写。", "backup-success": "&a备份成功。", "console-only": "&c此命令只能由控制台执行。", - "console-only-danger": "&c这是一个危险命令所以只能通过控制台执行。", - "clean-warning": "&e这个命令将清理&e 商店,如果商店在不允许的世界上被损坏或创建,或出售/购买不允许的项目,以及 &c&lIN不要加载世界商品, 请确保您的商店数据备份完整,并使用 &b/qs 清除主机确认 &eto 继续。" -} \ No newline at end of file + "console-only-danger": "&c这是一个危险命令,所以只能通过控制台执行。", + "clean-warning": "&e这个命令将清理&c所有&e在不允许创建商店的世界的、出售/购买不允许的物品的,以及 &c&l所有在服务器没有加载的世界的商店, 请在确保您的商店数据备份完整后使用 &b/qs cleanghost confirm &e来继续。", + "shop-creation-failed": "&c商店创建失败,请与服务器管理员联系。" +} diff --git a/src/main/resources/lang/zh-TW/messages.json b/src/main/resources/lang/zh-TW/messages.json index 3dba0127f..cbe4a9f0a 100644 --- a/src/main/resources/lang/zh-TW/messages.json +++ b/src/main/resources/lang/zh-TW/messages.json @@ -1,85 +1,85 @@ { - "file-test": "這是個測試的文件檔案。我們使用他來測試 messages.json 是否損壞。你可以在這裡填入任何喜歡的彩蛋。:)", - "translation-author": "翻譯人員:Ghost_chu、Andre_601、Flandre_tw(主翻譯)、Terence#3062(主翻譯)", - "translation-version": "支援版本:Reremake(重製版)", + "file-test": "這是個測試的文字檔案,我們使用它來測試 messages.json 是否損壞,你可以在這裡填入任何喜歡的彩蛋。 :)", + "translation-author": "翻譯人員 : Ghost_chu、Andre_601、Flandre_tw (主翻譯) 、Terence#3062 (主翻譯)", + "translation-version": "支援版本 : Reremake (重製版)", "translation-contributors": "貢獻人員 : Timtower、Netherfoam、KaiNoMood、Mgazul、JackTheChicken 和 Andre_601", - "translation-country": "語言:&b&l繁體中文 Chinese Traditional(zh_TW)", - "language-version": "53", - "not-looking-at-shop": "&c無法找到儲物箱商店。你需要注視著儲物箱。", + "translation-country": "語言 : &b&l繁體中文 Chinese Traditional (zh_TW)", + "language-version": "54", + "not-looking-at-shop": "&c無法找到儲物箱商店,你需要注視著儲物箱。", "no-anythings-in-your-hand": "&c手上沒有任何東西。", - "no-permission": "&4你沒有使用該指令的許可權。", - "integrations-check-failed-create": "&c集成模組 {0} 拒絕了創建商店操作。", - "integrations-check-failed-trade": "&c集成模組 {0} 拒絕了交易商店操作。", - "3rd-plugin-build-check-failed": "&c第三方插件 &l{0}&r&c 拒絕了權限檢查操作,你有權限建立商店嗎 ?", + "no-permission": "&4你沒有使用該指令的權限。", + "integrations-check-failed-create": "&c集成模組 {0} 拒絕了建立商店的操作。", + "integrations-check-failed-trade": "&c集成模組 {0} 拒絕了與商店交易的操作。", + "3rd-plugin-build-check-failed": "&c第三方插件 &l{0}&r&c 拒絕檢查權限操作,你有權限建立商店嗎 ?", "no-creative-break": "&c你不能在創造模式破壞其他玩家的商店,請使用生存模式或使用超級工具 {0} 來破壞。", "trading-in-creative-mode-is-disabled": "&c你不能在創造模式下使用商店交易。", - "supertool-is-disabled": "&c超級工具已經被關閉,現在不能使用超級工具破壞任何商店。", - "no-double-chests": "&c你沒有權限創建大型儲物箱商店。", - "not-managed-shop": "你沒有權限管理此商店", - "shop-already-owned": "&c這已經是一個商店了。", - "chest-was-removed": "&c儲物箱已經被移除。", + "supertool-is-disabled": "&c超級工具已被關閉,現在不能使用超級工具破壞任何商店。", + "no-double-chests": "&c你沒有建立大型儲物箱商店的權限。", + "not-managed-shop": "你沒有管理此商店的權限", + "shop-already-owned": "&c這已是一個商店了。", + "chest-was-removed": "&c儲物箱已被移除。", "price-too-cheap": "&c價格必須大於 &e${0}", "no-price-change": "&c這不會導致價格變動 !", - "you-cant-afford-a-new-shop": "&c需要花費 {0} 元才能創建商店。", - "player-bought-from-your-store-tax": "&c{0} 從你的商店購買了 {1} {2},你總共賺了 {3} 元 ( {4} 元稅 ) 。", + "you-cant-afford-a-new-shop": "&c需要花費 {0} 元才能建立商店。", + "player-bought-from-your-store-tax": "&c{0} 從你的商店購買了 {1} {2},你總共賺了 {3} 元 ({4} 元稅) 。", "you-cant-afford-to-change-price": "&c你需要花費 {0} 元來修改商品價格。", - "success-created-shop": "&c已經創建商店。", - "success-removed-shop": "&a已經刪除商店。", - "shops-arent-locked": "&c請記住商店不受盜竊保護 ! 如果要防止盜賊,請用 LWC 、 Lockette 等將其上鎖 !", - "shop-creation-cancelled": "&c已經取消創建商店。", - "shop-purchase-cancelled": "&c已經取消購買。", - "shop-stock-too-low": "&c這個商店只剩 {0} 個 {1}。", + "success-created-shop": "&c已建立商店。", + "success-removed-shop": "&a已刪除商店。", + "shops-arent-locked": "&c請注意,商店無法防盜 ! 如果你想要防盜功能,請使用 LWC 、 Lockette 等插件鎖住儲物箱。", + "shop-creation-cancelled": "&c已取消建立商店。", + "shop-purchase-cancelled": "&c已取消購買。", + "shop-stock-too-low": "&c這個商店只剩 {0} 個 {1} !", "you-cant-afford-to-buy": "&c商品價格是 {0} 元,但是你只有 {1} 元。", "negative-amount": "&c我的天啊,沒想到居然有人想要交易負數的數量。", "not-a-number": "&c輸入內容只能是數字,但你輸入了 {0}。", "exceeded-maximum": "&c該值超出了 Java 中的最大值。 ", "not-a-integer": "&c輸入一定是數字,但你輸入了 {0}。", "player-bought-from-your-store": "&c{0} 從你的商店購買了 {1} {2},你總共賺了 {3}。", - "shop-out-of-stock": "&5你在 {0}, {1}, {2} 出售 {3} 的商店已經售罄一空。", + "shop-out-of-stock": "&5你在 X : {0} Y : {1} Z : {2} 出售 {3} 的商店已售罄一空 !", "shop-has-no-space": "&c這個商店只能再收購 {0} 個 {1} 而已。", "you-dont-have-that-many-items": "&c你的身上只有 {0} 個 {1}。", "the-owner-cant-afford-to-buy-from-you": "&c這個商店只能再收購 {0} 個 {1}。", "player-sold-to-your-store": "&a{0} 在你的商店賣出了 {1} 個 {2}。", - "shop-out-of-space": "&5你在 {0}, {1}, {2} 的商店已經滿了。", + "shop-out-of-space": "&5你在 {0}, {1}, {2} 的商店已滿了。", "fee-charged-for-price-change": "&a你付了 &c{0}&a 元修改商店定價。", "price-is-now": "&a現在你的商店定價是 &e{0} 元。", "thats-not-a-number": "&c無效的數字", "forbidden-vanilla-behavior": "&c該操作不符合原版行為,因此被禁止。", "no-price-given": "&c請提供一個有效的價格。", - "average-price-nearby": "&a附近商店的平均價格為 : &e{0} 元。", - "shop-has-changed": "&c你嘗試交易的商店在點擊後已經有變動 !", + "average-price-nearby": "&a附近的平均價格 : &e{0} 元。", + "shop-has-changed": "&c你嘗試交易的商店在點擊後已有變動 !", "shop-not-exist": "&c商店不存在。", "nearby-shop-this-way": "&a商店距離你 {0} 格遠。", - "nearby-shop-header": "&a匹配附近商店 &b{0}&a : ", - "nearby-shop-entry": "&a-資訊:{0} &a價格:&b {1} &ax:&b{2} &ay:&b{3} &az:&b{4} &a距離:&b{5} &a個方塊。", - "no-nearby-shop": "&a這個商店離你有 {0} 格的距離。", - "buying-more-than-selling": "&c警告 : 你收購的物品比出售的物品多。", + "nearby-shop-header": "&a附近匹配商店 &b{0}&a : ", + "nearby-shop-entry": "&a-資訊 : {0} &a價格 : &b {1} &ax : &b{2} &ay : &b{3} &az : &b{4} &a距離 : &b{5} &a個方塊。", + "no-nearby-shop": "&c找不到符合 {0} 的商店。", + "buying-more-than-selling": "&c警告 : 你收購的物品比出售的物品多 !", "not-enough-space": "&c你只剩下 {0} 格空間可以裝東西 !", "refill-success": "&a補貨成功", "empty-success": "&a清空商品成功", "admin-shop": "管理員商店", "unknown-owner": "未知", - "owner-bypass-check": "&e略過了所有檢查,交易成功。 ( 你是商店店主 ! )", - "reached-maximum-can-create": "&c你創建的商店數量 {0}/{1} 已經達到上限 !", + "owner-bypass-check": "&e繞過所有檢查並完成交易 (因為你是商店店主 ! )", + "reached-maximum-can-create": "&c你建立的商店數量 {0}/{1} 已達到上限 !", "restricted-prices": "&c{0} 元是無效的價格 : 最高 {1} 元,最低 {2} 元。", - "no-enough-money-to-keep-shops": "&c你的金錢不夠繳稅,所以你所有的商店已經被刪除...", + "no-enough-money-to-keep-shops": "&c你的金錢不夠繳稅,所以你所有的商店已被刪除……", "nothing-to-flush": "&a沒有關於商店的新訊息。", "break-shop-use-supertool": "&e你可以使用超級工具破壞商店。", - "failed-to-put-sign": "&c你的商店周圍沒有足夠的空間可以放商店的資訊告示牌。", - "failed-to-paste": "&c無法將資料上傳至 Pastebin ,請檢查你的連線再重試。 ( 詳見控制台 )", - "warn-to-paste": "&e正在收集資料並上傳到 Pastebin ,這可能需要一點時間。&c&l警告 : &c資料上傳後,此連結會公開一星期 ! 可能會洩漏您伺服器中的設定或其他服器資料。請確保發此連結的人是&l伺服器員工或開發者&c。", + "failed-to-put-sign": "&c你的商店周圍沒有足夠的空間,放置商店的資訊告示牌。", + "failed-to-paste": "&c無法將資料上傳至 Pastebin ,請檢查你的連線再重試。 (詳見控制台)", + "warn-to-paste": "&e正在收集資料並上傳到 Pastebin ,這可能需要一點時間。&c&l警告 : &c資料上傳後,此連結會公開一星期 ! 可能會洩漏伺服器中的設定或其它資料。請確保傳送此連結的人是 &l伺服器員工 或 開發者&c。", "price-too-high": "&c商店價格太高了 ! 請設定在 {0} 元以內。", - "you-cant-create-shop-in-there": "&c你沒有在這個地方創建商店的權限。", + "you-cant-create-shop-in-there": "&c你沒有在這個地方建立商店的權限。", "unknown-player": "&c找不到相對應的玩家,請檢查你輸入的玩家名稱是否正確。", - "shop-staff-cleared": "&a已經將所有員工從你的商店刪除。", - "shop-staff-added": "&a已經新增員工 {0} 到你的商店。", - "shop-staff-deleted": "&a成功從您的商店刪除員工 {0} 。", - "no-permission-build": "&c你無法在這裏創建商店。", + "shop-staff-cleared": "&a已將所有員工從你的商店刪除。", + "shop-staff-added": "&a已新增員工 {0} 到你的商店。", + "shop-staff-deleted": "&a成功從你的商店刪除員工 {0} 。", + "no-permission-build": "&c你沒有建立商店的權限。", "success-change-owner-to-server": "&a成功將商店擁有者轉交給伺服器。", - "flush-finished": "&a已經成功更新訊息。", + "flush-finished": "&a成功獲取所有的商店記錄 。", "purchase-failed": "&c交易失敗 : 發生錯誤,請聯繫伺服器管理員。", "no-pending-action": "&c你沒有待處理的操作", - "permission-denied-3rd-party": "&c存取被拒 : 第三方插件 [{0}]。", + "permission-denied-3rd-party": "&c權限被拒絕 : 第三方插件 [{0}]。", "shops-removed-in-world": "&e世界 &b{1} &e總共有 &b{0} &e個商店被刪除。", "world-not-exists": "&c世界 &e{0}&c 不存在", "menu": { @@ -87,9 +87,9 @@ "successfully-sold": "&a成功出售 : ", "item-name-and-price": "&a共 &e{2} &a元的 &e{0} &a個 &e{1}", "sell-tax": "&a你付了 &e{0} &a元的稅。", - "sell-tax-self": "&a因為您是商店主人所以不需要繳稅。", + "sell-tax-self": "&a因為你是商店主人,所以不需要繳稅。", "enchants": "&5附魔", - "stored-enchants": "&5已經有的附魔", + "stored-enchants": "&5附魔", "shop-information": "&a商店資訊 : ", "owner": "&a商店主人 : {0}", "item": "&a商品 : &e{0}", @@ -97,83 +97,83 @@ "preview": "&b[物品預覽]", "space": "&a空間 : &e{0}", "stock": "&a庫存 : &e{0}", - "price-per": "&a價格 : &e1個 {0} {1} 元", + "price-per": "&a價格 : &e1 個 {0} {1} 元", "price-per-stack": "&a價格 : &e{2} 個 {0} {1} 元", - "total-value-of-chest": "&a儲物箱中物品價值:&e{0} 元", - "damage-percent-remaining": "&a耐久值 : &e剩餘 {0}%。", + "total-value-of-chest": "&a儲物箱中的物品價值 : &e{0} 元", + "damage-percent-remaining": "&a耐久度 : &e剩餘 {0}%。", "this-shop-is-buying": "&a此商店是 &d收購物品&a 的商店。", - "this-shop-is-selling": "&a此商店是 &b出售物品&a 的商店。", - "shop-stack": "&a每份物品的數量:&e{0}", + "this-shop-is-selling": "&a此商店正在&b出售&a物品。", + "shop-stack": "&a每份物品的數量 : &e{0}", "effects": "&a藥水效果" }, - "bypassing-lock": "&c你使用繞過權限打開了一個上鎖的商店 !", - "that-is-locked": "&c此商店已經上鎖。", + "bypassing-lock": "&c你繞過了 Quickshop 鎖 !", + "that-is-locked": "&c此商店已上鎖。", "how-many-buy": "&a在聊天室中輸入你想要 &b購買 &a的數量,你可以購買 &e{0} &a個。輸入 &bALL &a購買全部。", "how-many-sell": "&a在聊天室中輸入你想要 &d出售 &a的數量,你有 &e{0} &a個可以出售。輸入 &bALL &a賣出全部。", - "not-allowed-to-create": "&c你無法在此創建商店。", - "blacklisted-item": "&c由於這是黑名單的物品您不能賣", - "how-much-to-trade-for": "&a請在聊天室中輸入您想交易的 &e{1}x {0} &a價格。", + "not-allowed-to-create": "&c你無法在此建立商店。", + "blacklisted-item": "&c由於這是黑名單的物品,所以你不能賣。", + "how-much-to-trade-for": "&a請在聊天室中輸入你想交易的 &e{1}x {0} &a的價格。", "command": { "toggle-unlimited": { - "unlimited": "&a這個商店現在已經沒有數量限制", - "limited": "&a這個商店現在已經恢復數量限制" + "unlimited": "&a這個商店現在已沒有數量限制", + "limited": "&a這個商店現在已恢復數量限制" }, "transfer-success": "&a將&e {0} &a商店轉移到&e {1}", "transfer-success-other": "&a將&e {0} {1}&a的商店轉移到&e {2}", - "some-shops-removed": "&e{0} &a的商店已經刪除", + "some-shops-removed": "&e{0} &a的商店已刪除", "no-owner-given": "&c未指定新的商店店主", "new-owner": "&a新商店主人 : &e{0}", "now-buying": "&a商店正在 &d收購 &e{0}", "now-selling": "&a商店現在 &b出售 &e{0}", - "cleaning": "&a正在刪除沒有任何物品的商店...", - "reloading": "&a重新載入中...", - "cleaned": "&a已經刪除 &e{0} &a個商店。", - "no-type-given": "&c用法 : /qs find <物品>", + "cleaning": "&a正在刪除沒有任何物品的商店……", + "reloading": "&a重新載入中……", + "cleaned": "&a已刪除 &e{0} &a個商店。", + "no-type-given": "&c用法 : /qs find ", "no-world-given": "&c請指定世界名稱", - "bulk-size-not-set": "&c用法 : /qs size <數量>", + "bulk-size-not-set": "&c用法 : /qs size ", "bulk-size-now": "&a正在交易 &e{0} 個 {1}", "invalid-bulk-amount": "&c指定的值 {0} 大於最大堆疊或小於 1", "no-trade-item": "&a請在主手持有要修改的交易商品", "trade-item-now": "&a正在交易 &e{0} 個 {1}", - "no-amount-given": "&c沒有提供數量。請使用:&a/qs refill <數量>&c", - "now-debuging": "&a成功開啟開發者模式,插件重新載入中...", - "now-nolonger-debuging": "&a成功關閉開發者模式,插件重新載入中...", + "no-amount-given": "&c沒有提供數量。請使用 : &a/qs refill &c", + "now-debuging": "&a成功開啟開發者模式,插件重新載入中……", + "now-nolonger-debuging": "&a成功關閉開發者模式,插件重新載入中……", "wrong-args": "&c無效的參數。使用 &l/ qs help &c查看指令列表。 ", "description": { - "title": "&aQuickShop 幫助", - "unlimited": "&e設置商店為無限空間。", + "title": "&aQuickShop 說明", + "unlimited": "&e將商店設為庫存無限。", "setowner": "&e為商店設置新的店主。", "owner": "&e為商店設置新的店主。", "buy": "&e切換到 &d收購 &e模式", "sell": "&e切換到 &d出售 &e模式", "price": "&e切換 收購/出售 的價格", - "clean": "&e刪除所有 ( 已經載入 ) 沒有商品的商店", - "find": "&e找到距離你最近的買賣特定商品的商店", + "clean": "&e刪除所有 (已載入) 沒有商品的商店", + "find": "&e在附近搜尋具有指定物品類型的商店 。", "reload": "&e重新載入 QuickShop", "refill": "&e將一定數量的商品加到商店", "empty": "&e清空商店空間", "debug": "&e開啟開發者模式", - "create": "&e在目標儲物箱創建一個新商店", + "create": "&e在目標儲物箱建立新商店", "fetchmessage": "&e顯示未讀商店日誌", "info": "&e顯示 QuickShop 統計資料", "paste": "&e自動將伺服器資料傳送到 Pastebin 上", - "staff": "&e管理您的商店員工", + "staff": "&e管理你的商店員工", "remove": "&e刪除你注視的商店", - "amount": "&e設定物品數量(適用於聊天插件的問題)", - "about": "&e顯示關於 QuickShop 的訊息", - "help": "&e顯示 QuickShop 的幫助", + "amount": "&e設定物品數量 (適用於聊天插件的問題)", + "about": "&e顯示關於 QuickShop 的資訊", + "help": "&e顯示 QuickShop 說明", "item": "&e修改商店物品", "size": "&e修改每份物品的數量", - "supercreate": "&e創建一個略過所有保護檢查的商店", + "supercreate": "&e繞過所有保護檢查並建立商店", "language": "&e修改正在使用的語言", "removeall": "&e刪除該玩家的所有商店", "transfer": "&e我們將某人的所有商店轉移給其他人", - "removeworld": "&e指定世界的商店已經全部刪除", + "removeworld": "&e指定世界的商店已全部刪除", "currency": "&e設置或移除目前商店的貨幣", - "ban": "&eBanning a player from the shop", - "unban": "&eUnbanning a player from the shop", - "freeze": "&eDisable or Enable shop trading", - "lock": "&eSwitch the shop lock status" + "ban": "&e封禁商店中的玩家", + "unban": "&e解除封禁商店中的玩家", + "freeze": "&e停用或啟用商店交易", + "lock": "&e切換商店上鎖狀態" }, "disabled": "&c這個指令被停用 : &e{0}", "feature-not-enabled": "該功能沒有在 config 中啟用。" @@ -190,9 +190,9 @@ "unlimited": "無限", "status-available": "&a", "status-unavailable": "&c", - "out-of-stock": "Out of Stock", - "out-of-space": "Out of Space", - "freeze": "Trade disabled" + "out-of-stock": "無庫存", + "out-of-space": "空間不足", + "freeze": "已停用交易" }, "controlpanel": { "setowner": "&a店主 : &b{0} &e[&d&l修改&e]", @@ -202,26 +202,26 @@ "unlimited-hover": "&e點擊修改商店模式為無限。", "mode-selling": "&a商店模式 : &b出售 &e[&d&l修改&e]", "mode-selling-hover": "&e點擊商店修改為收購模式。", - "mode-buying": "&a商店模式:&b收購 &e[&d&l修改&e]", + "mode-buying": "&a商店模式 : &b收購 &e[&d&l修改&e]", "mode-buying-hover": "&e點擊商店修改為出售模式。", - "price": "&a價格:&b{0} &e[&d&l修改&e]", + "price": "&a價格 : &b{0} &e[&d&l修改&e]", "price-hover": "&e點擊修改商品價格。", - "refill": "&a補貨:重新填充商品 &e[&d&lOK&e]", + "refill": "&a補貨 : 重新填充商品 &e[&d&lOK&e]", "refill-hover": "&e點擊重新填充商品。", - "empty": "&a清空:刪除所有商品 &e[&d&lOK&e]", + "empty": "&a清空 : 刪除所有商品 &e[&d&lOK&e]", "empty-hover": "&e點擊清除商店內庫存。", "remove": "&c&l[刪除商店]", "remove-hover": "&e點擊刪除商店。", - "stack": "&a每份數量:&b{0} &e[&d&l修改&e]", + "stack": "&a每份數量 : &b{0} &e[&d&l修改&e]", "stack-hover": "&e點擊設置每份的物品數量。設置為 1 以恢復為普通單物品商店。", - "item": "&a商店物品:{0} &e[&d&l修改&e]", + "item": "&a商店物品 : {0} &e[&d&l修改&e]", "item-hover": "&e點擊修改商店物品", "currency": "&a目前 : &b{0} &e[&d&l設定&e]", "currency-hover": "&e點擊設置或移除目前正在使用的商店貨幣", - "lock": "&eShop lock: &b{0} &e[&d&lToggle&e]", - "lock-hover": "&eEnable/Disable shop lock protection.", - "freeze": "&eFreeze mode: &b{0} &e[&d&lToggle&e]", - "freeze-hover": "&eToggle shop freeze status," + "lock": "&e商店鎖 : &b{0} &e[&d&l切換&e]", + "lock-hover": "&e開啟/關閉商店鎖保護。", + "freeze": "&e凍結模式 : &b{0} &e[&d&l切換&e]", + "freeze-hover": "&e切換商店凍結狀態。" }, "tableformat": { "full_line": "+---------------------------------------------------+", @@ -244,26 +244,26 @@ "buttontitle": "[現在更新]", "onekeybuttontitle": "[一鍵更新]", "list": [ - "QuickShop {0} 已經正式發布。您還在使用 QuickShop {1}!", - "蹦!新的 QuickShop 版本 {0} 到來了。快更新!", - "驚喜!QuickShop {0} 出來了。您還在使用 QuickShop {1}", - "看來您需要更新。{0} 已經正式發布了。", - "噢!QuickShop {0} 已經正式發布了。您還在使用 QuickShop {1}!", - "我發誓,QS 已經更新到了 {0}。您怎麼還沒有更新?", - "修復並重新... 抱歉 QuickShop {0} 已經正式發布了!", - "錯誤!不,其實並沒有錯誤。QuickShop {0} 已經正式發布!", - "我的天啊!QuickShop {0} 已經出來了!您怎麼還在使用 QuickShop {1}?", - "今日新聞:QuickShop 已經正式發布 {0} 的更新!", - "插件已經陣亡。您應該要更新 QuickShop 到 {0}!", - "新的 QuickShop {0} 更新被點燃。保存更新!", - "新的更新指揮官 QuickShop {0} 剛剛上任了!", - "看看我的新風格--- QuickShop {0} 版本出來了,您還在使用 QuickShop {1} 版本", - "啊啊啊!是新的 QuickShop 版本 {0}!快更新!", - "您覺得呢?QuickShop {0} 已經正式發布!請更新!", - "博士,QuickShop 有新的更新 {0}!您應該更新~", - "Ko~ko~da~yo~(在這裡哦)QuickShop 有新的更新 {0} ~" + "QuickShop {0} 已正式發布,你還在使用 QuickShop {1} !", + "蹦 ! 新的 QuickShop 版本 {0} 到來了,快更新 !", + "驚喜 ! QuickShop {0} 出來了,你還在使用 QuickShop {1}。", + "看來你需要更新, QuickShop {0} 已正式發布了 !", + "噢 ! QuickShop {0} 已正式發布了,你還在使用 QuickShop {1} !", + "我保證, QS 已更新到了 {0}。你怎麼還沒有更新 ?", + "修復並重新…… 抱歉 QuickShop {0} 已正式發布了 !", + "錯誤 ! 不,其實並沒有錯誤,QuickShop {0} 已正式發布 !", + "我的天啊 ! QuickShop {0} 已出來了 ! 你怎麼還在使用 QuickShop {1} ?", + "今日新聞 : QuickShop 已正式發布 {0} 的更新 !", + "插件已陣亡,你應該要更新 QuickShop 到 {0} !", + "QuickShop 更新 {0} 發布了,現在就下載拯救更新吧 !", + "指揮官 , QuickShop 的新版本 {0} 發布了 !", + "看看我的新風格── QuickShop {0} 出來了,你還在使用 QuickShop {1}。", + "啊啊啊啊啊啊啊啊 ! QuickShop 更新 {0} 來了 ! 快更新 !", + "你在想什麼呢 ? QuickShop {0} 已正式發布 ! 請更新 !", + "博士, QuickShop 有一個新的更新 {0} ! 你應該考慮一下更新了~", + "Ko~ko~da~yo~ QuickShop 有新的更新 {0} ~" ], - "remote-disable-warning": "&c該版本的 QuickShop 已被遠程服務器標記為停用,這意味著該版本可能存在嚴重問題,請從我們的 Spigot 插件頁面獲取詳細訊息 : {0}。在你切換到穩定版本之前,該警告將繼續出現,但不會影響伺服器的性能。 ", + "remote-disable-warning": "&c該版本的 QuickShop 已被遠端伺服器標記為停用,這意味著該版本可能存在嚴重問題,請從我們的 Spigot 插件頁面取得詳細資訊 : {0}。在你切換到穩定版本之前,該警告將繼續出現,但不會影響伺服器的性能。", "label": { "unstable": "[不穩定 Unstable]", "stable": "[穩定 Stable]", @@ -272,48 +272,49 @@ "github": "[GitHub]", "spigotmc": "[SpigotMC]", "bukkitdev": "[BukkitDev]", - "master": "[Master]" + "master": "[主要分支 Master]" } }, - "shop-removed-cause-ongoing-fee": "&c你在 {0} 的商店已經被刪除了,因為你沒有足夠的資金去維護它!", - "digits-reach-the-limit": "&c您的價格超過小數點後位數上限。", - "complete": "&a完成!", + "shop-removed-cause-ongoing-fee": "&c你在 {0} 的商店已被刪除了,因為你沒有足夠的資金去維護它 !", + "digits-reach-the-limit": "&c你的價格超過小數點後位數上限。", + "complete": "&a完成 !", "quickshop-gui-preview": "儲物箱商店物品介面預覽", - "shops-recovering": "正在嘗試從備份檔案中還原所有商店...", - "shops-backingup": "正在把商店資料備份到資料庫...", - "saved-to-path": "備份檔案已經被儲存到 {0}。", + "shops-recovering": "正在嘗試從備份檔案中還原所有商店……", + "shops-backingup": "正在把商店資料備份到資料庫……", + "saved-to-path": "備份檔案已被儲存到 {0}。", "backup-failed": "無法備份商店資料庫,試著查看控制台來檢視錯誤。", - "translate-not-completed-yet-click": "{0} 的翻譯完成度為 {1},您想幫助我們改進翻譯嗎?點擊這裡!", - "translate-not-completed-yet-url": "{0} 的翻譯完成度為 {1},您想幫助我們改進翻譯嗎?前往Crowdin:{2}", + "translate-not-completed-yet-click": "{0} 的翻譯完成度為 {1},你想幫助我們改進翻譯嗎 ? 點擊這裡 !", + "translate-not-completed-yet-url": "{0} 的翻譯完成度為 {1},你想幫助我們改進翻譯嗎 ? 前往 Crowdin : {2}", "language-info-panel": { - "name": "語言:", - "code": "代碼:", - "progress": "進度:", - "help": "幫助我們:", + "name": "語言 : ", + "code": "代碼 : ", + "progress": "進度 : ", + "help": "幫助我們 : ", "translate-on-crowdin": "[在 Crowdin 上翻譯]" }, - "shop-now-freezed": "&a您已經凍結了商店。現在沒有人可以與這家商店交易!", - "shop-nolonger-freezed": "&a您解凍了該商店。現在恢復正常!", - "shop-cannot-trade-when-freezing": "&c您不能與這家商店交易,因為它已經被凍結。", - "shop-freezed-at-location": "&e您的商店 {0} 在 {1} 被凍結!", - "denied-put-in-item": "&c您不能將此物品放入您的商店!", - "how-many-buy-stack": "&a在聊天室中輸入您想 &b買&a 的數量。每份中有 &e{0}&a 個該物品,您目前可以買 &e{1}&a 份。輸入 &ball&a 以買下所有該物品。", - "how-many-sell-stack": "&a在聊天室中輸入您想 &d賣&a 的數量。每份中有 &e{0}&a 個該物品,您目前擁有 &e{1}&a 份這樣的物品可賣出.。輸入 &ball&a 以賣出所有該物品。", + "shop-now-freezed": "&a你已凍結了商店,現在沒有人可以與這間商店交易 !", + "shop-nolonger-freezed": "&a你解凍了該商店,現在已恢復正常 !", + "shop-cannot-trade-when-freezing": "&c你不能與這間商店交易,因為它已被凍結。", + "shop-freezed-at-location": "&e你在 {1} 的商店 {0} 被凍結了 !", + "denied-put-in-item": "&c你不能將此物品放入你的商店 !", + "how-many-buy-stack": "&a在聊天室中輸入你想 &b購買&a 的數量,每份中有 &e{0}&a 個物品,你目前可以買 &e{1}&a 份。輸入 &bAll&a 來購買所有物品。", + "how-many-sell-stack": "&a在聊天室中輸入你想 &b售出&a 的數量,每份中有 &e{0}&a 個物品,你目前可以售出 &e{1}&a 份。輸入 &bAll&a 來售出所有物品。", "language": { - "name": "&e名稱:&6{0}", - "code": "&e代碼:&6{0}", - "translate-progress": "&e翻譯進度:&b{0}%", - "approval-progress": "&e批准進度:&b{0}%", - "qa-issues": "&e品質認證問題:&b{0}%", + "name": "&e名稱 : &6{0}", + "code": "&e代碼 : &6{0}", + "translate-progress": "&e翻譯進度 : &b{0}%", + "approval-progress": "&e批准進度 : &b{0}%", + "qa-issues": "&e品質認證問題 : &b{0}%", "help-us": "&a[幫助我們提升翻譯品質]" }, "currency-not-exists": "&c找不到你要設置的貨幣。可能拼寫錯誤或該貨幣在這個世界上無法使用。", "currency-set": "&a商店貨幣成功設置為 {0}。 ", "currency-unset": "&a已成功刪除商店貨幣。現在使用預設設置。 ", - "currency-not-support": "&c該經濟插件不支援多經濟( multi-economy ) 功能。", + "currency-not-support": "&c該經濟插件不支援多重經濟(multi-economy) 功能。", "item-not-exist": "&c物品&e {0}&c不存在,請檢查你的拼寫。 ", "backup-success": "&a備份成功。", "console-only": "&c該指令只能在控制台執行。", "console-only-danger": "&c這是一個危險的指令,因此只能由控制台執行。 ", - "clean-warning": "&e如果商店在不允許的世界中損壞或創建或出售/購買不允許的物品並且&c&lIN未裝載的世界商店&e,此指令將清除&c所有的&e商店,請確保你已完全備份商店數據並使用 &b/qs cleanghost cleanghost confirm &e繼續。 " -} \ No newline at end of file + "clean-warning": "&e此指令將清除&c&未裝載的世界商店&e及&c所有&e已損壞的、在不允許的世界中建立、或購買/販賣不允許商品的商店,請確保你已完全備份商店數據並使用 &b/qs cleanghost confirm &e以繼續。", + "shop-creation-failed": "&c商店建立失敗,請與伺服器管理員聯繫。" +} diff --git a/src/main/resources/license/plugman.txt b/src/main/resources/license/plugman.txt new file mode 100644 index 000000000..17a4ab06b --- /dev/null +++ b/src/main/resources/license/plugman.txt @@ -0,0 +1,25 @@ +/* + * #%L + * PlugMan + * %% + * Copyright (C) 2010 - 2014 PlugMan + * %% + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * #L% + */ \ No newline at end of file diff --git a/src/main/resources/license/quickshop.txt b/src/main/resources/license/quickshop.txt new file mode 100644 index 000000000..e72bfddab --- /dev/null +++ b/src/main/resources/license/quickshop.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/src/main/resources/license/worldedit.txt b/src/main/resources/license/worldedit.txt new file mode 100644 index 000000000..fdde82e10 --- /dev/null +++ b/src/main/resources/license/worldedit.txt @@ -0,0 +1,18 @@ +/* + * WorldEdit, a Minecraft world manipulation toolkit + * Copyright (C) sk89q + * Copyright (C) WorldEdit team and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index efbeda227..213888938 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -4,8 +4,6 @@ version: ${project.version} authors: [PotatoCraft Studio, Netherfoam, Timtower, KaiNoMood, Ghost_chu, Mgazul, TiaraRinne, sandtechnology] description: Economy Shops plugin -#softdepend: [Herochat, Vault, Essentials, OpenInv] OLD Remove Herochat support. -#Now we only need Vault. softdepend: - Vault - Reserve @@ -29,6 +27,7 @@ softdepend: - GriefPrevention - JulySafe - FabledSkyblock + - OpenInv api-version: 1.13 @@ -40,132 +39,132 @@ commands: permissions: quickshop.create.sell: - description: Allows a player to sell from a shop + description: Allows a player to sell from a shop. default: op quickshop.create.buy: - description: Allows a player to buy from a shop + description: Allows a player to buy from a shop. default: op quickshop.create.double: - description: Allows a player to create a double shop + description: Allows a player to create a double shop. default: op quickshop.create.changeprice: - description: Allow a player to change their shop's price + description: Allows a player to change their shop's price. default: op quickshop.create.cmd: - description: Allow a player to use /qs create to create a shop + description: Allows a player to use /qs create to create a shop. default: op quickshop.create.admin: - description: Allow a player use /qs supercreate to create a shop bypass all protection checks + description: Allows a player use /qs supercreate to create a shop that bypasses all protection checks. default: op quickshop.create.changeitem: - description: Allow a player to change their shop's item + description: Allows a player to change their shop's item. default: op quickshop.create.changeamount: - description: Allow a player to change their shop's per bulk amount + description: Allows a player to change their shop's item amount per trade. default: op quickshop.create.stacks: - description: Allow a player to create a shop with stack items + description: Allows a player to create a shop with stacked items. default: op quickshop.use: - description: Allows a player to buy/sell using other players shops + description: Allows a player to buy/sell using other player's shops. default: true quickshop.unlimited: - description: Allows a Staff Member to use /qs unlimited and make a shop infinite + description: Allows a staff member to use /qs unlimited to make a shop infinite. default: op quickshop.bypass.: - description: Allows a player to sell , even if its blacklisted + description: Allows a player to sell blacklisted . default: op quickshop.other.destroy: - description: Allows a Staff Member to destroy other players shops if they are locked in the config + description: Allows a staff member to destroy other player's shops even if they are locked. default: op quickshop.other.control: - description: Allows a Staff Member to open control panel for other players shop + description: Allows a staff member to open the control panel for other player's shops. default: op quickshop.other.open: - description: Allows a Staff Member to open someone elses shop if they are locked in the config + description: Allows a staff member to open someone else's shop even if it is locked. default: op quickshop.other.price: - description: Allows a Staff Member to change the price of someone elses shop + description: Allows a staff member to change the price of someone else's shop. default: op quickshop.other.item: - description: Allows a Staff Member to change the item of someone elses shop + description: Allows a staff member to change the item of someone else's shop. default: op quickshop.other.amount: - description: Allows a Staff Member to change the per bulk amount of someone elses shop + description: Allows a staff member to change the item amount per trade of someone else's shop. default: op quickshop.setowner: - description: Allows a Staff Member to change the owner of any shop + description: Allows a staff member to change the owner of any shop. default: op quickshop.staff: - description: Allow a shop owner to add staff to the shop + description: Allows a shop owner to manage their shop staff. default: op quickshop.find: - description: Allows a player to locate the nearest shop that has a specific item type. Works in a 3 chunk radius. + description: Allows a player to locate the nearest shop that has a specific item type. Distance configurable in config. default: true quickshop.refill: - description: Allows a Staff Member to refill the shop theyre looking at with the given number of items. + description: Allows a staff member to refill the shop they're looking at with the given number of items. default: op quickshop.empty: - description: Allows a Staff Member to empty the shop theyre looking at of all items. + description: Allows a staff member to empty the shop they're looking at of all items. default: op quickshop.debug: - description: Switch to or from developer mode + description: Enables developer mode. default: op quickshop.export: - description: Allows exporting the database to a plain file + description: Allows exporting the database to a plain file. default: op quickshop.alerts: - description: Recive cheat alert, plugin warnings and update notify + description: Recieve cheat alerts, plugin warnings and update notifications. default: op quickshop.about: - description: Show QuickShop about message + description: Show QuickShop's about message. default: true quickshop.info: - description: Show QuickShop Statistics. + description: Show QuickShop's Statistics. default: op quickshop.fetchmessage: - description: Use command /qs fetchmessage to manual fetch shop message from database. Will not effect auto fetch if you have it on... + description: Allows the use of the /qs fetchmessage command to manually fetch shop messages from the database. Will not effect auto fetch if turned on... default: true quickshop.paste: - description: Command to upload server information to Pastebin. !WARNING, This will upload your data and it may leak your server configuration and other sensitive information. + description: Allows the use of the /qs paste command to upload server information to Pastebin. !WARNING! This will upload your data and may leak your server configuration and other sensitive information. default: op quickshop.preview: - description: Permission for preview item to use a GUI + description: Permission to preview item using a GUI. default: true quickshop.tax: - description: Permission to bypass Tax + description: Permission to bypass taxes. default: op quickshop.tax.bypassunlimited: - description: Permission to bypass Tax but only for unlimited shop + description: Permission to bypass taxes but for unlimited shops ONLY. default: op quickshop.cleanghost: - description: Permission to use /qs cleanghost + description: Permission to use /qs cleanghost. default: op quickshop.reset: - description: Permission to use /qs reset + description: Permission to use /qs reset. default: op quickshop.bypasscreatefee: - description: Permission to bypass creation fee + description: Permission to bypass the creation fee. default: op quickshop.recovery: - description: Permission to use /qs recovery, WARNING DO NOT EXECUTE THIS COMMAND IF YOU DID NOT KNOW WHAT WILL HAPPEND + description: Permission to use /qs recovery. !WARNING! DO NOT EXECUTE THIS COMMAND IF YOU DON'T KNOW WHAT YOU'RE DOING. default: op quickshop.removeall.other: - description: Permission to use /qs removeall to remove other player shops + description: Permission to use /qs removeall to remove other player's shops. default: op quickshop.removeall.self: - description: Permission to use /qs removeall to remove player himself shops + description: Permission to use /qs removeall to remove player's own shops. default: op quickshop.removeworld: - description: Permission to us /qs removeworld + description: Permission to use /qs removeworld. default: op quickshop.currency: - description: Permission to us /qs currency + description: Permission to use /qs currency. default: op quickshop.other.currency: - description: Permission to us /qs currency but use for others shop + description: Permission to use /qs currency but for other's shops. default: op quickshop.showdisabled: - description: Permission to see commands in help list if commands are disabled + description: Permission to see disabled commands in help list. default: op diff --git a/src/test/java/org/maxgamer/quickshop/util/mojangapi/MojangAPITest.java b/src/test/java/org/maxgamer/quickshop/util/mojangapi/MojangAPITest.java index ac05e4ae0..1ad249fc7 100644 --- a/src/test/java/org/maxgamer/quickshop/util/mojangapi/MojangAPITest.java +++ b/src/test/java/org/maxgamer/quickshop/util/mojangapi/MojangAPITest.java @@ -22,21 +22,26 @@ package org.maxgamer.quickshop.util.mojangapi; import org.junit.Assert; import org.junit.Test; +import java.util.Optional; + public class MojangAPITest { @Test - public void testMojangMetaApi(){ + public void testMojangMetaApi() { MojangAPI api = new MojangAPI(); - Assert.assertTrue(api.getMetaAPI("1.16.5").get().isPresent()); - Assert.assertFalse(api.getMetaAPI("1.16.5").get().get().isEmpty()); + Optional metaData = api.getMetaAPI("1.16.5").get(); + Assert.assertTrue(metaData.isPresent()); + Assert.assertFalse(metaData.get().isEmpty()); } @Test - public void testMojangAssetsApi(){ + public void testMojangAssetsApi() { MojangAPI api = new MojangAPI(); - Assert.assertTrue(api.getAssetsAPI("1.16.5").isAvailable()); - Assert.assertTrue(api.getAssetsAPI("1.16.5").getGameAssetsFile().isPresent()); - Assert.assertFalse(api.getAssetsAPI("1.16.5").getGameAssetsFile().get().getContent().isEmpty()); - Assert.assertFalse(api.getAssetsAPI("1.16.5").getGameAssetsFile().get().getId().isEmpty()); - Assert.assertFalse(api.getAssetsAPI("1.16.5").getGameAssetsFile().get().getSha1().isEmpty()); + MojangAPI.AssetsAPI assetsAPI = api.getAssetsAPI("1.16.5"); + Assert.assertTrue(assetsAPI.isAvailable()); + Optional assetsFileData = assetsAPI.getGameAssetsFile(); + Assert.assertTrue(assetsFileData.isPresent()); + Assert.assertFalse(assetsFileData.get().getContent().isEmpty()); + Assert.assertFalse(assetsFileData.get().getId().isEmpty()); + Assert.assertFalse(assetsFileData.get().getSha1().isEmpty()); } } \ No newline at end of file