From 30b2ec265f1f5a1e3568b4b3e75c9debc069b804 Mon Sep 17 00:00:00 2001
From: Ghost_chu <2908803755@qq.com>
Date: Thu, 18 Nov 2021 19:54:13 +0800
Subject: [PATCH 001/725] Allow addon to hook the Inventory getting
---
.../api/event/ShopInventoryEvent.java | 75 +++++++++++++++++++
.../quickshop/shop/ContainerShop.java | 9 ++-
2 files changed, 82 insertions(+), 2 deletions(-)
create mode 100644 src/main/java/org/maxgamer/quickshop/api/event/ShopInventoryEvent.java
diff --git a/src/main/java/org/maxgamer/quickshop/api/event/ShopInventoryEvent.java b/src/main/java/org/maxgamer/quickshop/api/event/ShopInventoryEvent.java
new file mode 100644
index 0000000000..708ae972c5
--- /dev/null
+++ b/src/main/java/org/maxgamer/quickshop/api/event/ShopInventoryEvent.java
@@ -0,0 +1,75 @@
+/*
+ * This file is a part of project QuickShop, the name is ShopInventoryEvent.java
+ * Copyright (C) PotatoCraft Studio 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 .
+ *
+ */
+
+package org.maxgamer.quickshop.api.event;
+
+import org.bukkit.inventory.Inventory;
+import org.jetbrains.annotations.NotNull;
+import org.maxgamer.quickshop.api.shop.Shop;
+
+/**
+ * Calling when shop inventory be got and for using
+ */
+public class ShopInventoryEvent extends AbstractQSEvent {
+
+ @NotNull
+ private final Shop shop;
+ @NotNull
+ private Inventory inventory;
+
+ /**
+ * Call when shop was clicked.
+ *
+ * @param shop The shop bought from
+ */
+ public ShopInventoryEvent(@NotNull Shop shop, @NotNull Inventory inventory) {
+ this.shop = shop;
+ this.inventory = inventory;
+
+ }
+
+ /**
+ * Getting the Inventory that shop be used
+ *
+ * @return The inventory
+ */
+ @NotNull
+ public Inventory getInventory() {
+ return inventory;
+ }
+
+ /**
+ * Sets the Inventory
+ *
+ * @param inventory new inventory for shop for this time.
+ * It is not persis.
+ */
+ public void setInventory(@NotNull Inventory inventory) {
+ this.inventory = inventory;
+ }
+
+ /**
+ * Getting the shops that clicked
+ *
+ * @return Clicked shop
+ */
+ public @NotNull Shop getShop() {
+ return this.shop;
+ }
+}
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index 1c66527c5a..c919dcc2fb 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -1295,11 +1295,12 @@ public AbstractDisplayItem getDisplayItem() {
public @Nullable Inventory getInventory() {
Util.ensureThread(false);
BlockState state = PaperLib.getBlockState(location.getBlock(), false).getState();
+ Inventory inv = null;
try {
if (state.getType() == Material.ENDER_CHEST
&& plugin.getOpenInvPlugin() != null) { //FIXME: Need better impl
OpenInv openInv = ((OpenInv) plugin.getOpenInvPlugin());
- return openInv.getSpecialEnderChest(
+ inv = openInv.getSpecialEnderChest(
Objects.requireNonNull(
openInv.loadPlayer(
plugin.getServer().getOfflinePlayer(this.moderator.getOwner()))),
@@ -1313,7 +1314,7 @@ public AbstractDisplayItem getDisplayItem() {
InventoryHolder container;
try {
container = (InventoryHolder) state;
- return container.getInventory();
+ inv = container.getInventory();
} catch (Exception e) {
if (!createBackup) {
createBackup = Util.backupDatabase();
@@ -1328,6 +1329,10 @@ public AbstractDisplayItem getDisplayItem() {
"Inventory doesn't exist anymore: " + this + " shop was removed.");
return null;
}
+
+ ShopInventoryEvent event = new ShopInventoryEvent(this, inv);
+ event.callEvent();
+ return event.getInventory();
}
/**
From d65e576c9153079f2df88aeadb13681b79c6a2b7 Mon Sep 17 00:00:00 2001
From: Ghost_chu <2908803755@qq.com>
Date: Thu, 18 Nov 2021 21:41:15 +0800
Subject: [PATCH 002/725] bump ver
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 24d2d33079..0d3549c1b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
QuickShop
- 5.0.0.16
+ 5.0.0.17
org.maxgamer.quickshop
Ghost-chu
UTF-8
From 492864c71674b768d17e591e2e734c94a8ed653b Mon Sep 17 00:00:00 2001
From: Ghost_chu <30802565+Ghost-chu@users.noreply.github.com>
Date: Fri, 19 Nov 2021 02:58:53 +0800
Subject: [PATCH 003/725] New translations messages.json (Dutch)
---
crowdin/lang/nl-NL/messages.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crowdin/lang/nl-NL/messages.json b/crowdin/lang/nl-NL/messages.json
index 05b61b7b7f..0b0ab273e5 100644
--- a/crowdin/lang/nl-NL/messages.json
+++ b/crowdin/lang/nl-NL/messages.json
@@ -97,7 +97,7 @@
"item-holochat-error": "&c[Error]",
"preview": "&b[Item voorbeeld]",
"space": "&aSpatie: &e{0}",
- "stock": "&aVoorraad &{0}",
+ "stock": "&aVoorraad &e{0}",
"price-per": "&aPrice per &e{0} &a- &e{1}",
"price-per-stack": "&aPrice per &e{2}x {0} - {1}",
"total-value-of-chest": "&aTotale waarde van kist: &e{0}",
From 900efca956f86d11bce39e0c106d03e35b0fcb6c Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Tue, 23 Nov 2021 11:14:25 +0800
Subject: [PATCH 004/725] Update config.yml
---
.github/ISSUE_TEMPLATE/config.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index b63dfe5495..74a56f8d0a 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,4 +1,4 @@
-blank_issues_enabled: false
+blank_issues_enabled: true
contact_links:
- name: 'Development Builds'
about: |-
@@ -7,10 +7,10 @@ contact_links:
url: 'https://ci.codemc.io/job/Ghost-chu/job/QuickShop-Reremake-SNAPSHOT/'
- name: 'Feature Requests'
about: 'Use our discussions page to request changes towards QuickShop.'
- url: 'https://github.com/Ghost-chu/QuickShop-Reremake/discussions/categories/ideas'
+ url: 'https://github.com/PotatoCraft-Studio/QuickShop-Reremake/discussions/categories/ideas'
- name: 'Wiki'
about: 'Find info about QuickShop in our dedicated wiki.'
- url: 'https://github.com/Ghost-chu/QuickShop-Reremake/wiki'
+ url: 'https://github.com/PotatoCraft-Studio/QuickShop-Reremake/wiki'
- name: 'Discord'
about: 'Join our Discord to ask questions and get fast support.'
url: 'https://discord.gg/bfefw2E'
From 4c28220509541623c332fbcb4174cc5e774ec135 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 23 Nov 2021 03:26:59 +0000
Subject: [PATCH 005/725] Bump sqlite-jdbc from 3.34.0 to 3.36.0.3
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.34.0 to 3.36.0.3.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.34.0...3.36.0.3)
---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 0d3549c1b4..8dd3435f54 100644
--- a/pom.xml
+++ b/pom.xml
@@ -555,7 +555,7 @@
org.xerial
sqlite-jdbc
- 3.34.0
+ 3.36.0.3
test
From 9d60f1b8803c43d0598c03ba2c341cc5ceebe3b3 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 23 Nov 2021 03:33:29 +0000
Subject: [PATCH 006/725] Bump okhttp from 4.9.2 to 4.9.3
Bumps [okhttp](https://github.com/square/okhttp) from 4.9.2 to 4.9.3.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.9.2...parent-4.9.3)
---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 0d3549c1b4..3d548f0691 100644
--- a/pom.xml
+++ b/pom.xml
@@ -826,7 +826,7 @@
com.squareup.okhttp3
okhttp
- 4.9.2
+ 4.9.3
compile
From 2d0c2fcf1f25ece2bc3c8b4480f0426e84942b69 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 23 Nov 2021 12:22:47 +0800
Subject: [PATCH 007/725] Fix broken readme
---
README.md | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 02bebaa545..3ae1f49c72 100644
--- a/README.md
+++ b/README.md
@@ -23,9 +23,10 @@ from [KaiKikuchi's QuickShop upstream repository](https://github.com/KaiKikuchi/
## Support
-|
-|
-| | :-: | :-: | | **Discord** | **Github Issues** |
+|
|
|
+| :---: | :---: |
+| [**Discord**](https://discord.gg/bfefw2E) | [**Github
+Issues**](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues) |
## Features
@@ -49,7 +50,7 @@ from [KaiKikuchi's QuickShop upstream repository](https://github.com/KaiKikuchi/
## Downloads
|
|
|
|
- | --- | --- | --- | --- |
+ | :---: | :---: | :---: | :---: |
| **Spigot** | **BukkitDev** | **MCBBS** | **Jenkins** |
## Contribute
@@ -61,10 +62,9 @@ number. Thank you very much!
To compile the QuickShop and debug it by yourself, please follow these steps:
-0. Make sure you're using Java16 JDK in your PATH.
-1. Compile sub-project: `cd ./src/integration/plotsquared/5 && mvn install && cd ../../../../`
-2. Compile main-project without signature by using debug proile: `mvn install -Pdebug`
-3. Start your server with extra flag to skip the QuickShop signature
+0. Make sure you're using Java16 JDK in your PATH. 1.Compile main-project without signature by using debug
+ proile: `mvn install -Pdebug`
+ 2.Start your server with extra flag to skip the QuickShop signature
checks: `-Dorg.maxgamer.quickshop.util.envcheck.skip.SIGNATURE_VERIFY`
## Maven
From 5b6287ecadeb244366e800ee55b02272ac9fe7b2 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 23 Nov 2021 12:25:33 +0800
Subject: [PATCH 008/725] Fix broken readme again
---
README.md | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 3ae1f49c72..eaa27db1b5 100644
--- a/README.md
+++ b/README.md
@@ -25,8 +25,7 @@ from [KaiKikuchi's QuickShop upstream repository](https://github.com/KaiKikuchi/
|
|
|
| :---: | :---: |
-| [**Discord**](https://discord.gg/bfefw2E) | [**Github
-Issues**](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues) |
+| [**Discord**](https://discord.gg/bfefw2E) | [**Github Issues**](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues) |
## Features
@@ -55,16 +54,16 @@ Issues**](https://github.com/PotatoCraft-Studio/QuickShop-Reremake/issues) |
## Contribute
-[]()If you're a developer, you can contribute to the QuickShop code! Just make a fork and install the Lombok plugin,
+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!
To compile the QuickShop and debug it by yourself, please follow these steps:
-0. Make sure you're using Java16 JDK in your PATH. 1.Compile main-project without signature by using debug
- proile: `mvn install -Pdebug`
- 2.Start your server with extra flag to skip the QuickShop signature
+0. Make sure you're using Java16 JDK in your PATH.
+1. Compile main-project without signature by using debug profile: `mvn install -Pdebug`
+2. Start your server with extra flag to skip the QuickShop signature
checks: `-Dorg.maxgamer.quickshop.util.envcheck.skip.SIGNATURE_VERIFY`
## Maven
From 0b47d617971cb927cc8dfbf18a53114700fba698 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 23 Nov 2021 18:10:23 +0800
Subject: [PATCH 009/725] [FactionUUID] Drop support for 0.5.x and support
0.6.x
---
pom.xml | 30 ++-----------------
.../factionsuuid/FactionsUUIDIntegration.java | 11 ++++---
2 files changed, 10 insertions(+), 31 deletions(-)
diff --git a/pom.xml b/pom.xml
index 0d3549c1b4..c652935d1b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -667,36 +667,12 @@
com.massivecraft
Factions
- 1.6.9.5-U0.5.21
+ 1.6.9.5-U0.6.0
provided
- gson
- com.google.code.gson
-
-
- fluent-hc
- org.apache.httpcomponents
-
-
- configurate-core
- org.spongepowered
-
-
- guava
- com.google.guava
-
-
- paste-gg-api
- org.kitteh
-
-
- paperlib
- io.papermc
-
-
- particleeffect
- com.darkblade12
+ *
+ *
diff --git a/src/main/java/org/maxgamer/quickshop/integration/factionsuuid/FactionsUUIDIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/factionsuuid/FactionsUUIDIntegration.java
index 99ffdb7f30..68ae2dfdca 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/factionsuuid/FactionsUUIDIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/factionsuuid/FactionsUUIDIntegration.java
@@ -24,6 +24,7 @@
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.Faction;
import com.massivecraft.factions.perms.PermissibleAction;
+import com.massivecraft.factions.perms.PermissibleActionRegistry;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
@@ -122,7 +123,8 @@ private void init() {
}
private boolean check(@NotNull Player player, @NotNull Location location, boolean createRequireOpen, boolean createRequireSafeZone, boolean createRequirePermanent, boolean createRequirePeaceful, boolean createRequireWilderness, boolean createRequireWarZone, boolean createRequireNormal, boolean createRequireOwn, List createFlags, boolean whiteList) {
- Faction faction = Board.getInstance().getFactionAt(new FLocation(location));
+ FLocation fLocation = new FLocation(location);
+ Faction faction = Board.getInstance().getFactionAt(fLocation);
if (faction == null) {
return !whiteList;
}
@@ -151,12 +153,13 @@ private boolean check(@NotNull Player player, @NotNull Location location, boolea
return false;
}
if (createRequireOwn
- && !faction.getOwnerList(new FLocation(location)).contains(player.getName())) {
+ && !faction.getOwnerList(fLocation).contains(player.getName())) {
return false;
}
+
for (String flag : createFlags) {
- if (!faction.hasAccess(
- FPlayers.getInstance().getByPlayer(player), PermissibleAction.fromString(flag))) {
+ PermissibleAction permissibleAction = PermissibleActionRegistry.get(flag);
+ if (permissibleAction != null && !faction.hasAccess(FPlayers.getInstance().getByPlayer(player), permissibleAction, fLocation)) {
return false;
}
}
From 790afda0c2a447571ba01b65fd808d439499f952 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Tue, 23 Nov 2021 23:55:22 +0800
Subject: [PATCH 010/725] New translations messages.json (English)
---
crowdin/lang/en-US/messages.json | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/crowdin/lang/en-US/messages.json b/crowdin/lang/en-US/messages.json
index 7c7e819350..50de1bf7fb 100644
--- a/crowdin/lang/en-US/messages.json
+++ b/crowdin/lang/en-US/messages.json
@@ -12,8 +12,8 @@
"integrations-check-failed-create": "&cIntegration {0} denied the shop-creation",
"integrations-check-failed-trade": "&cIntegration {0} denied the Shop trading",
"3rd-plugin-build-check-failed": "&c3rd-party plugin &l{0}&r&c denied the permission checks, did you have permission set up in there?",
- "no-creative-break": "&cYou cannot break other players shops in creative mode, switch to survival mode or try to use the supertool {0} instead.",
- "trading-in-creative-mode-is-disabled": "&cYou cannot trade with this shop while being in creative mode.",
+ "no-creative-break": "&cYou cannot break the shops of other players while in creative mode. Switch to survival mode or try to use the supertool {0} instead.",
+ "trading-in-creative-mode-is-disabled": "&cYou cannot trade with this shop while in creative mode.",
"supertool-is-disabled": "&cSupertool is disabled. Cannot break any shops.",
"no-double-chests": "&cYou cannot create a double chest shop.",
"not-managed-shop": "&cYou are not the owner nor moderator of this Shop",
@@ -22,7 +22,7 @@
"price-too-cheap": "&cPrice must be greater than &e${0}",
"no-price-change": "&cThis wouldn't result in a price change!",
"you-cant-afford-a-new-shop": "&cIt costs {0} to create a new shop.",
- "player-bought-from-your-store-tax": "&c{0} purchased {1} {2} from your shop, and you earned {3} ({4} in taxes).",
+ "player-bought-from-your-store-tax": "&a{0} purchased{1} {2} from your shop and you earned {3} ({4} in taxes).",
"you-cant-afford-to-change-price": "&cIt costs {0} to change the price in your shop.",
"success-created-shop": "&aShop created.",
"success-removed-shop": "&aShop removed.",
@@ -35,13 +35,13 @@
"not-a-number": "&cYou can only input a number, your input was {0}.",
"exceeded-maximum": "&cThe value exceeded the maximum value in Java.",
"not-a-integer": "&cYou must input an integer, your input was {0}.",
- "player-bought-from-your-store": "&c{0} purchased {1} {2} from your shop, and you earned {3}.",
+ "player-bought-from-your-store": "&a{0} purchased {1} {2} from your shop, and you earned {3}.",
"shop-out-of-stock": "&5Your shop at {0}, {1}, {2} has run out of {3}!",
"shop-has-no-space": "&cThe shop only has room for {0} more {1}.",
"you-dont-have-that-many-items": "&cYou only have {0} {1}.",
- "the-owner-cant-afford-to-buy-from-you": "&cThis costs {0}, but the shop-owner only has {1}",
+ "the-owner-cant-afford-to-buy-from-you": "&cThis item is worth {0}, but the shop-owner only has {1}",
"player-sold-to-your-store": "&a{0} sold {1} {2} to your shop.",
- "shop-out-of-space": "&5Your shop at {0}, {1}, {2} is now full.",
+ "shop-out-of-space": "&5Your shop at {0}, {1}, {2} is full!",
"fee-charged-for-price-change": "&aYou paid &c{0}&a to change the price.",
"price-is-now": "&aThe new price of the shop is &e{0}",
"thats-not-a-number": "&cInvalid number",
From 79cf51b2aa6b8878be31d5626027f96cb8153a2d Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Wed, 24 Nov 2021 10:50:11 +0800
Subject: [PATCH 011/725] New translations messages.json (Korean)
---
crowdin/lang/ko-KR/messages.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/crowdin/lang/ko-KR/messages.json b/crowdin/lang/ko-KR/messages.json
index 60df8f2c7d..0f07393804 100644
--- a/crowdin/lang/ko-KR/messages.json
+++ b/crowdin/lang/ko-KR/messages.json
@@ -179,7 +179,7 @@
"lock": "상점 잠금 상태 전환",
"taxaccount": "&e쇼핑에서 사용하는 세금 계정 설정",
"toggledisplay": "&e상점 표시 항목 상태 전환",
- "purge": "&eStart the shop purge task in background"
+ "purge": "&a백그라운드에서 상점 정리 작업을 시작합니다"
},
"disabled": "&c이 명령어는 비활성화 되어있습니다: &e{0}",
"feature-not-enabled": "이옵션은 컨피그에서 비활성 상태입니다"
@@ -229,8 +229,8 @@
"lock-hover": "&e상점 잠금 보호를 활성화/비활성화 합니다. ",
"freeze": "&e동결 상태: &b{0} &e[&d&l전환&e]",
"freeze-hover": "&e상점 동결 상태 전환.",
- "toggledisplay": "&eDisplayItem: &b{0} &e[&d&lToggle&e]",
- "toggledisplay-hover": "&eToggle the shop's displayitem status"
+ "toggledisplay": "&e아이템 표시: &b{0} &e[&d&l전환&e]",
+ "toggledisplay-hover": "&e상점 표시 항목 상태 전환"
},
"tableformat": {
"full_line": "+---------------------------------------------------+",
From 327f0ce988cf5e7f31d2bca469e9ce910f18125d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 25 Nov 2021 14:24:39 +0000
Subject: [PATCH 012/725] Bump paperlib from 1.0.6 to 1.0.7
Bumps [paperlib](https://github.com/PaperMC/PaperLib) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/PaperMC/PaperLib/releases)
- [Changelog](https://github.com/PaperMC/PaperLib/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PaperMC/PaperLib/compare/1.0.6...v1.0.7)
---
updated-dependencies:
- dependency-name: io.papermc:paperlib
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c652935d1b..434d608ceb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -749,7 +749,7 @@
io.papermc
paperlib
- 1.0.6
+ 1.0.7
compile
From 9a94668792b812566a5289394916ed7d307cd217 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Fri, 26 Nov 2021 01:34:10 +0800
Subject: [PATCH 013/725] [WorldGuardIntegration] Fix global region issue
---
.../org/maxgamer/quickshop/QuickShop.java | 4 ++
.../worldguard/WorldGuardIntegration.java | 52 ++++++++++++++-----
src/main/resources/config.yml | 4 +-
3 files changed, 45 insertions(+), 15 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index 27f7c3db9a..a97074ea45 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -1962,6 +1962,10 @@ private void updateConfig(int selectedVersion) throws IOException {
getConfiguration().remove("plugin.BKCommonLib");
getConfiguration().set("config-version", ++selectedVersion);
}
+ if (selectedVersion == 148) {
+ getConfiguration().set("integration.worldguard.respect-global-region",false);
+ getConfiguration().set("config-version", ++selectedVersion);
+ }
if (getConfiguration().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");
}
diff --git a/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java
index 1db8fb573d..dbe0497178 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java
@@ -23,11 +23,13 @@
import com.sk89q.worldguard.LocalPlayer;
import com.sk89q.worldguard.WorldGuard;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
+import com.sk89q.worldguard.protection.ApplicableRegionSet;
import com.sk89q.worldguard.protection.flags.Flag;
import com.sk89q.worldguard.protection.flags.Flags;
import com.sk89q.worldguard.protection.flags.StateFlag;
import com.sk89q.worldguard.protection.flags.registry.FlagConflictException;
import com.sk89q.worldguard.protection.flags.registry.FlagRegistry;
+import com.sk89q.worldguard.protection.managers.RegionManager;
import com.sk89q.worldguard.protection.regions.RegionContainer;
import com.sk89q.worldguard.protection.regions.RegionQuery;
import org.bukkit.ChatColor;
@@ -54,6 +56,7 @@ public class WorldGuardIntegration extends AbstractQSIntegratedPlugin {
private List tradeFlags;
private boolean anyOwner;
private boolean whiteList;
+ private boolean respectGlobalRegion;
private boolean load = false;
public WorldGuardIntegration(QuickShop plugin) {
@@ -89,6 +92,7 @@ public void load() {
private void init() {
this.whiteList = plugin.getConfiguration().getBoolean("integration.worldguard.whitelist-mode");
this.anyOwner = plugin.getConfiguration().getBoolean("integration.worldguard.any-owner");
+ respectGlobalRegion = plugin.getConfiguration().getBoolean("integration.worldguard.respect-global-region");
createFlags =
WorldGuardFlags.deserialize(
plugin.getConfiguration().getStringList("integration.worldguard.create"));
@@ -133,38 +137,48 @@ public boolean canCreateShopHere(@NotNull Player player, @NotNull Location locat
}
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
- if (query.getApplicableRegions(wgLoc).getRegions().isEmpty()) {
+ ApplicableRegionSet applicableRegionSet=query.getApplicableRegions(wgLoc);
+ //Regions not included global one
+ if (applicableRegionSet.getRegions().isEmpty()&&!respectGlobalRegion) {
return !whiteList;
+ }else {
+ //So check it manually
+ RegionManager worldManger = WorldGuard.getInstance().getPlatform().getRegionContainer().get(BukkitAdapter.adapt(location.getWorld()));
+ if (worldManger != null&&!worldManger.hasRegion("__global__")) {
+ //If not have, just check whitelist
+ return !whiteList;
+ }
}
+ //Passed, but flag calculation will include the global region
for (WorldGuardFlags flag : createFlags) {
switch (flag) {
case BUILD:
- if (query.queryState(wgLoc, localPlayer, Flags.BUILD) == StateFlag.State.DENY) {
+ if (!applicableRegionSet.testState(localPlayer,Flags.BUILD)) {
return false;
}
break;
case FLAG:
- if (query.queryState(wgLoc, localPlayer, this.createFlag) == StateFlag.State.DENY) {
+ if (!applicableRegionSet.testState(localPlayer, this.createFlag)) {
return false;
}
break;
case CHEST_ACCESS:
- if (query.queryState(wgLoc, localPlayer, Flags.CHEST_ACCESS) == StateFlag.State.DENY) {
+ if (!applicableRegionSet.testState(localPlayer, Flags.CHEST_ACCESS)) {
return false;
}
break;
case INTERACT:
- if (query.queryState(wgLoc, localPlayer, Flags.INTERACT) == StateFlag.State.DENY) {
+ if (!applicableRegionSet.testState(localPlayer, Flags.INTERACT)) {
return false;
}
break;
case OWN:
if (anyOwner) {
- if (query.getApplicableRegions(wgLoc).getRegions().stream().noneMatch(region -> region.isOwner(localPlayer))) {
+ if (applicableRegionSet.getRegions().stream().noneMatch(region -> region.isOwner(localPlayer))) {
return false;
}
} else {
- if (!query.getApplicableRegions(wgLoc).isOwnerOfAll(localPlayer)) {
+ if (!applicableRegionSet.isOwnerOfAll(localPlayer)) {
return false;
}
}
@@ -194,36 +208,46 @@ public boolean canTradeShopHere(@NotNull Player player, @NotNull Location locati
}
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
- if (query.getApplicableRegions(wgLoc).getRegions().isEmpty()) {
+ ApplicableRegionSet applicableRegionSet=query.getApplicableRegions(wgLoc);
+ //Regions not included global one
+ if (applicableRegionSet.getRegions().isEmpty()&&!respectGlobalRegion) {
return !whiteList;
+ }else {
+ //So check it manually
+ RegionManager worldManger = WorldGuard.getInstance().getPlatform().getRegionContainer().get(BukkitAdapter.adapt(location.getWorld()));
+ if (worldManger != null&&!worldManger.hasRegion("__global__")) {
+ //If not have, just check whitelist
+ return !whiteList;
+ }
}
+ //Passed, but flag calculation will include the global region
for (WorldGuardFlags flag : tradeFlags) {
switch (flag) {
case BUILD:
- if (!query.testState(wgLoc, localPlayer, Flags.BUILD)) {
+ if (!applicableRegionSet.testState(localPlayer, Flags.BUILD)) {
return false;
}
break;
case FLAG:
- if (!query.testState(wgLoc, localPlayer, this.tradeFlag)) {
+ if (!applicableRegionSet.testState(localPlayer, this.tradeFlag)) {
return false;
}
break;
case CHEST_ACCESS:
- if (!query.testState(wgLoc, localPlayer, Flags.CHEST_ACCESS)) {
+ if (!applicableRegionSet.testState(localPlayer, Flags.CHEST_ACCESS)) {
return false;
}
break;
case INTERACT:
- if (!query.testState(wgLoc, localPlayer, Flags.INTERACT)) {
+ if (!applicableRegionSet.testState(localPlayer, Flags.INTERACT)) {
return false;
}
break;
case OWN:
if (anyOwner) {
- return query.getApplicableRegions(wgLoc).getRegions().stream().anyMatch(region -> region.isOwner(localPlayer));
+ return applicableRegionSet.getRegions().stream().anyMatch(region -> region.isOwner(localPlayer));
} else {
- return query.getApplicableRegions(wgLoc).isOwnerOfAll(localPlayer);
+ return applicableRegionSet.isOwnerOfAll(localPlayer);
}
default:
// do nothing
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index b18f99b4f0..c5ade0dff7 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -1,7 +1,7 @@
# QuickShop-Reremake Plugin Configuration
#Do not touch this if you don't know what you're doing!
-config-version: 148
+config-version: 149
#This language will used by Item Name, Enchantment Name,
#and Potion Effect Name or the text on the shop info sign (nbtapi not installed) and other them related position.
@@ -557,6 +557,8 @@ integration:
whitelist-mode: false
#Allow players to create a shop if the player is the owner of in this location or ANY region.
any-owner: true
+ #Should we respect the global region flag?
+ respect-global-region: true
#Which checks does a player need to pass to create a shop?
#You can use multiple checks at the same time.
#Priority: UP > DOWN
From ad43c83ffc96edddab523972b7439d56953b6e37 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Fri, 26 Nov 2021 13:29:31 +0800
Subject: [PATCH 014/725] New translations messages.json (Korean)
---
crowdin/lang/ko-KR/messages.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/crowdin/lang/ko-KR/messages.json b/crowdin/lang/ko-KR/messages.json
index 0f07393804..7b6899e0c9 100644
--- a/crowdin/lang/ko-KR/messages.json
+++ b/crowdin/lang/ko-KR/messages.json
@@ -190,8 +190,8 @@
"header": "{1}{0}",
"buying": "&b구매 {0} 개",
"stack-buying": "&b구매중 {0} 개",
- "item-left": "",
- "item-right": "",
+ "item-left": "&f",
+ "item-right": "&f",
"price": "개당 {0}",
"stack-price": "아이템 {2}, {1} 개당 {0}원",
"unlimited": "무제한",
@@ -346,6 +346,6 @@
"display-turn-on": "&a상점 디스플레이를 성공적으로 켰습니다.",
"display-turn-off": "&a상점 디스플레이를 성공적으로 껏습니다.",
"shop-purged-start": "&a상점 정리가 시작되었습니다. 자세한 내용은 콘솔을 확인하십시오.",
- "purchase-out-of-stock": "&cThis shop run out of the stock, Contact shop owner or staffs to refill the stock.",
- "purchase-out-of-space": "&cThis shop run out of the space, Contact shop owner or staffs to empty the shop."
+ "purchase-out-of-stock": "&c이 상점은 재고가 다 떨어졌으니 주인에게 문의하여 재고보충을 요구해주세요.",
+ "purchase-out-of-space": "&c이 상점은 공간이 부족하니 주인에게 문의하여 상자를 비우라고 요청해주세요."
}
From ec0c8a0e07cb78206f2ef763c86c182d4a2484ee Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Fri, 26 Nov 2021 22:41:15 +0800
Subject: [PATCH 015/725] Try to fix sync issue
---
crowdin.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/crowdin.yml b/crowdin.yml
index 15ad6b03b9..eaa02e6b24 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -1,3 +1,4 @@
+base_path: "/master"
files:
- source: /src/main/resources/lang/*.json
translation: /crowdin/lang/%locale%/%original_file_name%
From 632a22945416670c5e4410b2fd0cd0909e8441a1 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 10:53:02 +0800
Subject: [PATCH 016/725] Fix shade issue
---
pom.xml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/pom.xml b/pom.xml
index 304196a3ea..90062ac6cd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -129,6 +129,14 @@
org.checkerframework.
org.maxgamer.quickshop.shade.org.checkerframework.
+
+ org.apache.commons.lang3.
+ org.maxgamer.quickshop.shade.org.apache.commons.lang3.
+
+
+ org.objectweb.asm.
+ org.maxgamer.quickshop.shade.org.objectweb.asm.
+
org.slf4j.
org.maxgamer.quickshop.shade.org.slf4j.slf4j.
@@ -191,6 +199,38 @@
org.enginehub.squirrelid.
org.maxgamer.quickshop.shade.org.enginehub.squirrelid.
+
+ kotlin.
+ org.maxgamer.quickshop.shade.org.kotlin.
+
+
+ javax.annotation.
+ org.maxgamer.quickshop.shade.org.javax.annotation.
+
+
+ com.google.common.
+ org.maxgamer.quickshop.shade.com.google.common.
+
+
+ com.flowpowered.math.
+ org.maxgamer.quickshop.shade.com.flowpowered.math.
+
+
+ okio.
+ org.maxgamer.quickshop.shade.okio.
+
+
+ okhttp3.
+ org.maxgamer.quickshop.shade.okhttp3.
+
+
+ net.kyori.minecraft.
+ org.maxgamer.quickshop.shade.net.kyori.minecraft.
+
+
+ net.minidev.asm.
+ org.maxgamer.quickshop.shade.net.minidev.asm.
+
com.squareup.
org.maxgamer.quickshop.shade.org.com.squareup.
@@ -206,6 +246,23 @@
org.maxgamer.quickshop.javaw.bootstrap.Bootstrap
+
+
+ *:*
+
+ META-INF/*.SF
+ META-INF/*.DSA
+ META-INF/*.RSA
+ META-INF/*.kotlin_module
+ META-INF/*.txt
+ META-INF/proguard/*
+ META-INF/services/*
+ META-INF/versions/9/*
+ *License*
+ *LICENSE*
+
+
+
@@ -570,6 +627,12 @@
spigot-api
1.17.1-R0.1-SNAPSHOT
provided
+
+
+ commons-lang
+ commons-lang
+
+
me.vagdedes.spartan
From 8132706d6b0af90b94de238b686b525f5a4c9f11 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 10:53:42 +0800
Subject: [PATCH 017/725] Change to common-lang3, adapt to spigot 1.18 lib
changes
---
pom.xml | 5 +++++
.../org/maxgamer/quickshop/QuickShop.java | 2 +-
.../api/command/CommandContainer.java | 2 +-
.../platform/minedown/BungeeQuickChat.java | 2 +-
.../command/subcommand/SubCommand_Refill.java | 2 +-
.../maxgamer/quickshop/database/DataType.java | 2 +-
.../eventmanager/QSEventManager.java | 2 +-
.../distributions/MojangDistribution.java | 2 +-
.../quickshop/shop/InventoryPreview.java | 2 +-
.../maxgamer/quickshop/shop/ShopLoader.java | 2 +-
.../quickshop/shop/SimpleShopManager.java | 2 +-
.../org/maxgamer/quickshop/util/MsgUtil.java | 2 +-
.../maxgamer/quickshop/util/TextSplitter.java | 2 +-
.../org/maxgamer/quickshop/util/Util.java | 2 +-
.../BuiltInEconomyFormatter.java | 2 +-
.../economyformatter/EconomyFormatter.java | 2 +-
.../util/envcheck/ResultContainer.java | 2 +-
.../util/hack/packet/SignPacketHack.java | 2 +-
.../matcher/item/BukkitItemMatcherImpl.java | 2 +-
.../item/QuickShopItemMatcherImpl.java | 2 +-
.../watcher/DisplayAutoDespawnWatcher.java | 19 +++++++------------
21 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/pom.xml b/pom.xml
index 90062ac6cd..0f561801f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -634,6 +634,11 @@
+
+ org.apache.commons
+ commons-lang3
+ 3.12.0
+
me.vagdedes.spartan
SpartanAPI
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index a97074ea45..14b65354d1 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -29,7 +29,7 @@
import lombok.Setter;
import me.minebuilders.clearlag.Clearlag;
import me.minebuilders.clearlag.listeners.ItemMergeListener;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.PluginCommand;
diff --git a/src/main/java/org/maxgamer/quickshop/api/command/CommandContainer.java b/src/main/java/org/maxgamer/quickshop/api/command/CommandContainer.java
index 1f2ac20f54..6a654170e0 100644
--- a/src/main/java/org/maxgamer/quickshop/api/command/CommandContainer.java
+++ b/src/main/java/org/maxgamer/quickshop/api/command/CommandContainer.java
@@ -22,7 +22,7 @@
import lombok.Builder;
import lombok.Data;
import lombok.Singular;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
diff --git a/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java b/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
index 3ac2515113..9b125c8750 100644
--- a/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
+++ b/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
@@ -22,7 +22,7 @@
import lombok.AllArgsConstructor;
import net.md_5.bungee.api.chat.*;
import net.md_5.bungee.chat.ComponentSerializer;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Refill.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Refill.java
index c4c8e24b8d..a23f13f6ba 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Refill.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Refill.java
@@ -20,7 +20,7 @@
package org.maxgamer.quickshop.command.subcommand;
import lombok.AllArgsConstructor;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.util.BlockIterator;
diff --git a/src/main/java/org/maxgamer/quickshop/database/DataType.java b/src/main/java/org/maxgamer/quickshop/database/DataType.java
index 0970b84f7e..3dc571a939 100644
--- a/src/main/java/org/maxgamer/quickshop/database/DataType.java
+++ b/src/main/java/org/maxgamer/quickshop/database/DataType.java
@@ -1,7 +1,7 @@
package org.maxgamer.quickshop.database;
import lombok.Getter;
-import org.apache.commons.lang.Validate;
+import org.apache.commons.lang3.Validate;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
diff --git a/src/main/java/org/maxgamer/quickshop/eventmanager/QSEventManager.java b/src/main/java/org/maxgamer/quickshop/eventmanager/QSEventManager.java
index f150109138..24b140bda9 100644
--- a/src/main/java/org/maxgamer/quickshop/eventmanager/QSEventManager.java
+++ b/src/main/java/org/maxgamer/quickshop/eventmanager/QSEventManager.java
@@ -20,7 +20,7 @@
package org.maxgamer.quickshop.eventmanager;
import lombok.AllArgsConstructor;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.event.*;
import org.bukkit.event.server.PluginDisableEvent;
diff --git a/src/main/java/org/maxgamer/quickshop/localization/game/game/distributions/MojangDistribution.java b/src/main/java/org/maxgamer/quickshop/localization/game/game/distributions/MojangDistribution.java
index d1a4f8e2b3..c9658802b6 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/game/game/distributions/MojangDistribution.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/game/game/distributions/MojangDistribution.java
@@ -26,7 +26,7 @@
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.maxgamer.quickshop.QuickShop;
diff --git a/src/main/java/org/maxgamer/quickshop/shop/InventoryPreview.java b/src/main/java/org/maxgamer/quickshop/shop/InventoryPreview.java
index d877ab0446..a897aa3098 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/InventoryPreview.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/InventoryPreview.java
@@ -21,7 +21,7 @@
import lombok.EqualsAndHashCode;
import lombok.ToString;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.HumanEntity;
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ShopLoader.java b/src/main/java/org/maxgamer/quickshop/shop/ShopLoader.java
index 0b485a14df..cf21fe4740 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ShopLoader.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ShopLoader.java
@@ -24,7 +24,7 @@
import com.google.gson.JsonSyntaxException;
import lombok.Getter;
import lombok.Setter;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
diff --git a/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java b/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java
index ea2a16bb60..45b539eb18 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java
@@ -26,7 +26,7 @@
import com.google.common.collect.Sets;
import io.papermc.lib.PaperLib;
import lombok.Getter;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
index 3ad2267f5e..ed62eee957 100644
--- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
@@ -28,7 +28,7 @@
import lombok.Getter;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.TranslatableComponent;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
diff --git a/src/main/java/org/maxgamer/quickshop/util/TextSplitter.java b/src/main/java/org/maxgamer/quickshop/util/TextSplitter.java
index 89f70a765b..e1b2e79f73 100644
--- a/src/main/java/org/maxgamer/quickshop/util/TextSplitter.java
+++ b/src/main/java/org/maxgamer/quickshop/util/TextSplitter.java
@@ -24,7 +24,7 @@
import lombok.SneakyThrows;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.chat.ComponentSerializer;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java
index 8dbf806e0b..401f116945 100644
--- a/src/main/java/org/maxgamer/quickshop/util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/util/Util.java
@@ -30,7 +30,7 @@
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.chat.ComponentSerializer;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
diff --git a/src/main/java/org/maxgamer/quickshop/util/economyformatter/BuiltInEconomyFormatter.java b/src/main/java/org/maxgamer/quickshop/util/economyformatter/BuiltInEconomyFormatter.java
index 2102a6b4b7..8b351918c7 100644
--- a/src/main/java/org/maxgamer/quickshop/util/economyformatter/BuiltInEconomyFormatter.java
+++ b/src/main/java/org/maxgamer/quickshop/util/economyformatter/BuiltInEconomyFormatter.java
@@ -19,7 +19,7 @@
package org.maxgamer.quickshop.util.economyformatter;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.Nullable;
import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.util.MsgUtil;
diff --git a/src/main/java/org/maxgamer/quickshop/util/economyformatter/EconomyFormatter.java b/src/main/java/org/maxgamer/quickshop/util/economyformatter/EconomyFormatter.java
index 8771172e08..923956bc3e 100644
--- a/src/main/java/org/maxgamer/quickshop/util/economyformatter/EconomyFormatter.java
+++ b/src/main/java/org/maxgamer/quickshop/util/economyformatter/EconomyFormatter.java
@@ -19,7 +19,7 @@
package org.maxgamer.quickshop.util.economyformatter;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.World;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
diff --git a/src/main/java/org/maxgamer/quickshop/util/envcheck/ResultContainer.java b/src/main/java/org/maxgamer/quickshop/util/envcheck/ResultContainer.java
index 22bcb8680a..e4c30c5713 100644
--- a/src/main/java/org/maxgamer/quickshop/util/envcheck/ResultContainer.java
+++ b/src/main/java/org/maxgamer/quickshop/util/envcheck/ResultContainer.java
@@ -19,7 +19,7 @@
package org.maxgamer.quickshop.util.envcheck;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
diff --git a/src/main/java/org/maxgamer/quickshop/util/hack/packet/SignPacketHack.java b/src/main/java/org/maxgamer/quickshop/util/hack/packet/SignPacketHack.java
index b04ef43cab..e464d1a93e 100644
--- a/src/main/java/org/maxgamer/quickshop/util/hack/packet/SignPacketHack.java
+++ b/src/main/java/org/maxgamer/quickshop/util/hack/packet/SignPacketHack.java
@@ -6,7 +6,7 @@
//import com.bergerkiller.bukkit.common.utils.BlockUtil;
//import com.bergerkiller.bukkit.common.utils.PacketUtil;
//import net.md_5.bungee.chat.ComponentSerializer;
-//import org.apache.commons.lang.Validate;
+//import org.apache.commons.lang3.Validate;
//import org.bukkit.Bukkit;
//import org.bukkit.block.Sign;
//import org.bukkit.entity.Player;
diff --git a/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java b/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
index cc37661749..91e62789c4 100644
--- a/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
@@ -21,7 +21,7 @@
import de.tr7zw.nbtapi.NBTItem;
import lombok.AllArgsConstructor;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
diff --git a/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java b/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
index 65bbf4e5f3..d068d163d5 100644
--- a/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
@@ -22,7 +22,7 @@
import de.leonhard.storage.sections.FlatFileSection;
import de.tr7zw.nbtapi.NBTItem;
import lombok.AllArgsConstructor;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.attribute.Attribute;
import org.bukkit.block.ShulkerBox;
import org.bukkit.enchantments.Enchantment;
diff --git a/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
index 0492de125a..6ca625e7db 100644
--- a/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
+++ b/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
@@ -26,6 +26,7 @@
import org.bukkit.scheduler.BukkitRunnable;
import org.jetbrains.annotations.NotNull;
import org.maxgamer.quickshop.QuickShop;
+import org.maxgamer.quickshop.api.shop.AbstractDisplayItem;
import org.maxgamer.quickshop.api.shop.Shop;
import org.maxgamer.quickshop.util.Util;
import org.maxgamer.quickshop.util.reload.ReloadResult;
@@ -61,7 +62,8 @@ public void run() {
continue;
}
World world = shop.getLocation().getWorld(); //Cache this, because it will took some time.
- if (shop.getDisplay() != null) {
+ AbstractDisplayItem displayItem=shop.getDisplay();
+ if (displayItem != null) {
// Check the range has player?
boolean anyPlayerInRegion = false;
for (Player player : Bukkit.getOnlinePlayers()) {
@@ -71,7 +73,7 @@ public void run() {
}
}
if (anyPlayerInRegion) {
- if (!shop.getDisplay().isSpawned()) {
+ if (!displayItem.isSpawned()) {
Util.debugLog(
"Respawning the shop "
+ shop
@@ -80,26 +82,19 @@ public void run() {
}
} else if (shop.getDisplay().isSpawned()) {
removeDisplayItemDelayed(shop);
+
}
}
}
}
- public boolean removeDisplayItemDelayed(Shop shop) {
+ public void removeDisplayItemDelayed(Shop shop) {
if (shop.getDisplay() != null) {
- if (shop.getDisplay().isPendingRemoval()) {
- // Actually remove the pending display
- //Util.debugLog("Removing the shop " + shop + " the display, cause nobody can see it");
- Util.mainThreadRun(() -> shop.getDisplay().remove());
- return true;
- } else {
// Delayed to next calling
//Util.debugLog("Pending to remove the shop " + shop + " the display, cause nobody can see it");
shop.getDisplay().pendingRemoval();
- return false;
}
- }
- return false;
+
}
}
From 75778bab3bf67e9aecff3e28a95be3748689970c Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 10:55:01 +0800
Subject: [PATCH 018/725] Revert wrong changes
---
.../watcher/DisplayAutoDespawnWatcher.java | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
index 6ca625e7db..0492de125a 100644
--- a/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
+++ b/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
@@ -26,7 +26,6 @@
import org.bukkit.scheduler.BukkitRunnable;
import org.jetbrains.annotations.NotNull;
import org.maxgamer.quickshop.QuickShop;
-import org.maxgamer.quickshop.api.shop.AbstractDisplayItem;
import org.maxgamer.quickshop.api.shop.Shop;
import org.maxgamer.quickshop.util.Util;
import org.maxgamer.quickshop.util.reload.ReloadResult;
@@ -62,8 +61,7 @@ public void run() {
continue;
}
World world = shop.getLocation().getWorld(); //Cache this, because it will took some time.
- AbstractDisplayItem displayItem=shop.getDisplay();
- if (displayItem != null) {
+ if (shop.getDisplay() != null) {
// Check the range has player?
boolean anyPlayerInRegion = false;
for (Player player : Bukkit.getOnlinePlayers()) {
@@ -73,7 +71,7 @@ public void run() {
}
}
if (anyPlayerInRegion) {
- if (!displayItem.isSpawned()) {
+ if (!shop.getDisplay().isSpawned()) {
Util.debugLog(
"Respawning the shop "
+ shop
@@ -82,19 +80,26 @@ public void run() {
}
} else if (shop.getDisplay().isSpawned()) {
removeDisplayItemDelayed(shop);
-
}
}
}
}
- public void removeDisplayItemDelayed(Shop shop) {
+ public boolean removeDisplayItemDelayed(Shop shop) {
if (shop.getDisplay() != null) {
+ if (shop.getDisplay().isPendingRemoval()) {
+ // Actually remove the pending display
+ //Util.debugLog("Removing the shop " + shop + " the display, cause nobody can see it");
+ Util.mainThreadRun(() -> shop.getDisplay().remove());
+ return true;
+ } else {
// Delayed to next calling
//Util.debugLog("Pending to remove the shop " + shop + " the display, cause nobody can see it");
shop.getDisplay().pendingRemoval();
+ return false;
}
-
+ }
+ return false;
}
}
From f1dddd2a468f7f7ab7720bfb9e952220cdf37da7 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 10:56:35 +0800
Subject: [PATCH 019/725] Volatile the dev-mode, prevent some issues
---
src/main/java/org/maxgamer/quickshop/util/Util.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java
index 401f116945..1c19f421bf 100644
--- a/src/main/java/org/maxgamer/quickshop/util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/util/Util.java
@@ -89,7 +89,7 @@ public class Util {
private static final ThreadLocal MINEDOWN = ThreadLocal.withInitial(() -> new MineDown(""));
private static int BYPASSED_CUSTOM_STACKSIZE = -1;
private static Yaml yaml = null;
- private static Boolean devMode = null;
+ private volatile static Boolean devMode = null;
@Setter
private static QuickShop plugin;
@Getter
From 3e710974624f23d50692afde715a831f3b4214e7 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 11:01:35 +0800
Subject: [PATCH 020/725] Target to 1.18-rc3
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 0f561801f9..66776ad702 100644
--- a/pom.xml
+++ b/pom.xml
@@ -625,7 +625,7 @@
org.spigotmc
spigot-api
- 1.17.1-R0.1-SNAPSHOT
+ 1.18-rc3-R0.1-SNAPSHOT
provided
From 207b385c8c6cd599b69097abe5f0ac305663fada Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 11:08:04 +0800
Subject: [PATCH 021/725] Remove lombok.NonNull and javax.annotation.Nonnull
usage
---
.../java/org/maxgamer/quickshop/Cache.java | 3 +-
.../quickshop/database/DatabaseTask.java | 4 +--
.../org/maxgamer/quickshop/util/JsonUtil.java | 36 +++++++++----------
.../org/maxgamer/quickshop/util/Util.java | 3 +-
.../quickshop/watcher/LogWatcher.java | 4 +--
5 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/Cache.java b/src/main/java/org/maxgamer/quickshop/Cache.java
index 453239551e..ec8c43e21c 100644
--- a/src/main/java/org/maxgamer/quickshop/Cache.java
+++ b/src/main/java/org/maxgamer/quickshop/Cache.java
@@ -24,7 +24,6 @@
import lombok.AllArgsConstructor;
import lombok.Data;
import org.bukkit.Location;
-import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.maxgamer.quickshop.api.shop.Shop;
@@ -50,7 +49,7 @@ public Cache(QuickShop plugin) {
this.plugin = plugin;
}
- public @NonNull CacheStats getStats() {
+ public @NotNull CacheStats getStats() {
return accessCaching.stats();
}
diff --git a/src/main/java/org/maxgamer/quickshop/database/DatabaseTask.java b/src/main/java/org/maxgamer/quickshop/database/DatabaseTask.java
index d2eeb97ce7..5bbd7739bd 100644
--- a/src/main/java/org/maxgamer/quickshop/database/DatabaseTask.java
+++ b/src/main/java/org/maxgamer/quickshop/database/DatabaseTask.java
@@ -20,8 +20,8 @@
package org.maxgamer.quickshop.database;
-import lombok.NonNull;
import lombok.ToString;
+import org.jetbrains.annotations.NotNull;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -46,7 +46,7 @@ public DatabaseTask(String statement) {
}
- public void run(@NonNull Connection connection) {
+ public void run(@NotNull Connection connection) {
try (PreparedStatement ps = connection.prepareStatement(statement)) { //TODO Use addBatch to improve performance
task.edit(ps);
ps.execute();
diff --git a/src/main/java/org/maxgamer/quickshop/util/JsonUtil.java b/src/main/java/org/maxgamer/quickshop/util/JsonUtil.java
index 6f2a133b9d..56480bd671 100644
--- a/src/main/java/org/maxgamer/quickshop/util/JsonUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/JsonUtil.java
@@ -25,8 +25,8 @@
import me.lucko.helper.gson.typeadapters.GsonSerializableAdapterFactory;
import me.lucko.helper.gson.typeadapters.JsonElementTreeSerializer;
import me.lucko.helper.text3.serializer.gson.GsonComponentSerializer;
+import org.jetbrains.annotations.NotNull;
-import javax.annotation.Nonnull;
import java.io.Reader;
import java.util.Objects;
@@ -65,7 +65,7 @@ public static Gson regular() {
return REGULAR_GSON;
}
- @Nonnull
+ @NotNull
public static Gson standard() {
return STANDARD_GSON;
}
@@ -74,60 +74,60 @@ public static Gson getGson() {
return STANDARD_GSON;
}
- @Nonnull
+ @NotNull
public static Gson prettyPrinting() {
return PRETTY_PRINT_GSON;
}
- @Nonnull
+ @NotNull
public static JsonParser parser() {
return PARSER;
}
- @Nonnull
- public static JsonObject readObject(@Nonnull Reader reader) {
+ @NotNull
+ public static JsonObject readObject(@NotNull Reader reader) {
return PARSER.parse(reader).getAsJsonObject();
}
- @Nonnull
- public static JsonObject readObject(@Nonnull String s) {
+ @NotNull
+ public static JsonObject readObject(@NotNull String s) {
return PARSER.parse(s).getAsJsonObject();
}
- public static void writeObject(@Nonnull Appendable writer, @Nonnull JsonObject object) {
+ public static void writeObject(@NotNull Appendable writer, @NotNull JsonObject object) {
standard().toJson(object, writer);
}
- public static void writeObjectPretty(@Nonnull Appendable writer, @Nonnull JsonObject object) {
+ public static void writeObjectPretty(@NotNull Appendable writer, @NotNull JsonObject object) {
prettyPrinting().toJson(object, writer);
}
- public static void writeElement(@Nonnull Appendable writer, @Nonnull JsonElement element) {
+ public static void writeElement(@NotNull Appendable writer, @NotNull JsonElement element) {
standard().toJson(element, writer);
}
- public static void writeElementPretty(@Nonnull Appendable writer, @Nonnull JsonElement element) {
+ public static void writeElementPretty(@NotNull Appendable writer, @NotNull JsonElement element) {
prettyPrinting().toJson(element, writer);
}
- @Nonnull
- public static String toString(@Nonnull JsonElement element) {
+ @NotNull
+ public static String toString(@NotNull JsonElement element) {
return Objects.requireNonNull(standard().toJson(element));
}
- @Nonnull
- public static String toStringPretty(@Nonnull JsonElement element) {
+ @NotNull
+ public static String toStringPretty(@NotNull JsonElement element) {
return Objects.requireNonNull(prettyPrinting().toJson(element));
}
- @Nonnull
+ @NotNull
@Deprecated
public static Gson get() {
return standard();
}
- @Nonnull
+ @NotNull
@Deprecated
public static Gson getPrettyPrinting() {
return prettyPrinting();
diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java
index 1c19f421bf..3495d03978 100644
--- a/src/main/java/org/maxgamer/quickshop/util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/util/Util.java
@@ -24,7 +24,6 @@
import de.themoep.minedown.MineDownParser;
import io.papermc.lib.PaperLib;
import lombok.Getter;
-import lombok.NonNull;
import lombok.Setter;
import lombok.SneakyThrows;
import net.md_5.bungee.api.ChatColor;
@@ -353,7 +352,7 @@ public static void debugLog(@NotNull String... logs) {
* @return the right side for given blockFace, UP and DOWN will return itself
*/
@NotNull
- public static BlockFace getRightSide(@NonNull BlockFace blockFace) {
+ public static BlockFace getRightSide(@NotNull BlockFace blockFace) {
switch (blockFace) {
case EAST:
return BlockFace.SOUTH;
diff --git a/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java
index d0af43ebae..54abd2c4d5 100644
--- a/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java
+++ b/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java
@@ -19,11 +19,11 @@
package org.maxgamer.quickshop.watcher;
-import lombok.NonNull;
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 java.io.*;
@@ -106,7 +106,7 @@ public void close() {
}
}
- public void log(@NonNull String log) {
+ public void log(@NotNull String log) {
logs.add("[" + DATETIME_FORMATTER.format(Instant.now()) + "] " + log);
}
From 9505a677deb62601e7931f7576ea32e780716472 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 11:38:46 +0800
Subject: [PATCH 022/725] Fix auto despawn watcher
---
.../org/maxgamer/quickshop/QuickShop.java | 4 +-
.../watcher/DisplayAutoDespawnWatcher.java | 40 ++++++-------------
2 files changed, 14 insertions(+), 30 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index 14b65354d1..95991d5e9e 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -226,6 +226,7 @@ public class QuickShop extends JavaPlugin implements QuickShopAPI {
private @Deprecated
DisplayDupeRemoverWatcher displayDupeRemoverWatcher;
@Getter
+ @Deprecated
private boolean enabledAsyncDisplayDespawn;
@Getter
private Plugin blockHubPlugin;
@@ -839,10 +840,9 @@ public final void onEnable() {
permissionManager = new PermissionManager(this);
// This should be inited before shop manager
if (this.display && getConfiguration().getBoolean("shop.display-auto-despawn")) {
- this.enabledAsyncDisplayDespawn = true;
this.displayAutoDespawnWatcher = new DisplayAutoDespawnWatcher(this);
//BUKKIT METHOD SHOULD ALWAYS EXECUTE ON THE SERVER MAIN THEAD
- this.displayAutoDespawnWatcher.runTaskTimer(this, 20, getConfiguration().getInt("shop.display-check-time")); // not worth async
+ timerTaskList.add(this.displayAutoDespawnWatcher.runTaskTimer(this, 20, getConfiguration().getInt("shop.display-check-time"))); // not worth async
}
getLogger().info("Registering commands...");
diff --git a/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
index 0492de125a..9652cbbe16 100644
--- a/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
+++ b/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
@@ -21,11 +21,13 @@
import lombok.AllArgsConstructor;
import org.bukkit.Bukkit;
+import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import org.jetbrains.annotations.NotNull;
import org.maxgamer.quickshop.QuickShop;
+import org.maxgamer.quickshop.api.shop.AbstractDisplayItem;
import org.maxgamer.quickshop.api.shop.Shop;
import org.maxgamer.quickshop.util.Util;
import org.maxgamer.quickshop.util.reload.ReloadResult;
@@ -56,50 +58,32 @@ public ReloadResult reloadModule() {
@Override
public void run() {
for (Shop shop : plugin.getShopManager().getLoadedShops()) {
- //Shop may deleted or unloaded when iterating
+ //Shop may be deleted or unloaded when iterating
if (shop.isDeleted() || !shop.isLoaded()) {
continue;
}
+ Location location = shop.getLocation();
World world = shop.getLocation().getWorld(); //Cache this, because it will took some time.
- if (shop.getDisplay() != null) {
+ AbstractDisplayItem displayItem = shop.getDisplay();
+ if (displayItem != null) {
// Check the range has player?
boolean anyPlayerInRegion = false;
for (Player player : Bukkit.getOnlinePlayers()) {
- if ((player.getWorld() == world) && (player.getLocation().distance(shop.getLocation()) < range)) {
+ if ((player.getWorld() == world) && (player.getLocation().distance(location) <= range)) {
anyPlayerInRegion = true;
break;
}
}
if (anyPlayerInRegion) {
- if (!shop.getDisplay().isSpawned()) {
- Util.debugLog(
- "Respawning the shop "
- + shop
- + " the display, cause it was despawned and a player close to it");
- Util.mainThreadRun(() -> shop.getDisplay().spawn());
+ if (!displayItem.isSpawned()) {
+ Util.debugLog("Respawning the shop " + shop + " the display, cause it was despawned and a player close to it");
+ displayItem.spawn();
}
- } else if (shop.getDisplay().isSpawned()) {
- removeDisplayItemDelayed(shop);
+ } else if (displayItem.isSpawned()) {
+ displayItem.remove();
}
}
}
}
- public boolean removeDisplayItemDelayed(Shop shop) {
- if (shop.getDisplay() != null) {
- if (shop.getDisplay().isPendingRemoval()) {
- // Actually remove the pending display
- //Util.debugLog("Removing the shop " + shop + " the display, cause nobody can see it");
- Util.mainThreadRun(() -> shop.getDisplay().remove());
- return true;
- } else {
- // Delayed to next calling
- //Util.debugLog("Pending to remove the shop " + shop + " the display, cause nobody can see it");
- shop.getDisplay().pendingRemoval();
- return false;
- }
- }
- return false;
- }
-
}
From fb2baa02b319c9141caf9c8373e9f87e4ba0f182 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 11:39:04 +0800
Subject: [PATCH 023/725] Deprecated DisplayWatcher
---
.../org/maxgamer/quickshop/QuickShop.java | 23 ++++++++++++++++---
.../quickshop/watcher/DisplayWatcher.java | 23 ++-----------------
2 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index 95991d5e9e..37950c15d7 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -166,6 +166,7 @@ public class QuickShop extends JavaPlugin implements QuickShopAPI {
@Getter
private int displayItemCheckTicks;
@Getter
+ @Deprecated
private DisplayWatcher displayWatcher;
/**
* The economy we hook into for transactions
@@ -904,10 +905,25 @@ public final void onEnable() {
new EconomySetupListener(this).register();
InternalListener internalListener = new InternalListener(this);
internalListener.register();
- ongoingFeeWatcher = new OngoingFeeWatcher(this);
if (this.display && AbstractDisplayItem.getNowUsing() != DisplayType.VIRTUALITEM) {
- displayWatcher = new DisplayWatcher(this);
+ if (getConfiguration().getInt("shop.display-items-check-ticks") < 3000) {
+ getLogger().severe("Shop.display-items-check-ticks is too low! It may cause HUGE lag! Pick a number > 3000");
+ }
+ if (getDisplayItemCheckTicks() > 0) {
+ getLogger().info("Registering DisplayCheck task....");
+ timerTaskList.add(getServer().getScheduler().runTaskTimer(this, () -> {
+ for (Shop shop : getShopManager().getLoadedShops()) {
+ //Shop may be deleted or unloaded when iterating
+ if (shop.isDeleted() || !shop.isLoaded()) {
+ continue;
+ }
+ shop.checkDisplay();
+ }
+ }, 1L, getDisplayItemCheckTicks()));
+ } else {
+ getLogger().severe("Shop.display-items-check-ticks is invalid! Pick a number > 3000");
+ }
new DisplayProtectionListener(this, this.shopCache).register();
if (Bukkit.getPluginManager().getPlugin("ClearLag") != null) {
new ClearLaggListener(this).register();
@@ -945,8 +961,9 @@ public void run() {
getLogger().info("Log actions is enabled, actions will log in the qs.log file!");
}
if (getConfiguration().getBoolean("shop.ongoing-fee.enable")) {
- getLogger().info("Ongoing fee feature is enabled.");
+ ongoingFeeWatcher = new OngoingFeeWatcher(this);
timerTaskList.add(ongoingFeeWatcher.runTaskTimerAsynchronously(this, 0, getConfiguration().getInt("shop.ongoing-fee.ticks")));
+ getLogger().info("Ongoing fee feature is enabled.");
}
integrationHelper.searchAndRegisterPlugins();
this.integrationHelper.callIntegrationsLoad(IntegrateStage.onEnableAfter);
diff --git a/src/main/java/org/maxgamer/quickshop/watcher/DisplayWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/DisplayWatcher.java
index 77bd7c2131..5903423027 100644
--- a/src/main/java/org/maxgamer/quickshop/watcher/DisplayWatcher.java
+++ b/src/main/java/org/maxgamer/quickshop/watcher/DisplayWatcher.java
@@ -21,11 +21,9 @@
import lombok.Data;
import org.maxgamer.quickshop.QuickShop;
-import org.maxgamer.quickshop.api.shop.AbstractDisplayItem;
-import org.maxgamer.quickshop.api.shop.DisplayType;
-import org.maxgamer.quickshop.api.shop.Shop;
@Data
+@Deprecated
public class DisplayWatcher {
private QuickShop plugin;
@@ -34,24 +32,7 @@ public DisplayWatcher(QuickShop plugin) {
registerTask();
}
+
private void registerTask() {
- plugin.getLogger().info("Registering DisplayCheck task....");
- if (AbstractDisplayItem.getNowUsing() == DisplayType.VIRTUALITEM) {
- return;
- }
- if (plugin.isDisplayEnabled() && plugin.getDisplayItemCheckTicks() > 0) {
- plugin.getServer().getScheduler().runTaskTimer(plugin, () -> {
- if (plugin.getConfiguration().getInt("shop.display-items-check-ticks") < 3000) {
- plugin.getLogger().severe("Shop.display-items-check-ticks is too low! It may cause HUGE lag! Pick a number > 3000");
- }
- for (Shop shop : plugin.getShopManager().getLoadedShops()) {
- //Shop may be deleted or unloaded when iterating
- if (shop.isDeleted() || !shop.isLoaded()) {
- continue;
- }
- shop.checkDisplay();
- }
- }, 1L, plugin.getDisplayItemCheckTicks());
- }
}
}
From 82d2895470bfbfe9e2bdf6f066cd40fcd8b6710d Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 11:50:33 +0800
Subject: [PATCH 024/725] Re-add "Enchantment name shows on enchanted books"
feature
---
.../org/maxgamer/quickshop/shop/ContainerShop.java | 4 +++-
src/main/java/org/maxgamer/quickshop/util/Util.java | 12 +++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index c919dcc2fb..e5f7859197 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -753,10 +753,12 @@ public List getSignText(@NotNull String locale) {
.create()));
} else {
// NBTAPI installed
+ String itemName = Util.getItemCustomName(getItem());
+ BaseComponent[] itemComponents = itemName == null ? new BaseComponent[]{new TranslatableComponent(ReflectFactory.getMaterialMinecraftNamespacedKey(getItem().getType()))} : TextComponent.fromLegacyText(itemName);
lines.add(new ComponentPackage(new ComponentBuilder()
.color(ChatColor.RESET)
.append(left)
- .append(new TranslatableComponent(ReflectFactory.getMaterialMinecraftNamespacedKey(getItem().getType())))
+ .append(itemComponents)
.append(right)
.create()));
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java
index 3495d03978..fb9faac97b 100644
--- a/src/main/java/org/maxgamer/quickshop/util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/util/Util.java
@@ -411,8 +411,8 @@ public static boolean useEnchantmentForEnchantedBook() {
return plugin.getConfiguration().getBoolean("shop.use-enchantment-for-enchanted-book");
}
- @NotNull
- public static String getItemStackName(@NotNull ItemStack itemStack) {
+ @Nullable
+ public static String getItemCustomName(@NotNull ItemStack itemStack) {
if (useEnchantmentForEnchantedBook() && itemStack.getType() == Material.ENCHANTED_BOOK) {
ItemMeta meta = itemStack.getItemMeta();
if (meta instanceof EnchantmentStorageMeta && ((EnchantmentStorageMeta) meta).hasStoredEnchants()) {
@@ -424,7 +424,13 @@ public static String getItemStackName(@NotNull ItemStack itemStack) {
&& !QuickShop.getInstance().getConfiguration().getBoolean("shop.force-use-item-original-name")) {
return itemStack.getItemMeta().getDisplayName();
}
- return MsgUtil.getItemi18n(itemStack.getType().name());
+ return null;
+ }
+
+ @NotNull
+ public static String getItemStackName(@NotNull ItemStack itemStack) {
+ String result = getItemCustomName(itemStack);
+ return result == null ? MsgUtil.getItemi18n(itemStack.getType().name()) : result;
}
@NotNull
From 34ff52a9588ac6e981a73545570fd92e3f9517c6 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 12:34:20 +0800
Subject: [PATCH 025/725] Fix ShopPurger
---
.../org/maxgamer/quickshop/QuickShop.java | 4 +-
.../command/subcommand/SubCommand_Purge.java | 2 +-
.../maxgamer/quickshop/shop/ShopPurger.java | 75 ++++++++++++-------
3 files changed, 51 insertions(+), 30 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index 37950c15d7..1454111a46 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -982,8 +982,8 @@ public void run() {
calendarWatcher = new CalendarWatcher(this);
calendarWatcher.start();
tpsWatcher.runTaskTimer(this, 1000, 50);
- this.shopPurger = new ShopPurger(this, false);
- shopPurger.runTaskAsynchronously(this);
+ this.shopPurger = new ShopPurger(this);
+ shopPurger.purge();
Util.debugLog("Now using display-type: " + AbstractDisplayItem.getNowUsing().name());
getLogger().info("QuickShop Loaded! " + enableTimer.stopAndGetTimePassed() + " ms.");
}
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Purge.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Purge.java
index fe2efb7c31..5495351bda 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Purge.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Purge.java
@@ -32,7 +32,7 @@ public class SubCommand_Purge implements CommandHandler {
@Override
public void onCommand(@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
- plugin.getShopPurger().runTaskAsynchronously(plugin);
+ plugin.getShopPurger().purge();
plugin.text().of(sender, "shop-purged-start").send();
}
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java b/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java
index 5ed24ad5f2..263cb0ca47 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java
@@ -19,34 +19,45 @@
package org.maxgamer.quickshop.shop;
-import lombok.AllArgsConstructor;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
-import org.bukkit.scheduler.BukkitRunnable;
import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.api.economy.EconomyTransaction;
import org.maxgamer.quickshop.api.shop.Shop;
import org.maxgamer.quickshop.util.Util;
import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
-@AllArgsConstructor
-public class ShopPurger extends BukkitRunnable {
+
+public class ShopPurger implements Runnable {
private final QuickShop plugin;
private volatile boolean executing;
- @Override
- public void run() {
- Util.ensureThread(true);
+ public ShopPurger(QuickShop plugin) {
+ this.plugin = plugin;
+ }
+
+ public void purge() {
+ if (!plugin.getConfiguration().getBoolean("purge.enabled")) {
+ plugin.getLogger().info("[Shop Purger] Purge not enabled!");
+ return;
+ }
if (executing) {
plugin.getLogger().info("[Shop Purger] Another purge task still running!");
- return;
+ } else {
+ plugin.getServer().getScheduler().runTaskAsynchronously(plugin, this);
}
+ }
+
+ @Override
+ @Deprecated
+ public void run() {
+ Util.ensureThread(true);
executing = true;
- if (!plugin.getConfiguration().getBoolean("purge.enabled")) {
- return;
- }
Util.debugLog("[Shop Purger] Scanning and removing shops");
+ List pendingRemovalShops = new ArrayList<>();
int days = plugin.getConfiguration().getOrDefault("purge.days", 360);
boolean deleteBanned = plugin.getConfiguration().getBoolean("purge.banned");
boolean skipOp = plugin.getConfiguration().getBoolean("purge.skip-op");
@@ -76,23 +87,33 @@ public void run() {
if (!markDeletion) {
continue;
}
- plugin.getLogger().info("[Shop Purger] Shop " + shop + " has been purged.");
- shop.delete(false);
- if (returnCreationFee) {
- EconomyTransaction transaction =
- EconomyTransaction.builder()
- .amount(plugin.getConfiguration().getDouble("shop.cost"))
- .allowLoan(false)
- .core(QuickShop.getInstance().getEconomy())
- .currency(shop.getCurrency())
- .world(shop.getLocation().getWorld())
- .to(shop.getOwner())
- .build();
- transaction.failSafeCommit();
- }
+ pendingRemovalShops.add(shop);
+ }
+ if (pendingRemovalShops.size() > 0) {
+ plugin.getLogger().info("[Shop Purger] Found " + pendingRemovalShops.size() + " need to removed, will remove in the next tick.");
+ plugin.getServer().getScheduler().runTaskLater(plugin, () -> {
+ for (Shop shop : pendingRemovalShops) {
+ shop.delete(false);
+ if (returnCreationFee) {
+ EconomyTransaction transaction =
+ EconomyTransaction.builder()
+ .amount(plugin.getConfiguration().getDouble("shop.cost"))
+ .allowLoan(false)
+ .core(QuickShop.getInstance().getEconomy())
+ .currency(shop.getCurrency())
+ .world(shop.getLocation().getWorld())
+ .to(shop.getOwner())
+ .build();
+ transaction.failSafeCommit();
+ }
+ plugin.getLogger().info("[Shop Purger] Shop " + shop + " has been purged.");
+ }
+ plugin.getLogger().info("[Shop Purger] Task completed, " + pendingRemovalShops.size() + " shops was purged");
+ executing = false;
+ }, 1L);
+ } else {
+ plugin.getLogger().info("[Shop Purger] Task completed, No shops need to purge.");
executing = false;
- plugin.getLogger().info("[Shop Purger] Task completed");
}
-
}
}
From a9820e22dbe5b92d070256533478cfaa1435d5cb Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sat, 27 Nov 2021 12:48:28 +0800
Subject: [PATCH 026/725] Update crowdin.yml
---
crowdin.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/crowdin.yml b/crowdin.yml
index eaa02e6b24..15ad6b03b9 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -1,4 +1,3 @@
-base_path: "/master"
files:
- source: /src/main/resources/lang/*.json
translation: /crowdin/lang/%locale%/%original_file_name%
From 91f6cf681072bc4287029939234f289b5144ed20 Mon Sep 17 00:00:00 2001
From: nikomaru <76208219+nlkomaru@users.noreply.github.com>
Date: Sat, 27 Nov 2021 17:12:07 +0900
Subject: [PATCH 027/725] Fixed a bug in which the Find command would display
the result multiple times.
---
.../maxgamer/quickshop/command/subcommand/SubCommand_Find.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
index f4c9b8b8f4..65707387a2 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
@@ -134,8 +134,8 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
String.valueOf(location.getBlockZ()),
String.valueOf(shopDoubleEntry.getValue().intValue())
).forLocale()).append("\n");
- MsgUtil.sendDirectMessage(sender, stringBuilder.toString());
}
+ MsgUtil.sendDirectMessage(sender, stringBuilder.toString());
}
}
}
From 06df37a59ba8c5e5ba0c49573c3bfedd2df0c0e9 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 27 Nov 2021 17:50:18 +0800
Subject: [PATCH 028/725] Fix case-sensitive and underscore issue in enabled
languages
---
.../quickshop/localization/text/SimpleTextManager.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index 6ed634e362..9713540cde 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -124,6 +124,10 @@ public void load() {
distribution.getAvailableLanguages(); // Make a request that loading the manifest to create manifest cache for
// parallel threads
List enabledLanguagesRegex = plugin.getConfiguration().getStringList("enabled-languages");
+ //Make sure is a lowercase regex, prevent case-sensitive and underscore issue
+ for (int i = 0; i < enabledLanguagesRegex.size(); i++) {
+ enabledLanguagesRegex.set(i, enabledLanguagesRegex.get(i).toLowerCase(Locale.ROOT).replace("-", "_"));
+ }
// Multi File and Multi-Language loader
// Offline Initiated
mapper.deployBundled("/master/crowdin/lang/%locale%/messages.json", loadBundled("/master/crowdin/lang/%locale%/messages.json"));
From 5d40940dada288b207c276ee41177c978cc68570 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 28 Nov 2021 00:33:34 +0800
Subject: [PATCH 029/725] Fix NoClassDefFoundError not handled by catch
statement
---
src/main/java/org/maxgamer/quickshop/QuickShop.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index 1454111a46..503a384c12 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -498,7 +498,7 @@ public boolean loadEcon() {
return false;
}
economy = ServiceInjector.getEconomy(economy);
- } catch (Exception e) {
+ } catch (Throwable e) {
this.getSentryErrorReporter().ignoreThrow();
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!");
From 0246560a307ec88ec5a8397bfcf29f682e8abf88 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 29 Nov 2021 14:33:49 +0000
Subject: [PATCH 030/725] Bump junit-jupiter-api from 5.8.1 to 5.8.2
Bumps [junit-jupiter-api](https://github.com/junit-team/junit5) from 5.8.1 to 5.8.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.8.2)
---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 66776ad702..32ac7f9984 100644
--- a/pom.xml
+++ b/pom.xml
@@ -587,7 +587,7 @@
org.junit.jupiter
junit-jupiter-api
- 5.8.1
+ 5.8.2
test
From 363241bc64c16cd2630fb8b8e12e8c8c7d3f3c6e Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Wed, 1 Dec 2021 18:07:05 +0800
Subject: [PATCH 031/725] Adapt to 1.18
---
.../org/maxgamer/quickshop/QuickShop.java | 5 +-
.../maxgamer/quickshop/util/GameVersion.java | 1 +
.../quickshop/util/ReflectFactory.java | 69 +++++++++++++------
3 files changed, 52 insertions(+), 23 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index 503a384c12..babb09595f 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -121,7 +121,7 @@ public class QuickShop extends JavaPlugin implements QuickShopAPI {
/* Public QuickShop API */
private final SimpleCompatibilityManager compatibilityTool = new SimpleCompatibilityManager(this);
private final Map limits = new HashMap<>(15);
- private final GameVersion gameVersion = GameVersion.get(ReflectFactory.getNMSVersion());
+ private GameVersion gameVersion;
/**
* The shop limites.
*/
@@ -2105,6 +2105,9 @@ public Map getLimits() {
@Override
public GameVersion getGameVersion() {
+ if (gameVersion == null) {
+ gameVersion = GameVersion.get(ReflectFactory.getNMSVersion());
+ }
return this.gameVersion;
}
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/GameVersion.java b/src/main/java/org/maxgamer/quickshop/util/GameVersion.java
index 898f4db161..17d43b5596 100644
--- a/src/main/java/org/maxgamer/quickshop/util/GameVersion.java
+++ b/src/main/java/org/maxgamer/quickshop/util/GameVersion.java
@@ -61,6 +61,7 @@ public enum GameVersion {
v1_16_R3(true, false, true, false, false, false),
v1_16_R4(true, false, true, false, false, false),
v1_17_R1(true, false, true, true, true, true),
+ v1_18_R1(true, false, true, true, true, true),
UNKNOWN(true, false, true, true, true, true);
/**
* CoreSupports - Check does QuickShop most features supports this server version
diff --git a/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java b/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java
index 77043efd10..22377b683d 100644
--- a/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java
+++ b/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java
@@ -19,6 +19,7 @@
package org.maxgamer.quickshop.util;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.command.CommandMap;
@@ -30,7 +31,11 @@
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.lang.reflect.Parameter;
+import java.util.Arrays;
+import java.util.List;
import java.util.logging.Level;
+import java.util.stream.Collectors;
/**
* ReflectFactory is library builtin QuickShop to get/execute stuff that cannot be access with BukkitAPI with reflect way.
@@ -45,12 +50,12 @@ public class ReflectFactory {
private static Class> craftServerClass;
private static Class> cachedNMSClass;
private static String nmsVersion;
+ private static Method getMinecraftKeyNameMethod;
// private static Object serverInstance;
// private static Field tpsField;
static {
- String name = Bukkit.getServer().getClass().getPackage().getName();
- String nmsVersion = name.substring(name.lastIndexOf('.') + 1);
+ String nmsVersion = getNMSVersion();
try {
craftItemStack_asNMSCopyMethod =
@@ -61,7 +66,19 @@ public class ReflectFactory {
if (gameVersion.isNewNmsName()) {
// 1.17+
nbtTagCompoundClass = Class.forName("net.minecraft.nbt.NBTTagCompound");
- itemStack_saveMethod = Class.forName("net.minecraft.world.item.ItemStack").getDeclaredMethod("save", nbtTagCompoundClass);
+ List methodList = Arrays.stream(Class.forName("net.minecraft.world.item.ItemStack").getDeclaredMethods()).filter(method ->
+ {
+ Class> returnType = method.getReturnType();
+ Parameter[] parameters = method.getParameters();
+ //Save method sign is foo(net/minecraft/nbt/NBTTagCompound)L(net/minecraft/nbt/NBTTagCompound)
+ return !method.isSynthetic() && !method.isBridge() && parameters.length == 1 && returnType.equals(nbtTagCompoundClass) && parameters[0].getType().equals(nbtTagCompoundClass);
+ }
+ ).collect(Collectors.toList());
+ if (methodList.size() == 1) {
+ itemStack_saveMethod = methodList.get(0);
+ } else {
+ throw new RuntimeException("Unable to find correct itemStack save method, got " + methodList + ", please report!");
+ }
} else {
// Before 1.17
nbtTagCompoundClass = Class.forName("net.minecraft.server." + nmsVersion + ".NBTTagCompound");
@@ -152,7 +169,13 @@ public static String getServerVersion() {
console.getClass().getSuperclass().getMethod("getVersion").invoke(console));
return cachedVersion;
} catch (Exception e) {
- cachedVersion = "Unknown";
+ //Fallback to common substring
+ String[] strings = StringUtils.substringsBetween(Bukkit.getServer().getVersion(), "(MC: ", ")");
+ if (strings != null && strings.length == 1) {
+ cachedVersion = strings[0];
+ } else {
+ cachedVersion = "Unknown";
+ }
return cachedVersion;
}
}
@@ -169,7 +192,7 @@ public static String getServerVersion() {
*/
@Nullable
public static String convertBukkitItemStackToJson(@NotNull ItemStack bStack) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException, InstantiationException {
- if (bStack.getType() == Material.AIR) {
+ if (bStack.getType() == Material.AIR || craftItemStack_asNMSCopyMethod == null || nbtTagCompoundClass == null) {
return null;
}
Object mcStack = craftItemStack_asNMSCopyMethod.invoke(null, bStack);
@@ -216,6 +239,7 @@ public static void syncCommands() throws NoSuchMethodException, InvocationTarget
method.invoke(Bukkit.getServer(), (Object[]) null);
}
+
@Nullable
public static String getMaterialMinecraftNamespacedKey(Material material) {
Object nmsItem;
@@ -226,29 +250,30 @@ public static String getMaterialMinecraftNamespacedKey(Material material) {
Util.debugLog("nmsItem null");
return null;
}
- Method getName = null;
- try {
- getName = nmsItem.getClass().getMethod("getName");
- } catch (NoSuchMethodException exception) {
- Util.debugLog("Mapping changed during minecraft update, dynamic searching...");
- for (Method method : nmsItem.getClass().getMethods()) {
- if (method.getReturnType() == String.class) {
- if (method.getParameterCount() == 0) {
- if (!"toString".equals(method.getName())) {
- if (((String) method.invoke(nmsItem)).contains("stone") || ((String) method.invoke(nmsItem)).contains("STONE")) {
- getName = method;
+ if (getMinecraftKeyNameMethod == null) {
+ try {
+ getMinecraftKeyNameMethod = nmsItem.getClass().getMethod("getName");
+ } catch (NoSuchMethodException exception) {
+ Util.debugLog("Mapping changed during minecraft update, dynamic searching...");
+ for (Method method : nmsItem.getClass().getMethods()) {
+ if (method.getReturnType() == String.class) {
+ if (method.getParameterCount() == 0) {
+ if (!"toString".equals(method.getName())) {
+ if (((String) method.invoke(nmsItem)).contains("stone") || ((String) method.invoke(nmsItem)).contains("STONE")) {
+ getMinecraftKeyNameMethod = method;
+ }
+ break;
}
- break;
}
}
}
}
+ if (getMinecraftKeyNameMethod == null) {
+ Util.debugLog("getMinecraftKeyNameMethod is null");
+ return null;
+ }
}
- if (getName == null) {
- Util.debugLog("getName is null");
- return null;
- }
- return (String) getName.invoke(nmsItem);
+ return (String) getMinecraftKeyNameMethod.invoke(nmsItem);
} catch (IllegalAccessException | ClassNotFoundException | NoSuchMethodException | InvocationTargetException e) {
e.printStackTrace();
return null;
From 3bdd8ad0359e21e0fd8ac75d6a6f30e4adba48fb Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Wed, 1 Dec 2021 18:51:11 +0800
Subject: [PATCH 032/725] Fix item namespace method finding issue, also fix
fallback
---
.../org/maxgamer/quickshop/shop/ContainerShop.java | 2 +-
.../java/org/maxgamer/quickshop/util/MsgUtil.java | 2 +-
.../maxgamer/quickshop/util/ReflectFactory.java | 9 +++++++--
.../java/org/maxgamer/quickshop/util/Util.java | 14 ++++++++++++++
4 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index e5f7859197..8ccc0297bc 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -754,7 +754,7 @@ public List getSignText(@NotNull String locale) {
} else {
// NBTAPI installed
String itemName = Util.getItemCustomName(getItem());
- BaseComponent[] itemComponents = itemName == null ? new BaseComponent[]{new TranslatableComponent(ReflectFactory.getMaterialMinecraftNamespacedKey(getItem().getType()))} : TextComponent.fromLegacyText(itemName);
+ BaseComponent[] itemComponents = itemName == null ? Util.getTranslateComponentForItem(getItem()) : TextComponent.fromLegacyText(itemName);
lines.add(new ComponentPackage(new ComponentBuilder()
.color(ChatColor.RESET)
.append(left)
diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
index ed62eee957..bbeff516c6 100644
--- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
@@ -221,7 +221,7 @@ public static String getTranslateText(ItemStack stack) {
}
public static String convertItemStackToTranslateText(Material mat) {
- return TextSplitter.bakeComponent(new ComponentBuilder().append(new TranslatableComponent(ReflectFactory.getMaterialMinecraftNamespacedKey(mat))).create());
+ return TextSplitter.bakeComponent(new ComponentBuilder().append(Util.getTranslateComponentForMaterial(mat)).create());
}
@Unstable
diff --git a/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java b/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java
index 22377b683d..e6fa2270b7 100644
--- a/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java
+++ b/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java
@@ -34,6 +34,7 @@
import java.lang.reflect.Parameter;
import java.util.Arrays;
import java.util.List;
+import java.util.Locale;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -51,6 +52,7 @@ public class ReflectFactory {
private static Class> cachedNMSClass;
private static String nmsVersion;
private static Method getMinecraftKeyNameMethod;
+ private static boolean isMinecraftKeyNameMethodUnavailable = false;
// private static Object serverInstance;
// private static Field tpsField;
@@ -239,7 +241,6 @@ public static void syncCommands() throws NoSuchMethodException, InvocationTarget
method.invoke(Bukkit.getServer(), (Object[]) null);
}
-
@Nullable
public static String getMaterialMinecraftNamespacedKey(Material material) {
Object nmsItem;
@@ -251,6 +252,9 @@ public static String getMaterialMinecraftNamespacedKey(Material material) {
return null;
}
if (getMinecraftKeyNameMethod == null) {
+ if (isMinecraftKeyNameMethodUnavailable) {
+ return null;
+ }
try {
getMinecraftKeyNameMethod = nmsItem.getClass().getMethod("getName");
} catch (NoSuchMethodException exception) {
@@ -259,7 +263,7 @@ public static String getMaterialMinecraftNamespacedKey(Material material) {
if (method.getReturnType() == String.class) {
if (method.getParameterCount() == 0) {
if (!"toString".equals(method.getName())) {
- if (((String) method.invoke(nmsItem)).contains("stone") || ((String) method.invoke(nmsItem)).contains("STONE")) {
+ if (((String) method.invoke(nmsItem)).toLowerCase().contains(material.name().toLowerCase(Locale.ROOT))) {
getMinecraftKeyNameMethod = method;
}
break;
@@ -269,6 +273,7 @@ public static String getMaterialMinecraftNamespacedKey(Material material) {
}
}
if (getMinecraftKeyNameMethod == null) {
+ isMinecraftKeyNameMethodUnavailable = true;
Util.debugLog("getMinecraftKeyNameMethod is null");
return null;
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java
index fb9faac97b..f0234255ea 100644
--- a/src/main/java/org/maxgamer/quickshop/util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/util/Util.java
@@ -28,6 +28,8 @@
import lombok.SneakyThrows;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.BaseComponent;
+import net.md_5.bungee.api.chat.TextComponent;
+import net.md_5.bungee.api.chat.TranslatableComponent;
import net.md_5.bungee.chat.ComponentSerializer;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.*;
@@ -411,6 +413,18 @@ public static boolean useEnchantmentForEnchantedBook() {
return plugin.getConfiguration().getBoolean("shop.use-enchantment-for-enchanted-book");
}
+ @NotNull
+ public static BaseComponent[] getTranslateComponentForItem(ItemStack stack) {
+ String result = ReflectFactory.getMaterialMinecraftNamespacedKey(stack.getType());
+ return result == null ? TextComponent.fromLegacyText(getItemStackName(stack)) : new BaseComponent[]{new TranslatableComponent(result)};
+ }
+
+ @NotNull
+ public static BaseComponent[] getTranslateComponentForMaterial(Material material) {
+ String result = ReflectFactory.getMaterialMinecraftNamespacedKey(material);
+ return result == null ? TextComponent.fromLegacyText(MsgUtil.getItemi18n(material.name())) : new BaseComponent[]{new TranslatableComponent(result)};
+ }
+
@Nullable
public static String getItemCustomName(@NotNull ItemStack itemStack) {
if (useEnchantmentForEnchantedBook() && itemStack.getType() == Material.ENCHANTED_BOOK) {
From 7f0ed5ddea28c8a0edc96b6f6ff6f9c38e91ba07 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Thu, 2 Dec 2021 12:38:49 +0800
Subject: [PATCH 033/725] Fix caching issue, invalidate cache when getting
---
.../java/org/maxgamer/quickshop/Cache.java | 49 ++++++++++++++-----
1 file changed, 36 insertions(+), 13 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/Cache.java b/src/main/java/org/maxgamer/quickshop/Cache.java
index ec8c43e21c..44779f7c49 100644
--- a/src/main/java/org/maxgamer/quickshop/Cache.java
+++ b/src/main/java/org/maxgamer/quickshop/Cache.java
@@ -21,14 +21,13 @@
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheStats;
-import lombok.AllArgsConstructor;
-import lombok.Data;
import org.bukkit.Location;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.maxgamer.quickshop.api.shop.Shop;
import org.maxgamer.quickshop.shop.SimpleShopManager;
+import java.lang.ref.WeakReference;
import java.util.concurrent.TimeUnit;
/**
@@ -64,15 +63,20 @@ public Cache(QuickShop plugin) {
@Nullable
public Shop find(@NotNull Location location, boolean attached) {
BoxedShop boxedShop = accessCaching.getIfPresent(location);
- if (boxedShop == null) {
+ //Cache is invalid, generated a new one
+ if (boxedShop == null || !boxedShop.isValid()) {
+ Shop shop;
if (attached) {
- boxedShop = new BoxedShop(((SimpleShopManager) plugin.getShopManager()).findShopIncludeAttached(location, false));
+ shop = ((SimpleShopManager) plugin.getShopManager()).findShopIncludeAttached(location, false);
} else {
- boxedShop = new BoxedShop(plugin.getShopManager().getShop(location));
+ shop = plugin.getShopManager().getShop(location);
}
+ setCache(location, shop);
+ return shop;
+ } else {
+ //Cache is valid
+ return boxedShop.getShop();
}
- setCache(location, boxedShop.getShop());
- return boxedShop.getShop();
}
/**
@@ -89,13 +93,32 @@ public void invalidate(@NotNull Location location) {
accessCaching.invalidate(location);
}
- @AllArgsConstructor
- @Data
- static class BoxedShop {
- private Shop shop;
- public boolean isPresent() {
- return shop != null;
+ private static class BoxedShop {
+ @Nullable
+ private final WeakReference shopWeakRef;
+
+ public BoxedShop(Shop shop) {
+ if (shop != null) {
+ this.shopWeakRef = new WeakReference<>(shop);
+ } else {
+ shopWeakRef = null;
+ }
+ }
+
+ @Nullable
+ public Shop getShop() {
+ return shopWeakRef == null ? null : shopWeakRef.get();
+ }
+
+ public boolean isValid() {
+ if (shopWeakRef != null) {
+ Shop shop = shopWeakRef.get();
+ if (shop != null) {
+ return shop.isValid();
+ }
+ }
+ return false;
}
}
}
From af92c4fa9556f21ec5f3da3c514b21bd899e2dbb Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Thu, 2 Dec 2021 16:36:52 +0800
Subject: [PATCH 034/725] Fix case-sensitive issue in enabled languages
---
.../chat/platform/minedown/BungeeQuickChat.java | 4 ++--
.../org/maxgamer/quickshop/shop/ContainerShop.java | 12 +++++-------
.../java/org/maxgamer/quickshop/util/MsgUtil.java | 5 ++---
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java b/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
index 9b125c8750..4139a47e14 100644
--- a/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
+++ b/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
@@ -81,7 +81,7 @@ public void sendItemHologramChat(@NotNull Player player, @NotNull String text, @
TextComponent errorComponent = new TextComponent(plugin.text().of(player, "menu.item-holochat-error").forLocale());
try {
String json = ReflectFactory.convertBukkitItemStackToJson(itemStack);
- ComponentBuilder builder = new ComponentBuilder();
+ ComponentBuilder builder = new ComponentBuilder("");
builder.event(new HoverEvent(HoverEvent.Action.SHOW_ITEM, new ComponentBuilder(json).create()));
TextSplitter.SpilledString spilledString = TextSplitter.deBakeItem(text);
if (spilledString == null) {
@@ -110,7 +110,7 @@ public void sendItemHologramChat(@NotNull Player player, @NotNull String text, @
if (json == null) {
return new QuickComponentImpl(errorComponent);
}
- ComponentBuilder builder = new ComponentBuilder();
+ ComponentBuilder builder = new ComponentBuilder("");
builder.event(new HoverEvent(HoverEvent.Action.SHOW_ITEM, new ComponentBuilder(json).create()));
TextSplitter.SpilledString spilledString = TextSplitter.deBakeItem(message);
if (spilledString == null) {
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index 8ccc0297bc..4a3f9e9634 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -28,7 +28,6 @@
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.TextComponent;
-import net.md_5.bungee.api.chat.TranslatableComponent;
import org.bukkit.DyeColor;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -55,7 +54,6 @@
import org.maxgamer.quickshop.api.event.*;
import org.maxgamer.quickshop.api.shop.*;
import org.maxgamer.quickshop.util.MsgUtil;
-import org.maxgamer.quickshop.util.ReflectFactory;
import org.maxgamer.quickshop.util.Util;
import org.maxgamer.quickshop.util.logging.container.ShopRemoveLog;
@@ -737,7 +735,7 @@ public List getSignText(@NotNull String locale) {
}
// TODO No-longer use SHOP_SIGN_PREFIX since we use modern storage method. Pending for deletion.
- lines.add(new ComponentPackage(new ComponentBuilder().appendLegacy(SHOP_SIGN_PREFIX).reset().color(ChatColor.RESET).appendLegacy(line2).create()));
+ lines.add(new ComponentPackage(new ComponentBuilder("").appendLegacy(SHOP_SIGN_PREFIX).reset().color(ChatColor.RESET).appendLegacy(line2).create()));
//line 3
if (plugin.getConfiguration().getBoolean("shop.force-use-item-original-name") || !this.getItem().hasItemMeta() || !this.getItem().getItemMeta().hasDisplayName()) {
@@ -745,7 +743,7 @@ public List getSignText(@NotNull String locale) {
BaseComponent[] right = TextComponent.fromLegacyText(plugin.text().of("signs.item-right").forLocale());
if (plugin.getNbtapi() == null) {
// NBTAPI not installed
- lines.add(new ComponentPackage(new ComponentBuilder()
+ lines.add(new ComponentPackage(new ComponentBuilder("")
.color(ChatColor.RESET)
.append(left)
.append(TextComponent.fromLegacyText(Util.getItemStackName(getItem())))
@@ -755,7 +753,7 @@ public List getSignText(@NotNull String locale) {
// NBTAPI installed
String itemName = Util.getItemCustomName(getItem());
BaseComponent[] itemComponents = itemName == null ? Util.getTranslateComponentForItem(getItem()) : TextComponent.fromLegacyText(itemName);
- lines.add(new ComponentPackage(new ComponentBuilder()
+ lines.add(new ComponentPackage(new ComponentBuilder("")
.color(ChatColor.RESET)
.append(left)
.append(itemComponents)
@@ -763,7 +761,7 @@ public List getSignText(@NotNull String locale) {
.create()));
}
} else {
- lines.add(new ComponentPackage(new ComponentBuilder().color(ChatColor.RESET).appendLegacy(plugin.text().of("signs.item-left").forLocale())
+ lines.add(new ComponentPackage(new ComponentBuilder("").color(ChatColor.RESET).appendLegacy(plugin.text().of("signs.item-left").forLocale())
.append(TextComponent.fromLegacyText(Util.getItemStackName(getItem())))
.appendLegacy(plugin.text().of("signs.item-right").forLocale()).create()));
}
@@ -777,7 +775,7 @@ public List getSignText(@NotNull String locale) {
} else {
line4 = plugin.text().of("signs.price", plugin.getShopManager().format(this.getPrice(), this)).forLocale();
}
- lines.add(new ComponentPackage(new ComponentBuilder().color(ChatColor.RESET).appendLegacy(line4).create()));
+ lines.add(new ComponentPackage(new ComponentBuilder("").color(ChatColor.RESET).appendLegacy(line4).create()));
return lines;
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
index bbeff516c6..fabe8abe35 100644
--- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
@@ -27,7 +27,6 @@
import lombok.Data;
import lombok.Getter;
import net.md_5.bungee.api.chat.ComponentBuilder;
-import net.md_5.bungee.api.chat.TranslatableComponent;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@@ -221,7 +220,7 @@ public static String getTranslateText(ItemStack stack) {
}
public static String convertItemStackToTranslateText(Material mat) {
- return TextSplitter.bakeComponent(new ComponentBuilder().append(Util.getTranslateComponentForMaterial(mat)).create());
+ return TextSplitter.bakeComponent(new ComponentBuilder("").append(Util.getTranslateComponentForMaterial(mat)).create());
}
@Unstable
@@ -732,7 +731,7 @@ public static void sendDirectMessage(@Nullable CommandSender sender, @Nullable S
if (spilledString == null) {
plugin.getQuickChat().send(sender, msg);
} else {
- ComponentBuilder builder = new ComponentBuilder();
+ ComponentBuilder builder = new ComponentBuilder("");
builder.appendLegacy(spilledString.getLeft());
builder.append(spilledString.getComponents());
builder.appendLegacy(spilledString.getRight());
From c6692b419692653e9bf7c4fa32d46ff0054831cd Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Thu, 2 Dec 2021 16:57:12 +0800
Subject: [PATCH 035/725] Switch access token to new one
---
.../quickshop/util/reporter/error/RollbarErrorReporter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 7175ad9663..5ed6d5c1c1 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
@@ -64,7 +64,7 @@ public class RollbarErrorReporter {
public RollbarErrorReporter(@NotNull QuickShop plugin) {
this.plugin = plugin;
- Config config = ConfigBuilder.withAccessToken("1d362290de254b27a9b6f4982587260c")
+ Config config = ConfigBuilder.withAccessToken("164c5246fa464ae4a6a0867a856d4062")
.environment(Util.isDevEdition() ? "development" : "production")
.platform(plugin.getServer().getVersion())
.codeVersion(QuickShop.getVersion())
From 98cd648b9b864b03da4df1ba58cf069fc387939e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 2 Dec 2021 14:24:50 +0000
Subject: [PATCH 036/725] Bump IridiumSkyblock from 3.1.2 to 3.2.2
Bumps IridiumSkyblock from 3.1.2 to 3.2.2.
---
updated-dependencies:
- dependency-name: com.iridium:IridiumSkyblock
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 66776ad702..05d69a6e3d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -863,7 +863,7 @@
com.iridium
IridiumSkyblock
- 3.1.2
+ 3.2.2
provided
From 7ca0e410e52ba90d293e02b40a38b5edea4e3dde Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 7 Dec 2021 14:16:29 +0800
Subject: [PATCH 037/725] #16 Try to fix cache method issue
---
.../quickshop/util/ReflectFactory.java | 67 ++++++++++++-------
1 file changed, 41 insertions(+), 26 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java b/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java
index e6fa2270b7..586797edc9 100644
--- a/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java
+++ b/src/main/java/org/maxgamer/quickshop/util/ReflectFactory.java
@@ -35,6 +35,7 @@
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
+import java.util.function.Predicate;
import java.util.logging.Level;
import java.util.stream.Collectors;
@@ -241,6 +242,29 @@ public static void syncCommands() throws NoSuchMethodException, InvocationTarget
method.invoke(Bukkit.getServer(), (Object[]) null);
}
+ private static Method findMethod(Class> targetClass, Class> returnType, Predicate filter, Class>... args) {
+ FindProcess:
+ for (Method method : targetClass.getMethods()) {
+ if (method.isBridge() && method.isSynthetic()) {
+ continue;
+ }
+ if (method.getReturnType() == returnType) {
+ if (method.getParameterCount() == args.length) {
+ Parameter[] parameters = method.getParameters();
+ for (int i = 0; i < args.length; i++) {
+ if (parameters[i].getType() != args[i]) {
+ continue FindProcess;
+ }
+ }
+ if (filter.test(method)) {
+ return method;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
@Nullable
public static String getMaterialMinecraftNamespacedKey(Material material) {
Object nmsItem;
@@ -251,34 +275,25 @@ public static String getMaterialMinecraftNamespacedKey(Material material) {
Util.debugLog("nmsItem null");
return null;
}
- if (getMinecraftKeyNameMethod == null) {
- if (isMinecraftKeyNameMethodUnavailable) {
- return null;
- }
- try {
- getMinecraftKeyNameMethod = nmsItem.getClass().getMethod("getName");
- } catch (NoSuchMethodException exception) {
- Util.debugLog("Mapping changed during minecraft update, dynamic searching...");
- for (Method method : nmsItem.getClass().getMethods()) {
- if (method.getReturnType() == String.class) {
- if (method.getParameterCount() == 0) {
- if (!"toString".equals(method.getName())) {
- if (((String) method.invoke(nmsItem)).toLowerCase().contains(material.name().toLowerCase(Locale.ROOT))) {
- getMinecraftKeyNameMethod = method;
- }
- break;
- }
- }
- }
+ try {
+ getMinecraftKeyNameMethod = nmsItem.getClass().getMethod("getName");
+ } catch (NoSuchMethodException exception) {
+ Util.debugLog("Mapping changed during minecraft update, dynamic searching...");
+ getMinecraftKeyNameMethod = findMethod(nmsItem.getClass(), String.class, method -> {
+ try {
+ return !"toString".equals(method.getName()) && ((String) method.invoke(nmsItem)).toLowerCase().contains(material.getKey().getKey().toLowerCase(Locale.ROOT));
+ } catch (Throwable throwable) {
+ return false;
}
- }
- if (getMinecraftKeyNameMethod == null) {
- isMinecraftKeyNameMethodUnavailable = true;
- Util.debugLog("getMinecraftKeyNameMethod is null");
- return null;
- }
+ });
+ }
+
+ if (getMinecraftKeyNameMethod == null) {
+ Util.debugLog("getMinecraftKeyNameMethod is null");
+ return null;
+ } else {
+ return (String) getMinecraftKeyNameMethod.invoke(nmsItem);
}
- return (String) getMinecraftKeyNameMethod.invoke(nmsItem);
} catch (IllegalAccessException | ClassNotFoundException | NoSuchMethodException | InvocationTargetException e) {
e.printStackTrace();
return null;
From 9f6cfc3036e460b393f7819139efbf4208847408 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 7 Dec 2021 14:17:08 +0800
Subject: [PATCH 038/725] Delete incorrect reloaction
---
pom.xml | 4 ----
1 file changed, 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 66776ad702..ceda44a4d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -207,10 +207,6 @@
javax.annotation.
org.maxgamer.quickshop.shade.org.javax.annotation.
-
- com.google.common.
- org.maxgamer.quickshop.shade.com.google.common.
-
com.flowpowered.math.
org.maxgamer.quickshop.shade.com.flowpowered.math.
From 483d5a6baba0f50dd2369b276384423734e6135d Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 7 Dec 2021 14:46:14 +0800
Subject: [PATCH 039/725] Fix mistaken on update message
---
.../util/updater/impl/JenkinsUpdater.java | 4 +
.../quickshop/watcher/UpdateWatcher.java | 94 +++++++++++++------
2 files changed, 68 insertions(+), 30 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/util/updater/impl/JenkinsUpdater.java b/src/main/java/org/maxgamer/quickshop/util/updater/impl/JenkinsUpdater.java
index 5df392021f..466341f69f 100644
--- a/src/main/java/org/maxgamer/quickshop/util/updater/impl/JenkinsUpdater.java
+++ b/src/main/java/org/maxgamer/quickshop/util/updater/impl/JenkinsUpdater.java
@@ -91,6 +91,10 @@ public boolean isLatest(@NotNull VersionType versionType) {
if (QuickShop.getInstance().getGameVersion().isEndOfLife()) { // EOL server won't receive future updates
return true;
}
+ //Not checking updates for incorrect type
+ if (versionType != getCurrentRunning()) {
+ return true;
+ }
try (InputStream inputStream = HttpRequest.get(new URL(jobUrl + "lastSuccessfulBuild/artifact/target/BUILDINFO"))
.header("User-Agent", "Java-QuickShop-" + QuickShop.getFork() + " " + QuickShop.getVersion())
.execute()
diff --git a/src/main/java/org/maxgamer/quickshop/watcher/UpdateWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/UpdateWatcher.java
index b71742d3d5..13054f8a11 100644
--- a/src/main/java/org/maxgamer/quickshop/watcher/UpdateWatcher.java
+++ b/src/main/java/org/maxgamer/quickshop/watcher/UpdateWatcher.java
@@ -52,40 +52,74 @@ public BukkitTask getCronTask() {
public void init() {
cronTask = QuickShop.getInstance().getServer().getScheduler().runTaskTimerAsynchronously(QuickShop.getInstance(), () -> {
- if (updater.isLatest(VersionType.STABLE)) {
- return;
- }
- QuickShop.getInstance()
- .getLogger()
- .info(
- "A new version of QuickShop has been released! [" + updater.getRemoteServerVersion() + "]");
- QuickShop.getInstance()
- .getLogger()
- .info("Update here: https://www.spigotmc.org/resources/62575/");
-
- for (Player player : Bukkit.getOnlinePlayers()) {
- if (QuickShop.getPermissionManager()
- .hasPermission(player, "quickshop.alerts")) {
- List notifys =
- QuickShop.getInstance().text().ofList(player, "updatenotify.list").forLocale();
- int notifyNum = -1;
- if (notifys.size() > 1) {
- notifyNum = random.nextInt(notifys.size());
+ if (!updater.isLatest(getUpdater().getCurrentRunning())) {
+ if (updater.getCurrentRunning() == VersionType.STABLE) {
+ QuickShop.getInstance()
+ .getLogger()
+ .info(
+ "A new version of QuickShop has been released! [" + updater.getRemoteServerVersion() + "]");
+ QuickShop.getInstance()
+ .getLogger()
+ .info("Update here: https://www.spigotmc.org/resources/62575/");
+
+ for (Player player : Bukkit.getOnlinePlayers()) {
+ if (QuickShop.getPermissionManager()
+ .hasPermission(player, "quickshop.alerts")) {
+ List notifys =
+ QuickShop.getInstance().text().ofList(player, "updatenotify.list").forLocale();
+ int notifyNum = -1;
+ if (notifys.size() > 1) {
+ notifyNum = random.nextInt(notifys.size());
+ }
+ String notify;
+ if (notifyNum > 0) { // Translate bug.
+ notify = notifys.get(notifyNum);
+ } else {
+ notify = "New update {0} now avaliable! Please update!";
+ }
+ notify = MsgUtil.fillArgs(notify, updater.getRemoteServerVersion(), QuickShop.getInstance().getBuildInfo().getBuildTag());
+ player.sendMessage(ChatColor.GREEN + "---------------------------------------------------");
+ player.sendMessage(ChatColor.GREEN + notify);
+ player.sendMessage(ChatColor.GREEN + "Type command " + ChatColor.YELLOW + "/qs update" + ChatColor.GREEN + " or click the link below to update QuickShop :)");
+ player.sendMessage(ChatColor.AQUA + " https://www.spigotmc.org/resources/62575/");
+ player.sendMessage(ChatColor.GREEN + "---------------------------------------------------");
+ }
}
- String notify;
- if (notifyNum > 0) { // Translate bug.
- notify = notifys.get(notifyNum);
- } else {
- notify = "New update {0} now avaliable! Please update!";
+ } else {
+ QuickShop.getInstance()
+ .getLogger()
+ .info(
+ "A new version of QuickShop snapshot has been released! [" + updater.getRemoteServerVersion() + "]");
+ QuickShop.getInstance()
+ .getLogger()
+ .info("Update here: https://ci.codemc.io/job/Ghost-chu/job/QuickShop-Reremake-SNAPSHOT");
+
+ for (Player player : Bukkit.getOnlinePlayers()) {
+ if (QuickShop.getPermissionManager()
+ .hasPermission(player, "quickshop.alerts")) {
+ List notifys =
+ QuickShop.getInstance().text().ofList(player, "updatenotify.list").forLocale();
+ int notifyNum = -1;
+ if (notifys.size() > 1) {
+ notifyNum = random.nextInt(notifys.size());
+ }
+ String notify;
+ if (notifyNum > 0) { // Translate bug.
+ notify = notifys.get(notifyNum);
+ } else {
+ notify = "New update {0} now avaliable! Please update!";
+ }
+ notify = MsgUtil.fillArgs(notify, updater.getRemoteServerVersion(), QuickShop.getInstance().getBuildInfo().getBuildTag());
+ player.sendMessage(ChatColor.GREEN + "---------------------------------------------------");
+ player.sendMessage(ChatColor.GREEN + notify);
+ player.sendMessage(ChatColor.GREEN + "Type command " + ChatColor.YELLOW + "/qs update" + ChatColor.GREEN + " or click the link below to update QuickShop :)");
+ player.sendMessage(ChatColor.AQUA + " https://ci.codemc.io/job/Ghost-chu/job/QuickShop-Reremake-SNAPSHOT");
+ player.sendMessage(ChatColor.GREEN + "---------------------------------------------------");
+ }
}
- notify = MsgUtil.fillArgs(notify, updater.getRemoteServerVersion(), QuickShop.getInstance().getBuildInfo().getBuildTag());
- player.sendMessage(ChatColor.GREEN + "---------------------------------------------------");
- player.sendMessage(ChatColor.GREEN + notify);
- player.sendMessage(ChatColor.GREEN + "Type command " + ChatColor.YELLOW + "/qs update" + ChatColor.GREEN + " or click the link below to update QuickShop :)");
- player.sendMessage(ChatColor.AQUA + " https://www.spigotmc.org/resources/62575/");
- player.sendMessage(ChatColor.GREEN + "---------------------------------------------------");
}
}
+
}, 1, 20 * 60 * 60);
}
From 570c0ad7644d1600bc0ce412169f271d97994c6d Mon Sep 17 00:00:00 2001
From: Warrior <50800980+Warriorrrr@users.noreply.github.com>
Date: Wed, 8 Dec 2021 16:53:42 +0100
Subject: [PATCH 040/725] Fix price command bypassing the integer only option.
---
.../quickshop/command/subcommand/SubCommand_Price.java | 5 +++++
1 file changed, 5 insertions(+)
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 c89781f78b..fcaa81a361 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
@@ -122,6 +122,11 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
return;
}
+ if (checkResult.getStatus() == PriceLimiterStatus.NOT_A_WHOLE_NUMBER) {
+ plugin.text().of(sender, "not-a-integer", price).send();
+ return;
+ }
+
if (fee > 0) {
EconomyTransaction transaction = EconomyTransaction.builder()
.allowLoan(plugin.getConfiguration().getOrDefault("shop.allow-economy-loan", false))
From 92afe6d69f45787cf6d6b1de300f1a27066c67bd Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 9 Dec 2021 14:21:18 +0000
Subject: [PATCH 041/725] Bump advanced-region-market from 3.3.5 to 3.3.6
Bumps advanced-region-market from 3.3.5 to 3.3.6.
---
updated-dependencies:
- dependency-name: com.github.alex9849:advanced-region-market
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index ceda44a4d2..5402308237 100644
--- a/pom.xml
+++ b/pom.xml
@@ -853,7 +853,7 @@
com.github.alex9849
advanced-region-market
- 3.3.5
+ 3.3.6
provided
From 826590a13a561e2af56496f7a5b4d1e8ecc36315 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 9 Dec 2021 14:21:42 +0000
Subject: [PATCH 042/725] Bump SongodaCore from 2.5.14 to 2.6.3
Bumps SongodaCore from 2.5.14 to 2.6.3.
---
updated-dependencies:
- dependency-name: com.songoda:SongodaCore
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index ceda44a4d2..6a863a6ebe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -787,7 +787,7 @@
com.songoda
SongodaCore
- 2.5.14
+ 2.6.3
provided
From 34f96863c312c862285362ebe198613a0f43cd52 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Thu, 9 Dec 2021 22:32:05 +0800
Subject: [PATCH 043/725] Fix #20, correct the event using
---
.../integration/towny/TownyIntegration.java | 27 +++++++++----------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/integration/towny/TownyIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/towny/TownyIntegration.java
index a21c710206..52fab60bac 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/towny/TownyIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/towny/TownyIntegration.java
@@ -22,7 +22,7 @@
import com.palmergames.bukkit.towny.TownyAPI;
import com.palmergames.bukkit.towny.event.PlotClearEvent;
import com.palmergames.bukkit.towny.event.TownRemoveResidentEvent;
-import com.palmergames.bukkit.towny.event.actions.TownyDestroyEvent;
+import com.palmergames.bukkit.towny.event.town.TownUnclaimEvent;
import com.palmergames.bukkit.towny.exceptions.NotRegisteredException;
import com.palmergames.bukkit.towny.object.Town;
import com.palmergames.bukkit.towny.object.TownBlock;
@@ -137,11 +137,15 @@ public void deleteShops(UUID owner, Town town) {
}
public void purgeShops(TownBlock townBlock) {
- if (townBlock == null) {
+ purgeShops(townBlock.getWorldCoord());
+ }
+
+ public void purgeShops(WorldCoord worldCoord) {
+ if (worldCoord == null) {
return;
}
String worldName;
- worldName = townBlock.getWorld().getName();
+ worldName = worldCoord.getBukkitWorld().getName();
//Getting all shop with world-chunk-shop mapping
for (Map.Entry>> entry : plugin.getShopManager().getShops().entrySet()) {
//Matching world
@@ -153,14 +157,9 @@ public void purgeShops(TownBlock townBlock) {
Map shopMap = chunkedShopEntry.getValue();
for (Shop shop : shopMap.values()) {
//Matching Owner
- try {
- //It should be equal in address
- if (WorldCoord.parseWorldCoord(shop.getLocation()).getTownBlock() == townBlock) {
- //delete it
- shop.delete();
- }
- } catch (NotRegisteredException ignored) {
- //Is not in town, continue
+ if (WorldCoord.parseWorldCoord(shop.getLocation()).equals(worldCoord)) {
+ //delete it
+ shop.delete();
}
}
}
@@ -191,14 +190,14 @@ public void onPlotClear(PlotClearEvent event) {
}
@EventHandler
- public void onPlotDestroy(TownyDestroyEvent event) {
+ public void onPlotDestroy(TownUnclaimEvent event) {
if (!deleteShopOnPlotDestroy) {
return;
}
if (Bukkit.isPrimaryThread()) {
- purgeShops(event.getTownBlock());
+ purgeShops(event.getWorldCoord());
} else {
- Util.mainThreadRun(() -> purgeShops(event.getTownBlock()));
+ Util.mainThreadRun(() -> purgeShops(event.getWorldCoord()));
}
}
From 638de58bcb63fcdc9b7a618da9be2d90c4f82cdf Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 11 Dec 2021 17:26:34 +0800
Subject: [PATCH 044/725] Fix #17
---
.../quickshop/listener/PlayerListener.java | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java b/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
index 3856048c77..8610faa590 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
@@ -199,15 +199,14 @@ private void postTrade(PlayerInteractEvent e) {
final AbstractEconomy eco = plugin.getEconomy();
final double price = shop.getPrice();
- final double money = plugin.getEconomy().getBalance(p.getUniqueId(), shop.getLocation().getWorld(), shop.getCurrency());
final Inventory playerInventory = p.getInventory();
if (shop.isSelling()) {
if (shop.getRemainingStock() == 0) {
plugin.text().of(p, "purchase-out-of-stock", shop.ownerName()).send();
return;
}
-
- int itemAmount = getPlayerCanBuy(shop, money, price, playerInventory);
+ final double traderBalance = eco.getBalance(p.getUniqueId(), shop.getLocation().getWorld(), shop.getCurrency());
+ int itemAmount = getPlayerCanBuy(shop, traderBalance, price, playerInventory);
if (shop.isStackingShop()) {
plugin.text().of(p, "how-many-buy-stack", Integer.toString(shop.getItem().getAmount()), Integer.toString(itemAmount)).send();
} else {
@@ -218,8 +217,8 @@ private void postTrade(PlayerInteractEvent e) {
plugin.text().of(p, "purchase-out-of-space", shop.ownerName()).send();
return;
}
-
- int items = getPlayerCanSell(shop, money, price, playerInventory);
+ final double ownerBalance = eco.getBalance(shop.getOwner(), shop.getLocation().getWorld(), shop.getCurrency());
+ int items = getPlayerCanSell(shop, ownerBalance, price, playerInventory);
if (shop.isStackingShop()) {
plugin.text().of(p, "how-many-sell-stack", Integer.toString(shop.getItem().getAmount()), Integer.toString(items)).send();
} else {
@@ -291,11 +290,11 @@ else if (e.useInteractedBlock() == Event.Result.ALLOW
}
}
- private int getPlayerCanBuy(Shop shop, double money, double price, Inventory playerInventory) {
+ private int getPlayerCanBuy(Shop shop, double traderBalance, double price, Inventory playerInventory) {
if (shop.isFreeShop()) { // Free shop
return Math.min(shop.getRemainingStock(), Util.countSpace(playerInventory, shop.getItem()));
}
- int itemAmount = Math.min(shop.getRemainingSpace(), (int) Math.floor(money / price));
+ int itemAmount = Math.min(shop.getRemainingStock(), (int) Math.floor(traderBalance / price));
if (!shop.isUnlimited()) {
itemAmount = Math.min(itemAmount, shop.getRemainingStock());
}
@@ -305,13 +304,13 @@ private int getPlayerCanBuy(Shop shop, double money, double price, Inventory pla
return itemAmount;
}
- private int getPlayerCanSell(Shop shop, double money, double price, Inventory playerInventory) {
+ private int getPlayerCanSell(Shop shop, double ownerBalance, double price, Inventory playerInventory) {
if (shop.isFreeShop()) {
return Math.min(shop.getRemainingSpace(), Util.countItems(playerInventory, shop.getItem()));
}
int items = Util.countItems(playerInventory, shop.getItem());
- final int ownerCanAfford = (int) (money / price);
+ final int ownerCanAfford = (int) (ownerBalance / price);
if (!shop.isUnlimited()) {
// Amount check player amount and shop empty slot
items = Math.min(items, shop.getRemainingSpace());
From 528eeef582a34111b0e4051177e99b02407326ca Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 11 Dec 2021 17:56:17 +0800
Subject: [PATCH 045/725] Change misleading configuration description
---
src/main/resources/config.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index c5ade0dff7..fbda3c51ab 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -361,6 +361,7 @@ shop:
#Protection check
#This will send a FAKE BlockBreakEvent to check if you can break a block.
#This may conflict with some protection plugins!
+ #Integration checking will be checked after this, so disable it when it's conflicting with integration
#If you don't want this, then please disable it and use the integration below instead.
protection-checking: true
@@ -517,7 +518,6 @@ matcher:
#Should the Plugin check the shulkerBox contents?
shulkerBox: true
#Integration is under BETA stage, please report any bugs to our Issue Tracker.
-#You must disable protection-checks before enabling integration.
integration:
#Towny Integration
towny:
From a94cd91759449c022c5124f9a757aa4cf70e6ad7 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 11 Dec 2021 18:03:36 +0800
Subject: [PATCH 046/725] Backport for NPE fix
---
.../maxgamer/quickshop/localization/text/SimpleTextManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index 9713540cde..34eca19605 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -368,7 +368,7 @@ private TextList(SimpleTextManager manager, UUID sender, Map fallbackLocal() {
- return this.bundled.getStringList(path);
+ return this.bundled != null ? this.bundled.getStringList(path) : Collections.emptyList();
}
/**
From 47880cad5691e2ea63bea2229cf7e382f2496991 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 11 Dec 2021 20:43:42 +0800
Subject: [PATCH 047/725] Don't use SimplixStorage
---
.../org/maxgamer/quickshop/QuickShop.java | 1094 +++++++++--------
.../api/economy/AbstractEconomy.java | 2 +-
.../api/economy/EconomyTransaction.java | 2 +-
.../api/shop/AbstractDisplayItem.java | 8 +-
.../org/maxgamer/quickshop/api/shop/Shop.java | 2 +-
.../command/SimpleCommandManager.java | 4 +-
.../subcommand/SubCommand_Convert.java | 4 +-
.../command/subcommand/SubCommand_Debug.java | 6 +-
.../command/subcommand/SubCommand_Find.java | 10 +-
.../command/subcommand/SubCommand_Item.java | 8 +-
.../command/subcommand/SubCommand_Price.java | 14 +-
.../command/subcommand/SubCommand_Refill.java | 2 +-
.../command/subcommand/SubCommand_Reset.java | 2 +-
.../SubCommand_SilentUnlimited.java | 4 +-
.../command/subcommand/SubCommand_Size.java | 8 +-
.../subcommand/SubCommand_Unlimited.java | 4 +-
.../quickshop/database/DatabaseManager.java | 4 +-
.../economy/Economy_GemsEconomy.java | 2 +-
.../quickshop/economy/Economy_Mixed.java | 8 +-
.../quickshop/economy/Economy_TNE.java | 2 +-
.../quickshop/economy/Economy_Vault.java | 2 +-
.../eventmanager/QSEventManager.java | 2 +-
.../integration/SimpleIntegrationManager.java | 2 +-
.../fabledskyblock/FabledIntegration.java | 4 +-
.../factionsuuid/FactionsUUIDIntegration.java | 38 +-
.../GriefPreventionIntegration.java | 8 +-
.../IridiumSkyblockIntegration.java | 4 +-
.../integration/lands/LandsIntegration.java | 6 +-
.../plotsquared/PlotSquaredIntegrationV6.java | 4 +-
.../residence/ResidenceIntegration.java | 6 +-
.../SuperiorSkyblock2Integration.java | 6 +-
.../integration/towny/TownyIntegration.java | 14 +-
.../worldguard/WorldGuardIntegration.java | 10 +-
.../quickshop/listener/BlockListener.java | 12 +-
.../quickshop/listener/ChatListener.java | 2 +-
.../listener/DisplayProtectionListener.java | 6 +-
.../EnhanceDisplayProtectionListener.java | 2 +-
.../quickshop/listener/InternalListener.java | 4 +-
.../quickshop/listener/LockListener.java | 10 +-
.../quickshop/listener/PlayerListener.java | 10 +-
.../quickshop/listener/PluginListener.java | 4 +-
.../listener/ShopProtectionListener.java | 14 +-
.../quickshop/shop/ContainerShop.java | 8 +-
.../quickshop/shop/RealDisplayItem.java | 2 +-
.../maxgamer/quickshop/shop/ShopLoader.java | 2 +-
.../maxgamer/quickshop/shop/ShopPurger.java | 12 +-
.../quickshop/shop/SimpleShopManager.java | 64 +-
.../quickshop/shop/VirtualDisplayItem.java | 2 +-
.../maxgamer/quickshop/util/InteractUtil.java | 12 +-
.../org/maxgamer/quickshop/util/MsgUtil.java | 14 +-
.../quickshop/util/PermissionChecker.java | 8 +-
.../org/maxgamer/quickshop/util/Util.java | 36 +-
.../util/config/ConfigurationFixer.java | 5 +-
.../config/ConfigurationFixerLightning.java | 2 +-
.../util/config/ConfigurationUpdater.java | 6 +-
.../BuiltInEconomyFormatter.java | 8 +-
.../economyformatter/EconomyFormatter.java | 10 +-
.../item/QuickShopItemMatcherImpl.java | 10 +-
.../maxgamer/quickshop/util/paste/Paste.java | 6 +-
.../watcher/DisplayAutoDespawnWatcher.java | 2 +-
.../quickshop/watcher/LogWatcher.java | 2 +-
.../quickshop/watcher/OngoingFeeWatcher.java | 6 +-
.../eventmanager/ListenerContainerTest.java | 3 +-
.../quickshop/util/InteractUtilTest.java | 54 +-
64 files changed, 824 insertions(+), 810 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index babb09595f..9036621957 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -22,8 +22,10 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
+import de.leonhard.storage.LightningBuilder;
import de.leonhard.storage.Yaml;
-import de.leonhard.storage.sections.FlatFileSection;
+import de.leonhard.storage.internal.settings.ConfigSettings;
+import de.leonhard.storage.internal.settings.ReloadSettings;
import de.tr7zw.nbtapi.plugin.NBTAPI;
import lombok.Getter;
import lombok.Setter;
@@ -79,8 +81,8 @@
import org.maxgamer.quickshop.util.Timer;
import org.maxgamer.quickshop.util.*;
import org.maxgamer.quickshop.util.compatibility.SimpleCompatibilityManager;
-import org.maxgamer.quickshop.util.config.ConfigProviderLightning;
-import org.maxgamer.quickshop.util.config.ConfigurationFixerLightning;
+import org.maxgamer.quickshop.util.config.ConfigProvider;
+import org.maxgamer.quickshop.util.config.ConfigurationFixer;
import org.maxgamer.quickshop.util.envcheck.*;
import org.maxgamer.quickshop.util.matcher.item.BukkitItemMatcherImpl;
import org.maxgamer.quickshop.util.matcher.item.QuickShopItemMatcherImpl;
@@ -125,7 +127,7 @@ public class QuickShop extends JavaPlugin implements QuickShopAPI {
/**
* The shop limites.
*/
- private final ConfigProviderLightning configProvider = new ConfigProviderLightning(this, new File(getDataFolder(), "config.yml"));
+ private final ConfigProvider configProvider = new ConfigProvider(this, new File(getDataFolder(), "config.yml"));
private final List timerTaskList = new ArrayList<>(3);
@Getter
private final ReloadManager reloadManager = new ReloadManager();
@@ -313,6 +315,9 @@ public IntegrationManager getIntegrationHelper() {
return integrationHelper;
}
+ @Deprecated
+ private Yaml configurationForCompatibility = null;
+
/**
* Get the Player's Shop limit.
*
@@ -320,7 +325,7 @@ public IntegrationManager getIntegrationHelper() {
* @return int Player's shop limit
*/
public int getShopLimit(@NotNull Player p) {
- int max = getConfiguration().getInt("limits.default");
+ int max = getConfig().getInt("limits.default");
for (Entry entry : limits.entrySet()) {
if (entry.getValue() > max && getPermissionManager().hasPermission(p, entry.getKey())) {
max = entry.getValue();
@@ -335,25 +340,25 @@ public int getShopLimit(@NotNull Player p) {
private void load3rdParty() {
// added for compatibility reasons with OpenInv - see
// https://github.com/KaiKikuchi/QuickShop/issues/139
- if (getConfiguration().getBoolean("plugin.OpenInv")) {
+ if (getConfig().getBoolean("plugin.OpenInv")) {
this.openInvPlugin = Bukkit.getPluginManager().getPlugin("OpenInv");
if (this.openInvPlugin != null) {
getLogger().info("Successfully loaded OpenInv support!");
}
}
- if (getConfiguration().getBoolean("plugin.PlaceHolderAPI")) {
+ if (getConfig().getBoolean("plugin.PlaceHolderAPI")) {
this.placeHolderAPI = Bukkit.getPluginManager().getPlugin("PlaceholderAPI");
if (this.placeHolderAPI != null) {
getLogger().info("Successfully loaded PlaceHolderAPI support!");
}
}
- if (getConfiguration().getBoolean("plugin.BlockHub")) {
+ if (getConfig().getBoolean("plugin.BlockHub")) {
this.blockHubPlugin = Bukkit.getPluginManager().getPlugin("BlockHub");
if (this.blockHubPlugin != null) {
getLogger().info("Successfully loaded BlockHub support!");
}
}
- if (getConfiguration().getBoolean("plugin.WorldEdit")) {
+ if (getConfig().getBoolean("plugin.WorldEdit")) {
// GameVersion gameVersion = GameVersion.get(nmsVersion);
this.worldEditPlugin = Bukkit.getPluginManager().getPlugin("WorldEdit");
if (this.worldEditPlugin != null) {
@@ -363,7 +368,7 @@ private void load3rdParty() {
}
}
- if (getConfiguration().getBoolean("plugin.LWC")) {
+ if (getConfig().getBoolean("plugin.LWC")) {
this.lwcPlugin = Bukkit.getPluginManager().getPlugin("LWC");
if (this.lwcPlugin != null) {
if (Util.isMethodAvailable("com.griefcraft.lwc.LWC", "findProtection", org.bukkit.Location.class)) {
@@ -374,7 +379,7 @@ private void load3rdParty() {
}
}
}
- if (getConfiguration().getBoolean("plugin.NBTAPI")) {
+ if (getConfig().getBoolean("plugin.NBTAPI")) {
this.nbtapi = (NBTAPI) Bukkit.getPluginManager().getPlugin("NBTAPI");
if (this.nbtapi != null) {
if (!this.nbtapi.isCompatible()) {
@@ -396,7 +401,7 @@ private void load3rdParty() {
getLogger().info("Successfully loaded ProtocolLib support!");
} else {
getLogger().warning("Failed to load ProtocolLib support, fallback to real item display");
- getConfiguration().set("shop.display-type", 0);
+ getConfig().set("shop.display-type", 0);
saveConfiguration();
}
}
@@ -425,6 +430,31 @@ private void load3rdParty() {
}
}
+ // /**
+// * Logs the given string to qs.log, if QuickShop is configured to do so.
+// *
+// * @param s The string to log. It will be prefixed with the date and time.
+// */
+// public void log(@NotNull String s) {
+// Util.debugLog("[SHOP LOG] " + s);
+// if (this.getLogWatcher() == null) {
+// return;
+// }
+// this.getLogWatcher().log(s);
+// }
+
+ public void logEvent(@NotNull Object eventObject) {
+ if (this.getLogWatcher() == null) {
+ return;
+ }
+ if (loggingLocation == 0) {
+ this.getLogWatcher().log(JsonUtil.getGson().toJson(eventObject));
+ } else {
+ getDatabaseHelper().insertHistoryRecord(eventObject);
+ }
+
+ }
+
/**
* Tries to load the economy and its core. If this fails, it will try to use vault. If that fails,
* it will return false.
@@ -436,16 +466,16 @@ private void load3rdParty() {
public boolean loadEcon() {
try {
// EconomyCore core = new Economy_Vault();
- switch (EconomyType.fromID(getConfiguration().getInt("economy-type"))) {
+ switch (EconomyType.fromID(getConfig().getInt("economy-type"))) {
case UNKNOWN:
setupBootError(new BootError(this.getLogger(), "Can't load the Economy provider, invaild value in config.yml."), true);
return false;
case VAULT:
economy = new Economy_Vault(this);
Util.debugLog("Now using the Vault economy system.");
- if (getConfiguration().getOrDefault("tax", 0.0d) > 0) {
+ if (getConfig().getDouble("tax", 0.0d) > 0) {
try {
- String taxAccount = getConfiguration().getOrDefault("tax-account", "tax");
+ String taxAccount = getConfig().getString("tax-account", "tax");
if (!taxAccount.isEmpty()) {
OfflinePlayer tax;
if (Util.isUUID(taxAccount)) {
@@ -510,41 +540,19 @@ public boolean loadEcon() {
return true;
}
- // /**
-// * Logs the given string to qs.log, if QuickShop is configured to do so.
-// *
-// * @param s The string to log. It will be prefixed with the date and time.
-// */
-// public void log(@NotNull String s) {
-// Util.debugLog("[SHOP LOG] " + s);
-// if (this.getLogWatcher() == null) {
-// return;
-// }
-// this.getLogWatcher().log(s);
-// }
-
- public void logEvent(@NotNull Object eventObject) {
- if (this.getLogWatcher() == null) {
- return;
- }
- if (loggingLocation == 0) {
- this.getLogWatcher().log(JsonUtil.getGson().toJson(eventObject));
- } else {
- getDatabaseHelper().insertHistoryRecord(eventObject);
- }
-
- }
-
@Override
- @Unstable
- @Deprecated
public @NotNull FileConfiguration getConfig() throws UnsupportedOperationException {
- throw new UnsupportedOperationException("Use QuickShop#getConfiguration to instead.");
- //return configProvider.get();
+ return configProvider.get();
}
+ @Deprecated
public @NotNull Yaml getConfiguration() {
- return this.configProvider.get();
+ return configurationForCompatibility == null ? configurationForCompatibility = LightningBuilder
+ .fromFile(new File(getDataFolder(), "config.yml"))
+ .addInputStreamFromResource("config.yml")
+ .setReloadSettings(ReloadSettings.MANUALLY)
+ .setConfigSettings(ConfigSettings.PRESERVE_COMMENTS)
+ .createYaml() : configurationForCompatibility;
}
@Unstable
@@ -572,16 +580,16 @@ public void reloadConfig() {
public void reloadConfiguration() {
configProvider.reload();
// Load quick variables
- this.display = this.getConfiguration().getBoolean("shop.display-items");
- this.priceChangeRequiresFee = this.getConfiguration().getBoolean("shop.price-change-requires-fee");
- this.displayItemCheckTicks = this.getConfiguration().getInt("shop.display-items-check-ticks");
- this.allowStack = this.getConfiguration().getBoolean("shop.allow-stacks");
- this.currency = this.getConfiguration().getString("currency");
- this.loggingLocation = this.getConfiguration().getInt("logging.location");
+ this.display = this.getConfig().getBoolean("shop.display-items");
+ this.priceChangeRequiresFee = this.getConfig().getBoolean("shop.price-change-requires-fee");
+ this.displayItemCheckTicks = this.getConfig().getInt("shop.display-items-check-ticks");
+ this.allowStack = this.getConfig().getBoolean("shop.allow-stacks");
+ this.currency = this.getConfig().getString("currency");
+ this.loggingLocation = this.getConfig().getInt("logging.location");
if (StringUtils.isEmpty(this.currency)) {
this.currency = null;
}
- if (this.getConfiguration().getBoolean("logging.enable")) {
+ if (this.getConfig().getBoolean("logging.enable")) {
logWatcher = new LogWatcher(this, new File(getDataFolder(), "qs.log"));
} else {
logWatcher = null;
@@ -609,7 +617,7 @@ public final void onLoad() {
getLogger().info("Loading up integration modules.");
this.integrationHelper = new SimpleIntegrationManager(this);
this.integrationHelper.callIntegrationsLoad(IntegrateStage.onLoadBegin);
- if (getConfiguration().getBoolean("integration.worldguard.enable")) {
+ if (getConfig().getBoolean("integration.worldguard.enable")) {
Plugin wg = Bukkit.getPluginManager().getPlugin("WorldGuard");
// WG require register flags when onLoad called.
if (wg != null) {
@@ -746,13 +754,13 @@ private void initConfiguration() {
getLogger().severe("Failed to save config.yml from jar, The binary file of QuickShop may corrupted. Please re-download from our website.");
}
reloadConfiguration();
- if (getConfiguration().getOrDefault("config-version", 0) == 0) {
- getConfiguration().set("config-version", 1);
+ if (getConfig().getInt("config-version", 0) == 0) {
+ getConfig().set("config-version", 1);
}
/* It will generate a new UUID above updateConfig */
- this.serverUniqueID = UUID.fromString(Objects.requireNonNull(getConfiguration().getOrDefault("server-uuid", String.valueOf(UUID.randomUUID()))));
+ this.serverUniqueID = UUID.fromString(Objects.requireNonNull(getConfig().getString("server-uuid", String.valueOf(UUID.randomUUID()))));
try {
- updateConfig(getConfiguration().getInt("config-version"));
+ updateConfig(getConfig().getInt("config-version"));
} catch (IOException exception) {
getLogger().log(Level.WARNING, "Failed to update configuration", exception);
}
@@ -805,7 +813,7 @@ public final void onEnable() {
metrics = new Metrics(this, 3320);
try {
- if (!getConfiguration().getBoolean("auto-report-errors")) {
+ if (!getConfig().getBoolean("auto-report-errors")) {
Util.debugLog("Error reporter was disabled!");
} else {
sentryErrorReporter = new RollbarErrorReporter(this);
@@ -840,10 +848,10 @@ public final void onEnable() {
// Create the shop manager.
permissionManager = new PermissionManager(this);
// This should be inited before shop manager
- if (this.display && getConfiguration().getBoolean("shop.display-auto-despawn")) {
+ if (this.display && getConfig().getBoolean("shop.display-auto-despawn")) {
this.displayAutoDespawnWatcher = new DisplayAutoDespawnWatcher(this);
//BUKKIT METHOD SHOULD ALWAYS EXECUTE ON THE SERVER MAIN THEAD
- timerTaskList.add(this.displayAutoDespawnWatcher.runTaskTimer(this, 20, getConfiguration().getInt("shop.display-check-time"))); // not worth async
+ timerTaskList.add(this.displayAutoDespawnWatcher.runTaskTimer(this, 20, getConfig().getInt("shop.display-check-time"))); // not worth async
}
getLogger().info("Registering commands...");
@@ -870,11 +878,11 @@ public final void onEnable() {
}
}
// Limit end
- if (getConfiguration().getInt("shop.finding.distance") > 100 && (getConfiguration().getBoolean("shop.finding.exclude-out-of-stock"))) {
+ if (getConfig().getInt("shop.finding.distance") > 100 && (getConfig().getBoolean("shop.finding.exclude-out-of-stock"))) {
getLogger().severe("Shop find distance is too high with chunk loading feature turned on! It may cause lag! Pick a number under 100!");
}
- if (getConfiguration().getBoolean("use-caching")) {
+ if (getConfig().getBoolean("use-caching")) {
this.shopCache = new Cache(this);
} else {
this.shopCache = null;
@@ -907,7 +915,7 @@ public final void onEnable() {
internalListener.register();
if (this.display && AbstractDisplayItem.getNowUsing() != DisplayType.VIRTUALITEM) {
- if (getConfiguration().getInt("shop.display-items-check-ticks") < 3000) {
+ if (getConfig().getInt("shop.display-items-check-ticks") < 3000) {
getLogger().severe("Shop.display-items-check-ticks is too low! It may cause HUGE lag! Pick a number > 3000");
}
if (getDisplayItemCheckTicks() > 0) {
@@ -929,13 +937,13 @@ public final void onEnable() {
new ClearLaggListener(this).register();
}
}
- if (getConfiguration().getBoolean("shop.lock")) {
+ if (getConfig().getBoolean("shop.lock")) {
new LockListener(this, this.shopCache).register();
}
getLogger().info("Cleaning MsgUtils...");
MsgUtil.loadTransactionMessages();
MsgUtil.clean();
- if (this.getConfiguration().getOrDefault("updater", true)) {
+ if (this.getConfig().getBoolean("updater", true)) {
updateWatcher = new UpdateWatcher();
updateWatcher.init();
}
@@ -960,9 +968,9 @@ public void run() {
timerTaskList.add(logWatcher.runTaskTimerAsynchronously(this, 10, 10));
getLogger().info("Log actions is enabled, actions will log in the qs.log file!");
}
- if (getConfiguration().getBoolean("shop.ongoing-fee.enable")) {
+ if (getConfig().getBoolean("shop.ongoing-fee.enable")) {
ongoingFeeWatcher = new OngoingFeeWatcher(this);
- timerTaskList.add(ongoingFeeWatcher.runTaskTimerAsynchronously(this, 0, getConfiguration().getInt("shop.ongoing-fee.ticks")));
+ timerTaskList.add(ongoingFeeWatcher.runTaskTimerAsynchronously(this, 0, getConfig().getInt("shop.ongoing-fee.ticks")));
getLogger().info("Ongoing fee feature is enabled.");
}
integrationHelper.searchAndRegisterPlugins();
@@ -990,7 +998,7 @@ public void run() {
private void loadItemMatcher() {
ItemMatcher defItemMatcher;
- switch (getConfiguration().getInt("matcher.work-type")) {
+ switch (getConfig().getInt("matcher.work-type")) {
case 1:
defItemMatcher = new BukkitItemMatcherImpl(this);
break;
@@ -1010,7 +1018,7 @@ private void loadItemMatcher() {
private boolean setupDatabase() {
getLogger().info("Setting up database...");
try {
- FlatFileSection dbCfg = getConfiguration().getSection("database");
+ ConfigurationSection dbCfg = getConfig().getConfigurationSection("database");
AbstractDatabaseCore dbCore;
if (Objects.requireNonNull(dbCfg).getBoolean("mysql")) {
// MySQL database - Required database be created first.
@@ -1050,7 +1058,7 @@ private boolean setupDatabase() {
}
private void submitMeritcs() {
- if (!getConfiguration().getBoolean("disabled-metrics")) {
+ if (!getConfig().getBoolean("disabled-metrics")) {
String vaultVer;
Plugin vault = Bukkit.getPluginManager().getPlugin("Vault");
if (vault != null) {
@@ -1064,7 +1072,7 @@ private void submitMeritcs() {
economyType = this.getEconomy().getName();
}
String eventAdapter;
- if (getConfiguration().getInt("shop.protection-checking-handler") == 1) {
+ if (getConfig().getInt("shop.protection-checking-handler") == 1) {
eventAdapter = "QUICKSHOP";
} else {
eventAdapter = "BUKKIT";
@@ -1073,15 +1081,15 @@ private void submitMeritcs() {
metrics.addCustomChart(new Metrics.SimplePie("server_version", Bukkit::getVersion));
metrics.addCustomChart(new Metrics.SimplePie("bukkit_version", Bukkit::getBukkitVersion));
metrics.addCustomChart(new Metrics.SimplePie("vault_version", () -> vaultVer));
- metrics.addCustomChart(new Metrics.SimplePie("use_display_items", () -> Util.boolean2Status(getConfiguration().getBoolean("shop.display-items"))));
- metrics.addCustomChart(new Metrics.SimplePie("use_locks", () -> Util.boolean2Status(getConfiguration().getBoolean("shop.lock"))));
- metrics.addCustomChart(new Metrics.SimplePie("use_sneak_action", () -> Util.boolean2Status(getConfiguration().getBoolean("shop.interact.sneak-to-create") || getConfiguration().getBoolean("shop.interact.sneak-to-trade") || getConfiguration().getBoolean("shop.interact.sneak-to-control"))));
+ metrics.addCustomChart(new Metrics.SimplePie("use_display_items", () -> Util.boolean2Status(getConfig().getBoolean("shop.display-items"))));
+ metrics.addCustomChart(new Metrics.SimplePie("use_locks", () -> Util.boolean2Status(getConfig().getBoolean("shop.lock"))));
+ metrics.addCustomChart(new Metrics.SimplePie("use_sneak_action", () -> Util.boolean2Status(getConfig().getBoolean("shop.interact.sneak-to-create") || getConfig().getBoolean("shop.interact.sneak-to-trade") || getConfig().getBoolean("shop.interact.sneak-to-control"))));
String finalEconomyType = economyType;
metrics.addCustomChart(new Metrics.SimplePie("economy_type", () -> finalEconomyType));
- metrics.addCustomChart(new Metrics.SimplePie("use_display_auto_despawn", () -> String.valueOf(getConfiguration().getBoolean("shop.display-auto-despawn"))));
- metrics.addCustomChart(new Metrics.SimplePie("use_enhance_display_protect", () -> String.valueOf(getConfiguration().getBoolean("shop.enchance-display-protect"))));
- metrics.addCustomChart(new Metrics.SimplePie("use_enhance_shop_protect", () -> String.valueOf(getConfiguration().getBoolean("shop.enchance-shop-protect"))));
- metrics.addCustomChart(new Metrics.SimplePie("use_ongoing_fee", () -> String.valueOf(getConfiguration().getBoolean("shop.ongoing-fee.enable"))));
+ metrics.addCustomChart(new Metrics.SimplePie("use_display_auto_despawn", () -> String.valueOf(getConfig().getBoolean("shop.display-auto-despawn"))));
+ metrics.addCustomChart(new Metrics.SimplePie("use_enhance_display_protect", () -> String.valueOf(getConfig().getBoolean("shop.enchance-display-protect"))));
+ metrics.addCustomChart(new Metrics.SimplePie("use_enhance_shop_protect", () -> String.valueOf(getConfig().getBoolean("shop.enchance-shop-protect"))));
+ metrics.addCustomChart(new Metrics.SimplePie("use_ongoing_fee", () -> String.valueOf(getConfig().getBoolean("shop.ongoing-fee.enable"))));
metrics.addCustomChart(new Metrics.SimplePie("database_type", () -> this.getDatabaseManager().getDatabase().getName()));
metrics.addCustomChart(new Metrics.SimplePie("display_type", () -> AbstractDisplayItem.getNowUsing().name()));
metrics.addCustomChart(new Metrics.SimplePie("itemmatcher_type", () -> this.getItemMatcher().getName()));
@@ -1097,898 +1105,898 @@ private void submitMeritcs() {
//TODO: Refactor it
private void updateConfig(int selectedVersion) throws IOException {
- String serverUUID = getConfiguration().getString("server-uuid");
+ String serverUUID = getConfig().getString("server-uuid");
if (serverUUID == null || serverUUID.isEmpty()) {
UUID uuid = UUID.randomUUID();
serverUUID = uuid.toString();
- getConfiguration().set("server-uuid", serverUUID);
+ getConfig().set("server-uuid", serverUUID);
}
if (selectedVersion == 1) {
- getConfiguration().set("disabled-metrics", false);
- getConfiguration().set("config-version", 2);
+ getConfig().set("disabled-metrics", false);
+ getConfig().set("config-version", 2);
selectedVersion = 2;
}
if (selectedVersion == 2) {
- getConfiguration().set("protect.minecart", true);
- getConfiguration().set("protect.entity", true);
- getConfiguration().set("protect.redstone", true);
- getConfiguration().set("protect.structuregrow", true);
- getConfiguration().set("protect.explode", true);
- getConfiguration().set("protect.hopper", true);
- getConfiguration().set("config-version", 3);
+ getConfig().set("protect.minecart", true);
+ getConfig().set("protect.entity", true);
+ getConfig().set("protect.redstone", true);
+ getConfig().set("protect.structuregrow", true);
+ getConfig().set("protect.explode", true);
+ getConfig().set("protect.hopper", true);
+ getConfig().set("config-version", 3);
selectedVersion = 3;
}
if (selectedVersion == 3) {
- getConfiguration().set("shop.alternate-currency-symbol", '$');
- getConfiguration().set("config-version", 4);
+ getConfig().set("shop.alternate-currency-symbol", '$');
+ getConfig().set("config-version", 4);
selectedVersion = 4;
}
if (selectedVersion == 4) {
- getConfiguration().set("updater", true);
- getConfiguration().set("config-version", 5);
+ getConfig().set("updater", true);
+ getConfig().set("config-version", 5);
selectedVersion = 5;
}
if (selectedVersion == 5) {
- getConfiguration().set("config-version", 6);
+ getConfig().set("config-version", 6);
selectedVersion = 6;
}
if (selectedVersion == 6) {
- getConfiguration().set("shop.sneak-to-control", false);
- getConfiguration().set("config-version", 7);
+ getConfig().set("shop.sneak-to-control", false);
+ getConfig().set("config-version", 7);
selectedVersion = 7;
}
if (selectedVersion == 7) {
- getConfiguration().set("database.prefix", "none");
- getConfiguration().set("config-version", 8);
+ getConfig().set("database.prefix", "none");
+ getConfig().set("config-version", 8);
selectedVersion = 8;
}
if (selectedVersion == 8) {
- getConfiguration().set("limits.old-algorithm", false);
- getConfiguration().set("plugin.ProtocolLib", false);
- getConfiguration().set("shop.ignore-unlimited", false);
- getConfiguration().set("config-version", 9);
+ getConfig().set("limits.old-algorithm", false);
+ getConfig().set("plugin.ProtocolLib", false);
+ getConfig().set("shop.ignore-unlimited", false);
+ getConfig().set("config-version", 9);
selectedVersion = 9;
}
if (selectedVersion == 9) {
- getConfiguration().set("shop.enable-enderchest", true);
- getConfiguration().set("config-version", 10);
+ getConfig().set("shop.enable-enderchest", true);
+ getConfig().set("config-version", 10);
selectedVersion = 10;
}
if (selectedVersion == 10) {
- getConfiguration().remove("shop.pay-player-from-unlimited-shop-owner"); // Removed
- getConfiguration().set("config-version", 11);
+ getConfig().set("shop.pay-player-from-unlimited-shop-owner", null); // Removed
+ getConfig().set("config-version", 11);
selectedVersion = 11;
}
if (selectedVersion == 11) {
- getConfiguration().remove("shop.enable-enderchest"); // Removed
- getConfiguration().set("plugin.OpenInv", true);
- List shoppable = getConfiguration().getStringList("shop-blocks");
+ getConfig().set("shop.enable-enderchest", null); // Removed
+ getConfig().set("plugin.OpenInv", true);
+ List shoppable = getConfig().getStringList("shop-blocks");
shoppable.add("ENDER_CHEST");
- getConfiguration().set("shop-blocks", shoppable);
- getConfiguration().set("config-version", 12);
+ getConfig().set("shop-blocks", shoppable);
+ getConfig().set("config-version", 12);
selectedVersion = 12;
}
if (selectedVersion == 12) {
- getConfiguration().remove("plugin.ProtocolLib"); // Removed
- getConfiguration().remove("plugin.BKCommonLib"); // Removed
- getConfiguration().remove("database.use-varchar"); // Removed
- getConfiguration().remove("database.reconnect"); // Removed
- getConfiguration().set("display-items-check-ticks", 1200);
- getConfiguration().remove("shop.bypass-owner-check"); // Removed
- getConfiguration().set("config-version", 13);
+ getConfig().set("plugin.ProtocolLib", null); // Removed
+ getConfig().set("plugin.BKCommonLib", null); // Removed
+ getConfig().set("database.use-varchar", null); // Removed
+ getConfig().set("database.reconnect", null); // Removed
+ getConfig().set("display-items-check-ticks", 1200);
+ getConfig().set("shop.bypass-owner-check", null); // Removed
+ getConfig().set("config-version", 13);
selectedVersion = 13;
}
if (selectedVersion == 13) {
- getConfiguration().set("config-version", 14);
+ getConfig().set("config-version", 14);
selectedVersion = 14;
}
if (selectedVersion == 14) {
- getConfiguration().remove("plugin.AreaShop");
- getConfiguration().remove("shop.special-region-only");
- getConfiguration().set("config-version", 15);
+ getConfig().set("plugin.AreaShop", null);
+ getConfig().set("shop.special-region-only", null);
+ getConfig().set("config-version", 15);
selectedVersion = 15;
}
if (selectedVersion == 15) {
- getConfiguration().remove("ongoingfee");
- getConfiguration().set("shop.display-item-show-name", false);
- getConfiguration().set("shop.auto-fetch-shop-messages", true);
- getConfiguration().set("config-version", 16);
+ getConfig().set("ongoingfee", null);
+ getConfig().set("shop.display-item-show-name", false);
+ getConfig().set("shop.auto-fetch-shop-messages", true);
+ getConfig().set("config-version", 16);
selectedVersion = 16;
}
if (selectedVersion == 16) {
- getConfiguration().set("config-version", 17);
+ getConfig().set("config-version", 17);
selectedVersion = 17;
}
if (selectedVersion == 17) {
- getConfiguration().set("ignore-cancel-chat-event", false);
- getConfiguration().remove("float");
- getConfiguration().set("config-version", 18);
+ getConfig().set("ignore-cancel-chat-event", false);
+ getConfig().set("float", null);
+ getConfig().set("config-version", 18);
selectedVersion = 18;
}
if (selectedVersion == 18) {
- getConfiguration().set("shop.disable-vault-format", false);
- getConfiguration().set("config-version", 19);
+ getConfig().set("shop.disable-vault-format", false);
+ getConfig().set("config-version", 19);
selectedVersion = 19;
}
if (selectedVersion == 19) {
- getConfiguration().set("shop.allow-shop-without-space-for-sign", true);
- getConfiguration().set("config-version", 20);
+ getConfig().set("shop.allow-shop-without-space-for-sign", true);
+ getConfig().set("config-version", 20);
selectedVersion = 20;
}
if (selectedVersion == 20) {
- getConfiguration().set("shop.maximum-price", -1);
- getConfiguration().set("config-version", 21);
+ getConfig().set("shop.maximum-price", -1);
+ getConfig().set("config-version", 21);
selectedVersion = 21;
}
if (selectedVersion == 21) {
- getConfiguration().set("shop.sign-material", "OAK_WALL_SIGN");
- getConfiguration().set("config-version", 22);
+ getConfig().set("shop.sign-material", "OAK_WALL_SIGN");
+ getConfig().set("config-version", 22);
selectedVersion = 22;
}
if (selectedVersion == 22) {
- getConfiguration().set("include-offlineplayer-list", "false");
- getConfiguration().set("config-version", 23);
+ getConfig().set("include-offlineplayer-list", "false");
+ getConfig().set("config-version", 23);
selectedVersion = 23;
}
if (selectedVersion == 23) {
- getConfiguration().remove("lockette.enable");
- getConfiguration().remove("lockette.item");
- getConfiguration().remove("lockette.lore");
- getConfiguration().remove("lockette.displayname");
- getConfiguration().remove("float");
- getConfiguration().set("lockette.enable", true);
- getConfiguration().set("shop.blacklist-world", Lists.newArrayList("disabled_world_name"));
- getConfiguration().set("config-version", 24);
+ getConfig().set("lockette.enable", null);
+ getConfig().set("lockette.item", null);
+ getConfig().set("lockette.lore", null);
+ getConfig().set("lockette.displayname", null);
+ getConfig().set("float", null);
+ getConfig().set("lockette.enable", true);
+ getConfig().set("shop.blacklist-world", Lists.newArrayList("disabled_world_name"));
+ getConfig().set("config-version", 24);
selectedVersion = 24;
}
if (selectedVersion == 24) {
- getConfiguration().set("config-version", 25);
+ getConfig().set("config-version", 25);
selectedVersion = 25;
}
if (selectedVersion == 25) {
- String language = getConfiguration().getString("language");
+ String language = getConfig().getString("language");
if (language == null || language.isEmpty() || "default".equals(language)) {
- getConfiguration().set("language", "en");
+ getConfig().set("language", "en");
}
- getConfiguration().set("config-version", 26);
+ getConfig().set("config-version", 26);
selectedVersion = 26;
}
if (selectedVersion == 26) {
- getConfiguration().set("database.usessl", false);
- getConfiguration().set("config-version", 27);
+ getConfig().set("database.usessl", false);
+ getConfig().set("config-version", 27);
selectedVersion = 27;
}
if (selectedVersion == 27) {
- getConfiguration().set("queue.enable", true);
- getConfiguration().set("queue.shops-per-tick", 20);
- getConfiguration().set("config-version", 28);
+ getConfig().set("queue.enable", true);
+ getConfig().set("queue.shops-per-tick", 20);
+ getConfig().set("config-version", 28);
selectedVersion = 28;
}
if (selectedVersion == 28) {
- getConfiguration().set("database.queue", true);
- getConfiguration().set("config-version", 29);
+ getConfig().set("database.queue", true);
+ getConfig().set("config-version", 29);
selectedVersion = 29;
}
if (selectedVersion == 29) {
- getConfiguration().remove("plugin.Multiverse-Core");
- getConfiguration().set("shop.protection-checking", true);
- getConfiguration().set("config-version", 30);
+ getConfig().set("plugin.Multiverse-Core", null);
+ getConfig().set("shop.protection-checking", true);
+ getConfig().set("config-version", 30);
selectedVersion = 30;
}
if (selectedVersion == 30) {
- getConfiguration().set("auto-report-errors", true);
- getConfiguration().set("config-version", 31);
+ getConfig().set("auto-report-errors", true);
+ getConfig().set("config-version", 31);
selectedVersion = 31;
}
if (selectedVersion == 31) {
- getConfiguration().set("shop.display-type", 0);
- getConfiguration().set("config-version", 32);
+ getConfig().set("shop.display-type", 0);
+ getConfig().set("config-version", 32);
selectedVersion = 32;
}
if (selectedVersion == 32) {
- getConfiguration().set("effect.sound.ontabcomplete", true);
- getConfiguration().set("effect.sound.oncommand", true);
- getConfiguration().set("effect.sound.ononclick", true);
- getConfiguration().set("config-version", 33);
+ getConfig().set("effect.sound.ontabcomplete", true);
+ getConfig().set("effect.sound.oncommand", true);
+ getConfig().set("effect.sound.ononclick", true);
+ getConfig().set("config-version", 33);
selectedVersion = 33;
}
if (selectedVersion == 33) {
- getConfiguration().set("matcher.item.damage", true);
- getConfiguration().set("matcher.item.displayname", true);
- getConfiguration().set("matcher.item.lores", true);
- getConfiguration().set("matcher.item.enchs", true);
- getConfiguration().set("matcher.item.potions", true);
- getConfiguration().set("matcher.item.attributes", true);
- getConfiguration().set("matcher.item.itemflags", true);
- getConfiguration().set("matcher.item.custommodeldata", true);
- getConfiguration().set("config-version", 34);
+ getConfig().set("matcher.item.damage", true);
+ getConfig().set("matcher.item.displayname", true);
+ getConfig().set("matcher.item.lores", true);
+ getConfig().set("matcher.item.enchs", true);
+ getConfig().set("matcher.item.potions", true);
+ getConfig().set("matcher.item.attributes", true);
+ getConfig().set("matcher.item.itemflags", true);
+ getConfig().set("matcher.item.custommodeldata", true);
+ getConfig().set("config-version", 34);
selectedVersion = 34;
}
if (selectedVersion == 34) {
- if (getConfiguration().getInt("shop.display-items-check-ticks") == 1200) {
- getConfiguration().set("shop.display-items-check-ticks", 6000);
+ if (getConfig().getInt("shop.display-items-check-ticks") == 1200) {
+ getConfig().set("shop.display-items-check-ticks", 6000);
}
- getConfiguration().set("config-version", 35);
+ getConfig().set("config-version", 35);
selectedVersion = 35;
}
if (selectedVersion == 35) {
- getConfiguration().remove("queue"); // Close it for everyone
- getConfiguration().set("config-version", 36);
+ getConfig().set("queue", null); // Close it for everyone
+ getConfig().set("config-version", 36);
selectedVersion = 36;
}
if (selectedVersion == 36) {
- getConfiguration().set("economy-type", 0); // Close it for everyone
- getConfiguration().set("config-version", 37);
+ getConfig().set("economy-type", 0); // Close it for everyone
+ getConfig().set("config-version", 37);
selectedVersion = 37;
}
if (selectedVersion == 37) {
- getConfiguration().set("shop.ignore-cancel-chat-event", true);
- getConfiguration().set("config-version", 38);
+ getConfig().set("shop.ignore-cancel-chat-event", true);
+ getConfig().set("config-version", 38);
selectedVersion = 38;
}
if (selectedVersion == 38) {
- getConfiguration().set("protect.inventorymove", true);
- getConfiguration().set("protect.spread", true);
- getConfiguration().set("protect.fromto", true);
- getConfiguration().remove("protect.minecart");
- getConfiguration().remove("protect.hopper");
- getConfiguration().set("config-version", 39);
+ getConfig().set("protect.inventorymove", true);
+ getConfig().set("protect.spread", true);
+ getConfig().set("protect.fromto", true);
+ getConfig().set("protect.minecart", null);
+ getConfig().set("protect.hopper", null);
+ getConfig().set("config-version", 39);
selectedVersion = 39;
}
if (selectedVersion == 39) {
- getConfiguration().set("update-sign-when-inventory-moving", true);
- getConfiguration().set("config-version", 40);
+ getConfig().set("update-sign-when-inventory-moving", true);
+ getConfig().set("config-version", 40);
selectedVersion = 40;
}
if (selectedVersion == 40) {
- getConfiguration().set("allow-economy-loan", false);
- getConfiguration().set("config-version", 41);
+ getConfig().set("allow-economy-loan", false);
+ getConfig().set("config-version", 41);
selectedVersion = 41;
}
if (selectedVersion == 41) {
- getConfiguration().set("send-display-item-protection-alert", true);
- getConfiguration().set("config-version", 42);
+ getConfig().set("send-display-item-protection-alert", true);
+ getConfig().set("config-version", 42);
selectedVersion = 42;
}
if (selectedVersion == 42) {
- getConfiguration().set("config-version", 43);
+ getConfig().set("config-version", 43);
selectedVersion = 43;
}
if (selectedVersion == 43) {
- getConfiguration().set("config-version", 44);
+ getConfig().set("config-version", 44);
selectedVersion = 44;
}
if (selectedVersion == 44) {
- getConfiguration().set("matcher.item.repaircost", false);
- getConfiguration().set("config-version", 45);
+ getConfig().set("matcher.item.repaircost", false);
+ getConfig().set("config-version", 45);
selectedVersion = 45;
}
if (selectedVersion == 45) {
- getConfiguration().set("shop.display-item-use-name", true);
- getConfiguration().set("config-version", 46);
+ getConfig().set("shop.display-item-use-name", true);
+ getConfig().set("config-version", 46);
selectedVersion = 46;
}
if (selectedVersion == 46) {
- getConfiguration().set("shop.max-shops-checks-in-once", 100);
- getConfiguration().set("config-version", 47);
+ getConfig().set("shop.max-shops-checks-in-once", 100);
+ getConfig().set("config-version", 47);
selectedVersion = 47;
}
if (selectedVersion == 47) {
- getConfiguration().set("config-version", 48);
+ getConfig().set("config-version", 48);
selectedVersion = 48;
}
if (selectedVersion == 48) {
- getConfiguration().remove("permission-type");
- getConfiguration().remove("shop.use-protection-checking-filter");
- getConfiguration().remove("shop.protection-checking-filter");
- getConfiguration().set("config-version", 49);
+ getConfig().set("permission-type", null);
+ getConfig().set("shop.use-protection-checking-filter", null);
+ getConfig().set("shop.protection-checking-filter", null);
+ getConfig().set("config-version", 49);
selectedVersion = 49;
}
if (selectedVersion == 49 || selectedVersion == 50) {
- getConfiguration().set("shop.enchance-display-protect", false);
- getConfiguration().set("shop.enchance-shop-protect", false);
- getConfiguration().remove("protect");
- getConfiguration().set("config-version", 51);
+ getConfig().set("shop.enchance-display-protect", false);
+ getConfig().set("shop.enchance-shop-protect", false);
+ getConfig().set("protect", null);
+ getConfig().set("config-version", 51);
selectedVersion = 51;
}
if (selectedVersion < 60) { // Ahhh fuck versions
- getConfiguration().set("config-version", 60);
+ getConfig().set("config-version", 60);
selectedVersion = 60;
}
if (selectedVersion == 60) { // Ahhh fuck versions
- getConfiguration().remove("shop.strict-matches-check");
- getConfiguration().set("shop.display-auto-despawn", true);
- getConfiguration().set("shop.display-despawn-range", 10);
- getConfiguration().set("shop.display-check-time", 10);
- getConfiguration().set("config-version", 61);
+ getConfig().set("shop.strict-matches-check", null);
+ getConfig().set("shop.display-auto-despawn", true);
+ getConfig().set("shop.display-despawn-range", 10);
+ getConfig().set("shop.display-check-time", 10);
+ getConfig().set("config-version", 61);
selectedVersion = 61;
}
if (selectedVersion == 61) { // Ahhh fuck versions
- getConfiguration().set("shop.word-for-sell-all-items", "all");
- getConfiguration().set("plugin.PlaceHolderAPI", true);
- getConfiguration().set("config-version", 62);
+ getConfig().set("shop.word-for-sell-all-items", "all");
+ getConfig().set("plugin.PlaceHolderAPI", true);
+ getConfig().set("config-version", 62);
selectedVersion = 62;
}
if (selectedVersion == 62) { // Ahhh fuck versions
- getConfiguration().set("shop.display-auto-despawn", false);
- getConfiguration().set("shop.word-for-trade-all-items", getConfiguration().getString("shop.word-for-sell-all-items"));
+ getConfig().set("shop.display-auto-despawn", false);
+ getConfig().set("shop.word-for-trade-all-items", getConfig().getString("shop.word-for-sell-all-items"));
- getConfiguration().set("config-version", 63);
+ getConfig().set("config-version", 63);
selectedVersion = 63;
}
if (selectedVersion == 63) { // Ahhh fuck versions
- getConfiguration().set("shop.ongoing-fee.enable", false);
- getConfiguration().set("shop.ongoing-fee.ticks", 42000);
- getConfiguration().set("shop.ongoing-fee.cost-per-shop", 2);
- getConfiguration().set("shop.ongoing-fee.ignore-unlimited", true);
- getConfiguration().set("config-version", 64);
+ getConfig().set("shop.ongoing-fee.enable", false);
+ getConfig().set("shop.ongoing-fee.ticks", 42000);
+ getConfig().set("shop.ongoing-fee.cost-per-shop", 2);
+ getConfig().set("shop.ongoing-fee.ignore-unlimited", true);
+ getConfig().set("config-version", 64);
selectedVersion = 64;
}
if (selectedVersion == 64) {
- getConfiguration().set("shop.allow-free-shop", false);
- getConfiguration().set("config-version", 65);
+ getConfig().set("shop.allow-free-shop", false);
+ getConfig().set("config-version", 65);
selectedVersion = 65;
}
if (selectedVersion == 65) {
- getConfiguration().set("shop.minimum-price", 0.01);
- getConfiguration().set("config-version", 66);
+ getConfig().set("shop.minimum-price", 0.01);
+ getConfig().set("config-version", 66);
selectedVersion = 66;
}
if (selectedVersion == 66) {
- getConfiguration().set("use-decimal-format", false);
- getConfiguration().set("decimal-format", "#,###.##");
- getConfiguration().set("shop.show-owner-uuid-in-controlpanel-if-op", false);
- getConfiguration().set("config-version", 67);
+ getConfig().set("use-decimal-format", false);
+ getConfig().set("decimal-format", "#,###.##");
+ getConfig().set("shop.show-owner-uuid-in-controlpanel-if-op", false);
+ getConfig().set("config-version", 67);
selectedVersion = 67;
}
if (selectedVersion == 67) {
- getConfiguration().set("disable-debuglogger", false);
- getConfiguration().remove("matcher.use-bukkit-matcher");
- getConfiguration().set("config-version", 68);
+ getConfig().set("disable-debuglogger", false);
+ getConfig().set("matcher.use-bukkit-matcher", null);
+ getConfig().set("config-version", 68);
selectedVersion = 68;
}
if (selectedVersion == 68) {
- getConfiguration().set("shop.blacklist-lores", Lists.newArrayList("SoulBound"));
- getConfiguration().set("config-version", 69);
+ getConfig().set("shop.blacklist-lores", Lists.newArrayList("SoulBound"));
+ getConfig().set("config-version", 69);
selectedVersion = 69;
}
if (selectedVersion == 69) {
- getConfiguration().set("shop.display-item-use-name", false);
- getConfiguration().set("config-version", 70);
+ getConfig().set("shop.display-item-use-name", false);
+ getConfig().set("config-version", 70);
selectedVersion = 70;
}
if (selectedVersion == 70) {
- getConfiguration().set("cachingpool.enable", false);
- getConfiguration().set("cachingpool.maxsize", 100000000);
- getConfiguration().set("config-version", 71);
+ getConfig().set("cachingpool.enable", false);
+ getConfig().set("cachingpool.maxsize", 100000000);
+ getConfig().set("config-version", 71);
selectedVersion = 71;
}
if (selectedVersion == 71) {
- if (Objects.equals(getConfiguration().getString("language"), "en")) {
- getConfiguration().set("language", "en-US");
+ if (Objects.equals(getConfig().getString("language"), "en")) {
+ getConfig().set("language", "en-US");
}
- getConfiguration().set("server-platform", 0);
- getConfiguration().set("config-version", 72);
+ getConfig().set("server-platform", 0);
+ getConfig().set("config-version", 72);
selectedVersion = 72;
}
if (selectedVersion == 72) {
- if (getConfiguration().getBoolean("use-deciaml-format")) {
- getConfiguration().set("use-decimal-format", getConfiguration().getBoolean("use-deciaml-format"));
+ if (getConfig().getBoolean("use-deciaml-format")) {
+ getConfig().set("use-decimal-format", getConfig().getBoolean("use-deciaml-format"));
} else {
- getConfiguration().set("use-decimal-format", false);
+ getConfig().set("use-decimal-format", false);
}
- getConfiguration().remove("use-deciaml-format");
+ getConfig().set("use-deciaml-format", null);
- getConfiguration().set("shop.force-load-downgrade-items.enable", false);
- getConfiguration().set("shop.force-load-downgrade-items.method", 0);
- getConfiguration().set("config-version", 73);
+ getConfig().set("shop.force-load-downgrade-items.enable", false);
+ getConfig().set("shop.force-load-downgrade-items.method", 0);
+ getConfig().set("config-version", 73);
selectedVersion = 73;
}
if (selectedVersion == 73) {
- getConfiguration().set("mixedeconomy.deposit", "eco give {0} {1}");
- getConfiguration().set("mixedeconomy.withdraw", "eco take {0} {1}");
- getConfiguration().set("config-version", 74);
+ getConfig().set("mixedeconomy.deposit", "eco give {0} {1}");
+ getConfig().set("mixedeconomy.withdraw", "eco take {0} {1}");
+ getConfig().set("config-version", 74);
selectedVersion = 74;
}
if (selectedVersion == 74) {
- String langUtilsLanguage = getConfiguration().getOrDefault("langutils-language", "en_us");
- getConfiguration().remove("langutils-language");
+ String langUtilsLanguage = getConfig().getString("langutils-language", "en_us");
+ getConfig().set("langutils-language", null);
if ("en_us".equals(langUtilsLanguage)) {
langUtilsLanguage = "default";
}
- getConfiguration().set("game-language", langUtilsLanguage);
- getConfiguration().set("maximum-digits-in-price", -1);
- getConfiguration().set("config-version", 75);
+ getConfig().set("game-language", langUtilsLanguage);
+ getConfig().set("maximum-digits-in-price", -1);
+ getConfig().set("config-version", 75);
selectedVersion = 75;
}
if (selectedVersion == 75) {
- getConfiguration().remove("langutils-language");
- if (getConfiguration().get("game-language") == null) {
- getConfiguration().set("game-language", "default");
+ getConfig().set("langutils-language", null);
+ if (getConfig().get("game-language") == null) {
+ getConfig().set("game-language", "default");
}
- getConfiguration().set("config-version", 76);
+ getConfig().set("config-version", 76);
selectedVersion = 76;
}
if (selectedVersion == 76) {
- getConfiguration().set("database.auto-fix-encoding-issue-in-database", false);
- getConfiguration().set("send-shop-protection-alert", false);
- getConfiguration().set("send-display-item-protection-alert", false);
- getConfiguration().set("shop.use-fast-shop-search-algorithm", false);
- getConfiguration().set("config-version", 77);
+ getConfig().set("database.auto-fix-encoding-issue-in-database", false);
+ getConfig().set("send-shop-protection-alert", false);
+ getConfig().set("send-display-item-protection-alert", false);
+ getConfig().set("shop.use-fast-shop-search-algorithm", false);
+ getConfig().set("config-version", 77);
selectedVersion = 77;
}
if (selectedVersion == 77) {
- getConfiguration().set("integration.towny.enable", false);
- getConfiguration().set("integration.towny.create", new String[]{"SHOPTYPE", "MODIFY"});
- getConfiguration().set("integration.towny.trade", new String[]{});
- getConfiguration().set("integration.worldguard.enable", false);
- getConfiguration().set("integration.worldguard.create", new String[]{"FLAG", "CHEST_ACCESS"});
- getConfiguration().set("integration.worldguard.trade", new String[]{});
- getConfiguration().set("integration.plotsquared.enable", false);
- getConfiguration().set("integration.plotsquared.enable", false);
- getConfiguration().set("integration.plotsquared.enable", false);
- getConfiguration().set("integration.residence.enable", false);
- getConfiguration().set("integration.residence.create", new String[]{"FLAG", "interact", "use"});
- getConfiguration().set("integration.residence.trade", new String[]{});
-
- getConfiguration().set("integration.factions.enable", false);
- getConfiguration().set("integration.factions.create.flag", new String[]{});
- getConfiguration().set("integration.factions.trade.flag", new String[]{});
- getConfiguration().set("integration.factions.create.require.open", false);
- getConfiguration().set("integration.factions.create.require.normal", true);
- getConfiguration().set("integration.factions.create.require.wilderness", false);
- getConfiguration().set("integration.factions.create.require.peaceful", true);
- getConfiguration().set("integration.factions.create.require.permanent", false);
- getConfiguration().set("integration.factions.create.require.safezone", false);
- getConfiguration().set("integration.factions.create.require.own", false);
- getConfiguration().set("integration.factions.create.require.warzone", false);
- getConfiguration().set("integration.factions.trade.require.open", false);
- getConfiguration().set("integration.factions.trade.require.normal", true);
- getConfiguration().set("integration.factions.trade.require.wilderness", false);
- getConfiguration().set("integration.factions.trade.require.peaceful", false);
- getConfiguration().set("integration.factions.trade.require.permanent", false);
- getConfiguration().set("integration.factions.trade.require.safezone", false);
- getConfiguration().set("integration.factions.trade.require.own", false);
- getConfiguration().set("integration.factions.trade.require.warzone", false);
- getConfiguration().remove("anonymous-metrics");
- getConfiguration().set("shop.ongoing-fee.async", true);
- getConfiguration().set("config-version", 78);
+ getConfig().set("integration.towny.enable", false);
+ getConfig().set("integration.towny.create", new String[]{"SHOPTYPE", "MODIFY"});
+ getConfig().set("integration.towny.trade", new String[]{});
+ getConfig().set("integration.worldguard.enable", false);
+ getConfig().set("integration.worldguard.create", new String[]{"FLAG", "CHEST_ACCESS"});
+ getConfig().set("integration.worldguard.trade", new String[]{});
+ getConfig().set("integration.plotsquared.enable", false);
+ getConfig().set("integration.plotsquared.enable", false);
+ getConfig().set("integration.plotsquared.enable", false);
+ getConfig().set("integration.residence.enable", false);
+ getConfig().set("integration.residence.create", new String[]{"FLAG", "interact", "use"});
+ getConfig().set("integration.residence.trade", new String[]{});
+
+ getConfig().set("integration.factions.enable", false);
+ getConfig().set("integration.factions.create.flag", new String[]{});
+ getConfig().set("integration.factions.trade.flag", new String[]{});
+ getConfig().set("integration.factions.create.require.open", false);
+ getConfig().set("integration.factions.create.require.normal", true);
+ getConfig().set("integration.factions.create.require.wilderness", false);
+ getConfig().set("integration.factions.create.require.peaceful", true);
+ getConfig().set("integration.factions.create.require.permanent", false);
+ getConfig().set("integration.factions.create.require.safezone", false);
+ getConfig().set("integration.factions.create.require.own", false);
+ getConfig().set("integration.factions.create.require.warzone", false);
+ getConfig().set("integration.factions.trade.require.open", false);
+ getConfig().set("integration.factions.trade.require.normal", true);
+ getConfig().set("integration.factions.trade.require.wilderness", false);
+ getConfig().set("integration.factions.trade.require.peaceful", false);
+ getConfig().set("integration.factions.trade.require.permanent", false);
+ getConfig().set("integration.factions.trade.require.safezone", false);
+ getConfig().set("integration.factions.trade.require.own", false);
+ getConfig().set("integration.factions.trade.require.warzone", false);
+ getConfig().set("anonymous-metrics", null);
+ getConfig().set("shop.ongoing-fee.async", true);
+ getConfig().set("config-version", 78);
selectedVersion = 78;
}
if (selectedVersion == 78) {
- getConfiguration().remove("shop.display-type-specifics");
- getConfiguration().set("config-version", 79);
+ getConfig().set("shop.display-type-specifics", null);
+ getConfig().set("config-version", 79);
selectedVersion = 79;
}
if (selectedVersion == 79) {
- getConfiguration().set("matcher.item.books", true);
- getConfiguration().set("config-version", 80);
+ getConfig().set("matcher.item.books", true);
+ getConfig().set("config-version", 80);
selectedVersion = 80;
}
if (selectedVersion == 80) {
- getConfiguration().set("shop.use-fast-shop-search-algorithm", true);
- getConfiguration().set("config-version", 81);
+ getConfig().set("shop.use-fast-shop-search-algorithm", true);
+ getConfig().set("config-version", 81);
selectedVersion = 81;
}
if (selectedVersion == 81) {
- getConfiguration().set("config-version", 82);
+ getConfig().set("config-version", 82);
selectedVersion = 82;
}
if (selectedVersion == 82) {
- getConfiguration().set("matcher.item.banner", true);
- getConfiguration().set("config-version", 83);
+ getConfig().set("matcher.item.banner", true);
+ getConfig().set("config-version", 83);
selectedVersion = 83;
}
if (selectedVersion == 83) {
- getConfiguration().set("matcher.item.banner", true);
- getConfiguration().set("protect.explode", true);
- getConfiguration().set("config-version", 84);
+ getConfig().set("matcher.item.banner", true);
+ getConfig().set("protect.explode", true);
+ getConfig().set("config-version", 84);
selectedVersion = 84;
}
if (selectedVersion == 84) {
- getConfiguration().remove("disable-debuglogger");
- getConfiguration().set("config-version", 85);
+ getConfig().set("disable-debuglogger", null);
+ getConfig().set("config-version", 85);
selectedVersion = 85;
}
if (selectedVersion == 85) {
- getConfiguration().set("config-version", 86);
+ getConfig().set("config-version", 86);
selectedVersion = 86;
}
if (selectedVersion == 86) {
- getConfiguration().set("shop.use-fast-shop-search-algorithm", true);
- getConfiguration().set("config-version", 87);
+ getConfig().set("shop.use-fast-shop-search-algorithm", true);
+ getConfig().set("config-version", 87);
selectedVersion = 87;
}
if (selectedVersion == 87) {
- getConfiguration().set("plugin.BlockHub.enable", true);
- getConfiguration().set("plugin.BlockHub.only", false);
+ getConfig().set("plugin.BlockHub.enable", true);
+ getConfig().set("plugin.BlockHub.only", false);
if (Bukkit.getPluginManager().getPlugin("ProtocolLib") != null) {
- getConfiguration().set("shop.display-type", 2);
+ getConfig().set("shop.display-type", 2);
}
- getConfiguration().set("config-version", 88);
+ getConfig().set("config-version", 88);
selectedVersion = 88;
}
if (selectedVersion == 88) {
- getConfiguration().set("respect-item-flag", true);
- getConfiguration().set("config-version", 89);
+ getConfig().set("respect-item-flag", true);
+ getConfig().set("config-version", 89);
selectedVersion = 89;
}
if (selectedVersion == 89) {
- getConfiguration().set("use-caching", true);
- getConfiguration().set("config-version", 90);
+ getConfig().set("use-caching", true);
+ getConfig().set("config-version", 90);
selectedVersion = 90;
}
if (selectedVersion == 90) {
- getConfiguration().set("protect.hopper", true);
- getConfiguration().set("config-version", 91);
+ getConfig().set("protect.hopper", true);
+ getConfig().set("config-version", 91);
selectedVersion = 91;
}
if (selectedVersion == 91) {
- getConfiguration().set("database.queue-commit-interval", 2);
- getConfiguration().set("config-version", 92);
+ getConfig().set("database.queue-commit-interval", 2);
+ getConfig().set("config-version", 92);
selectedVersion = 92;
}
if (selectedVersion == 92) {
- getConfiguration().set("send-display-item-protection-alert", false);
- getConfiguration().set("send-shop-protection-alert", false);
- getConfiguration().set("disable-creative-mode-trading", false);
- getConfiguration().set("disable-super-tool", false);
- getConfiguration().set("allow-owner-break-shop-sign", false);
- getConfiguration().set("matcher.item.skull", true);
- getConfiguration().set("matcher.item.firework", true);
- getConfiguration().set("matcher.item.map", true);
- getConfiguration().set("matcher.item.leatherArmor", true);
- getConfiguration().set("matcher.item.fishBucket", true);
- getConfiguration().set("matcher.item.suspiciousStew", true);
- getConfiguration().set("matcher.item.shulkerBox", true);
- getConfiguration().set("config-version", 93);
+ getConfig().set("send-display-item-protection-alert", false);
+ getConfig().set("send-shop-protection-alert", false);
+ getConfig().set("disable-creative-mode-trading", false);
+ getConfig().set("disable-super-tool", false);
+ getConfig().set("allow-owner-break-shop-sign", false);
+ getConfig().set("matcher.item.skull", true);
+ getConfig().set("matcher.item.firework", true);
+ getConfig().set("matcher.item.map", true);
+ getConfig().set("matcher.item.leatherArmor", true);
+ getConfig().set("matcher.item.fishBucket", true);
+ getConfig().set("matcher.item.suspiciousStew", true);
+ getConfig().set("matcher.item.shulkerBox", true);
+ getConfig().set("config-version", 93);
selectedVersion = 93;
}
if (selectedVersion == 93) {
- getConfiguration().remove("disable-creative-mode-trading");
- getConfiguration().remove("disable-super-tool");
- getConfiguration().remove("allow-owner-break-shop-sign");
- getConfiguration().set("shop.disable-creative-mode-trading", true);
- getConfiguration().set("shop.disable-super-tool", true);
- getConfiguration().set("shop.allow-owner-break-shop-sign", false);
- getConfiguration().set("config-version", 94);
+ getConfig().set("disable-creative-mode-trading", null);
+ getConfig().set("disable-super-tool", null);
+ getConfig().set("allow-owner-break-shop-sign", null);
+ getConfig().set("shop.disable-creative-mode-trading", true);
+ getConfig().set("shop.disable-super-tool", true);
+ getConfig().set("shop.allow-owner-break-shop-sign", false);
+ getConfig().set("config-version", 94);
selectedVersion = 94;
}
if (selectedVersion == 94) {
- if (getConfiguration().get("price-restriction") != null) {
- getConfiguration().set("shop.price-restriction", getConfiguration().getStringList("price-restriction"));
- getConfiguration().remove("price-restriction");
+ if (getConfig().get("price-restriction") != null) {
+ getConfig().set("shop.price-restriction", getConfig().getStringList("price-restriction"));
+ getConfig().set("price-restriction", null);
} else {
- getConfiguration().set("shop.price-restriction", new ArrayList<>(0));
+ getConfig().set("shop.price-restriction", new ArrayList<>(0));
}
- getConfiguration().remove("enable-log4j");
- getConfiguration().set("config-version", 95);
+ getConfig().set("enable-log4j", null);
+ getConfig().set("config-version", 95);
selectedVersion = 95;
}
if (selectedVersion == 95) {
- getConfiguration().set("shop.allow-stacks", false);
- getConfiguration().set("shop.display-allow-stacks", false);
- getConfiguration().set("custom-item-stacksize", new ArrayList<>(0));
- getConfiguration().set("config-version", 96);
+ getConfig().set("shop.allow-stacks", false);
+ getConfig().set("shop.display-allow-stacks", false);
+ getConfig().set("custom-item-stacksize", new ArrayList<>(0));
+ getConfig().set("config-version", 96);
selectedVersion = 96;
}
if (selectedVersion == 96) {
- getConfiguration().set("shop.deny-non-shop-items-to-shop-container", false);
- getConfiguration().set("config-version", 97);
+ getConfig().set("shop.deny-non-shop-items-to-shop-container", false);
+ getConfig().set("config-version", 97);
selectedVersion = 97;
}
if (selectedVersion == 97) {
- getConfiguration().set("shop.disable-quick-create", false);
- getConfiguration().set("config-version", 98);
+ getConfig().set("shop.disable-quick-create", false);
+ getConfig().set("config-version", 98);
selectedVersion = 98;
}
if (selectedVersion == 98) {
- getConfiguration().set("config-version", 99);
+ getConfig().set("config-version", 99);
selectedVersion = 99;
}
if (selectedVersion == 99) {
- getConfiguration().set("shop.currency-symbol-on-right", false);
- getConfiguration().set("config-version", 100);
+ getConfig().set("shop.currency-symbol-on-right", false);
+ getConfig().set("config-version", 100);
selectedVersion = 100;
}
if (selectedVersion == 100) {
- getConfiguration().set("integration.towny.ignore-disabled-worlds", false);
- getConfiguration().set("config-version", 101);
+ getConfig().set("integration.towny.ignore-disabled-worlds", false);
+ getConfig().set("config-version", 101);
selectedVersion = 101;
}
if (selectedVersion == 101) {
- getConfiguration().set("matcher.work-type", 1);
- getConfiguration().remove("work-type");
- getConfiguration().set("plugin.LWC", true);
- getConfiguration().set("config-version", 102);
+ getConfig().set("matcher.work-type", 1);
+ getConfig().set("work-type", null);
+ getConfig().set("plugin.LWC", true);
+ getConfig().set("config-version", 102);
selectedVersion = 102;
}
if (selectedVersion == 102) {
- getConfiguration().set("protect.entity", true);
- getConfiguration().set("config-version", 103);
+ getConfig().set("protect.entity", true);
+ getConfig().set("config-version", 103);
selectedVersion = 103;
}
if (selectedVersion == 103) {
- getConfiguration().set("integration.worldguard.whitelist-mode", false);
- getConfiguration().set("integration.factions.whitelist-mode", true);
- getConfiguration().set("integration.plotsquared.whitelist-mode", true);
- getConfiguration().set("integration.residence.whitelist-mode", true);
- getConfiguration().set("config-version", 104);
+ getConfig().set("integration.worldguard.whitelist-mode", false);
+ getConfig().set("integration.factions.whitelist-mode", true);
+ getConfig().set("integration.plotsquared.whitelist-mode", true);
+ getConfig().set("integration.residence.whitelist-mode", true);
+ getConfig().set("config-version", 104);
selectedVersion = 104;
}
if (selectedVersion == 104) {
- getConfiguration().remove("cachingpool");
- getConfiguration().set("config-version", 105);
+ getConfig().set("cachingpool", null);
+ getConfig().set("config-version", 105);
selectedVersion = 105;
}
if (selectedVersion == 105) {
- getConfiguration().set("shop.interact.sneak-to-create", getConfiguration().getBoolean("shop.sneak-to-create"));
- getConfiguration().remove("shop.sneak-to-create");
- getConfiguration().set("shop.interact.sneak-to-trade", getConfiguration().getBoolean("shop.sneak-to-trade"));
- getConfiguration().remove("shop.sneak-to-trade");
- getConfiguration().set("shop.interact.sneak-to-control", getConfiguration().getBoolean("shop.sneak-to-control"));
- getConfiguration().remove("shop.sneak-to-control");
- getConfiguration().set("config-version", 106);
+ getConfig().set("shop.interact.sneak-to-create", getConfig().getBoolean("shop.sneak-to-create"));
+ getConfig().set("shop.sneak-to-create", null);
+ getConfig().set("shop.interact.sneak-to-trade", getConfig().getBoolean("shop.sneak-to-trade"));
+ getConfig().set("shop.sneak-to-trade", null);
+ getConfig().set("shop.interact.sneak-to-control", getConfig().getBoolean("shop.sneak-to-control"));
+ getConfig().set("shop.sneak-to-control", null);
+ getConfig().set("config-version", 106);
selectedVersion = 106;
}
if (selectedVersion == 106) {
- getConfiguration().set("shop.use-enchantment-for-enchanted-book", false);
- getConfiguration().set("config-version", 107);
+ getConfig().set("shop.use-enchantment-for-enchanted-book", false);
+ getConfig().set("config-version", 107);
selectedVersion = 107;
}
if (selectedVersion == 107) {
- getConfiguration().set("integration.lands.enable", false);
- getConfiguration().set("integration.lands.whitelist-mode", false);
- getConfiguration().set("integration.lands.ignore-disabled-worlds", true);
- getConfiguration().set("config-version", 108);
+ getConfig().set("integration.lands.enable", false);
+ getConfig().set("integration.lands.whitelist-mode", false);
+ getConfig().set("integration.lands.ignore-disabled-worlds", true);
+ getConfig().set("config-version", 108);
selectedVersion = 108;
}
if (selectedVersion == 108) {
- getConfiguration().set("debug.shop-deletion", false);
- getConfiguration().set("config-version", 109);
+ getConfig().set("debug.shop-deletion", false);
+ getConfig().set("config-version", 109);
selectedVersion = 109;
}
if (selectedVersion == 109) {
- getConfiguration().set("shop.protection-checking-blacklist", Collections.singletonList("disabled_world"));
- getConfiguration().set("config-version", 110);
+ getConfig().set("shop.protection-checking-blacklist", Collections.singletonList("disabled_world"));
+ getConfig().set("config-version", 110);
selectedVersion = 110;
}
if (selectedVersion == 110) {
- getConfiguration().set("integration.worldguard.any-owner", true);
- getConfiguration().set("config-version", 111);
+ getConfig().set("integration.worldguard.any-owner", true);
+ getConfig().set("config-version", 111);
selectedVersion = 111;
}
if (selectedVersion == 111) {
- getConfiguration().set("logging.enable", getConfiguration().getBoolean("log-actions"));
- getConfiguration().set("logging.log-actions", getConfiguration().getBoolean("log-actions"));
- getConfiguration().set("logging.log-balance", true);
- getConfiguration().set("logging.file-size", 10);
- getConfiguration().set("debug.disable-debuglogger", false);
- getConfiguration().set("trying-fix-banlance-insuffient", false);
- getConfiguration().remove("log-actions");
- getConfiguration().set("config-version", 112);
+ getConfig().set("logging.enable", getConfig().getBoolean("log-actions"));
+ getConfig().set("logging.log-actions", getConfig().getBoolean("log-actions"));
+ getConfig().set("logging.log-balance", true);
+ getConfig().set("logging.file-size", 10);
+ getConfig().set("debug.disable-debuglogger", false);
+ getConfig().set("trying-fix-banlance-insuffient", false);
+ getConfig().set("log-actions", null);
+ getConfig().set("config-version", 112);
selectedVersion = 112;
}
if (selectedVersion == 112) {
- getConfiguration().set("integration.lands.delete-on-lose-permission", false);
- getConfiguration().set("config-version", 113);
+ getConfig().set("integration.lands.delete-on-lose-permission", false);
+ getConfig().set("config-version", 113);
selectedVersion = 113;
}
if (selectedVersion == 113) {
- getConfiguration().set("config-damaged", false);
- getConfiguration().set("config-version", 114);
+ getConfig().set("config-damaged", false);
+ getConfig().set("config-version", 114);
selectedVersion = 114;
}
if (selectedVersion == 114) {
- getConfiguration().set("shop.interact.interact-mode", getConfiguration().getBoolean("shop.interact.switch-mode") ? 0 : 1);
- getConfiguration().remove("shop.interact.switch-mode");
- getConfiguration().set("config-version", 115);
+ getConfig().set("shop.interact.interact-mode", getConfig().getBoolean("shop.interact.switch-mode") ? 0 : 1);
+ getConfig().set("shop.interact.switch-mode", null);
+ getConfig().set("config-version", 115);
selectedVersion = 115;
}
if (selectedVersion == 115) {
- getConfiguration().set("integration.griefprevention.enable", false);
- getConfiguration().set("integration.griefprevention.whitelist-mode", false);
- getConfiguration().set("integration.griefprevention.create", Collections.emptyList());
- getConfiguration().set("integration.griefprevention.trade", Collections.emptyList());
- getConfiguration().set("config-version", 116);
+ getConfig().set("integration.griefprevention.enable", false);
+ getConfig().set("integration.griefprevention.whitelist-mode", false);
+ getConfig().set("integration.griefprevention.create", Collections.emptyList());
+ getConfig().set("integration.griefprevention.trade", Collections.emptyList());
+ getConfig().set("config-version", 116);
selectedVersion = 116;
}
if (selectedVersion == 116) {
- getConfiguration().set("shop.sending-stock-message-to-staffs", false);
- getConfiguration().set("integration.towny.delete-shop-on-resident-leave", false);
- getConfiguration().set("config-version", 117);
+ getConfig().set("shop.sending-stock-message-to-staffs", false);
+ getConfig().set("integration.towny.delete-shop-on-resident-leave", false);
+ getConfig().set("config-version", 117);
selectedVersion = 117;
}
if (selectedVersion == 117) {
- getConfiguration().set("shop.finding.distance", getConfiguration().getInt("shop.find-distance"));
- getConfiguration().set("shop.finding.limit", 10);
- getConfiguration().remove("shop.find-distance");
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("shop.finding.distance", getConfig().getInt("shop.find-distance"));
+ getConfig().set("shop.finding.limit", 10);
+ getConfig().set("shop.find-distance", null);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 118) {
- getConfiguration().set("shop.finding.oldLogic", false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("shop.finding.oldLogic", false);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 119) {
- getConfiguration().set("debug.adventure", false);
- getConfiguration().set("shop.finding.all", false);
- getConfiguration().set("chat-type", 0);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("debug.adventure", false);
+ getConfig().set("shop.finding.all", false);
+ getConfig().set("chat-type", 0);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 120) {
- getConfiguration().set("shop.finding.exclude-out-of-stock", false);
- getConfiguration().set("chat-type", 0);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("shop.finding.exclude-out-of-stock", false);
+ getConfig().set("chat-type", 0);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 121) {
- getConfiguration().set("shop.protection-checking-handler", 0);
- getConfiguration().set("shop.protection-checking-listener-blacklist", Collections.singletonList("ignored_listener"));
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("shop.protection-checking-handler", 0);
+ getConfig().set("shop.protection-checking-listener-blacklist", Collections.singletonList("ignored_listener"));
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 122) {
- getConfiguration().set("currency", "");
- getConfiguration().set("shop.alternate-currency-symbol-list", Arrays.asList("CNY;¥", "USD;$"));
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("currency", "");
+ getConfig().set("shop.alternate-currency-symbol-list", Arrays.asList("CNY;¥", "USD;$"));
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 123) {
- getConfiguration().set("integration.fabledskyblock.enable", false);
- getConfiguration().set("integration.fabledskyblock.whitelist-mode", false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.fabledskyblock.enable", false);
+ getConfig().set("integration.fabledskyblock.whitelist-mode", false);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 124) {
- getConfiguration().set("plugin.BKCommonLib", true);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("plugin.BKCommonLib", true);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 125) {
- getConfiguration().set("integration.superiorskyblock.enable", false);
- getConfiguration().set("integration.superiorskyblock.owner-create-only", false);
- getConfiguration().set("integration.superiorskyblock.delete-shop-on-member-leave", true);
- getConfiguration().set("shop.interact.swap-click-behavior", false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.superiorskyblock.enable", false);
+ getConfig().set("integration.superiorskyblock.owner-create-only", false);
+ getConfig().set("integration.superiorskyblock.delete-shop-on-member-leave", true);
+ getConfig().set("shop.interact.swap-click-behavior", false);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 126) {
- getConfiguration().set("debug.delete-corrupt-shops", false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("debug.delete-corrupt-shops", false);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 127) {
- getConfiguration().set("integration.plotsquared.delete-when-user-untrusted", true);
- getConfiguration().set("integration.towny.delete-shop-on-plot-clear", true);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.plotsquared.delete-when-user-untrusted", true);
+ getConfig().set("integration.towny.delete-shop-on-plot-clear", true);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 128) {
- getConfiguration().set("shop.force-use-item-original-name", false);
- getConfiguration().set("integration.griefprevention.delete-on-untrusted", false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("shop.force-use-item-original-name", false);
+ getConfig().set("integration.griefprevention.delete-on-untrusted", false);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 129) {
- getConfiguration().set("shop.use-global-virtual-item-queue", false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("shop.use-global-virtual-item-queue", false);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 130) {
- getConfiguration().set("plugin.WorldEdit", true);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("plugin.WorldEdit", true);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 131) {
- getConfiguration().set("custom-commands", ImmutableList.of("shop", "chestshop", "cshop"));
- getConfiguration().set("unlimited-shop-owner-change", false);
- getConfiguration().set("unlimited-shop-owner-change-account", "quickshop");
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("custom-commands", ImmutableList.of("shop", "chestshop", "cshop"));
+ getConfig().set("unlimited-shop-owner-change", false);
+ getConfig().set("unlimited-shop-owner-change-account", "quickshop");
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 132) {
- getConfiguration().set("shop.sign-glowing", false);
- getConfiguration().set("shop.sign-dye-color", "null");
- getConfiguration().set("unlimited-shop-owner-change-account", "quickshop");
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("shop.sign-glowing", false);
+ getConfig().set("shop.sign-dye-color", "null");
+ getConfig().set("unlimited-shop-owner-change-account", "quickshop");
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 133) {
- getConfiguration().set("integration.griefprevention.delete-on-unclaim", false);
- getConfiguration().set("integration.griefprevention.delete-on-claim-expired", false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.griefprevention.delete-on-unclaim", false);
+ getConfig().set("integration.griefprevention.delete-on-claim-expired", false);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 134) {
- getConfiguration().set("integration.griefprevention.delete-on-claim-resized", false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.griefprevention.delete-on-claim-resized", false);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 135) {
- getConfiguration().set("integration.advancedregionmarket.enable", true);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.advancedregionmarket.enable", true);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 136) {
- getConfiguration().remove("shop.use-global-virtual-item-queue");
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("shop.use-global-virtual-item-queue", null);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 137) {
- getConfiguration().remove("integration.griefprevention.create");
- getConfiguration().set("integration.griefprevention.create", "INVENTORY");
+ getConfig().set("integration.griefprevention.create", null);
+ getConfig().set("integration.griefprevention.create", "INVENTORY");
- getConfiguration().remove("integration.griefprevention.trade");
- getConfiguration().set("integration.griefprevention.trade", Collections.emptyList());
+ getConfig().set("integration.griefprevention.trade", null);
+ getConfig().set("integration.griefprevention.trade", Collections.emptyList());
- boolean oldValueUntrusted = getConfiguration().getOrDefault("integration.griefprevention.delete-on-untrusted", false);
- getConfiguration().remove("integration.griefprevention.delete-on-untrusted");
- getConfiguration().set("integration.griefprevention.delete-on-claim-trust-changed", oldValueUntrusted);
+ boolean oldValueUntrusted = getConfig().getBoolean("integration.griefprevention.delete-on-untrusted", false);
+ getConfig().set("integration.griefprevention.delete-on-untrusted", null);
+ getConfig().set("integration.griefprevention.delete-on-claim-trust-changed", oldValueUntrusted);
- boolean oldValueUnclaim = getConfiguration().getOrDefault("integration.griefprevention.delete-on-unclaim", false);
- getConfiguration().remove("integration.griefprevention.delete-on-unclaim");
- getConfiguration().set("integration.griefprevention.delete-on-claim-unclaimed", oldValueUnclaim);
+ boolean oldValueUnclaim = getConfig().getBoolean("integration.griefprevention.delete-on-unclaim", false);
+ getConfig().set("integration.griefprevention.delete-on-unclaim", null);
+ getConfig().set("integration.griefprevention.delete-on-claim-unclaimed", oldValueUnclaim);
- getConfiguration().set("integration.griefprevention.delete-on-subclaim-created", false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.griefprevention.delete-on-subclaim-created", false);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 138) {
- getConfiguration().set("integration.towny.whitelist-mode", true);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.towny.whitelist-mode", true);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 139) {
- getConfiguration().set("integration.iridiumskyblock.enable", false);
- getConfiguration().set("integration.iridiumskyblock.owner-create-only", false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.iridiumskyblock.enable", false);
+ getConfig().set("integration.iridiumskyblock.owner-create-only", false);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 140) {
- getConfiguration().set("integration.towny.delete-shop-on-plot-destroy", true);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.towny.delete-shop-on-plot-destroy", true);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 141) {
- getConfiguration().set("disabled-languages", Collections.singletonList("disable_here"));
- getConfiguration().set("mojangapi-mirror", 0);
- getConfiguration().set("purge.enabled", false);
- getConfiguration().set("purge.days", 60);
- getConfiguration().set("purge.banned", true);
- getConfiguration().set("purge.skip-op", true);
- getConfiguration().set("purge.return-create-fee", true);
- getConfiguration().remove("shop.use-fast-shop-search-algorithm");
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("disabled-languages", Collections.singletonList("disable_here"));
+ getConfig().set("mojangapi-mirror", 0);
+ getConfig().set("purge.enabled", false);
+ getConfig().set("purge.days", 60);
+ getConfig().set("purge.banned", true);
+ getConfig().set("purge.skip-op", true);
+ getConfig().set("purge.return-create-fee", true);
+ getConfig().set("shop.use-fast-shop-search-algorithm", null);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 142) {
- getConfiguration().remove("disabled-languages");
- getConfiguration().set("enabled-languages", Collections.singletonList("*"));
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("disabled-languages", null);
+ getConfig().set("enabled-languages", Collections.singletonList("*"));
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 143) {
-// if (getConfiguration().get("language") == null) {
-// getConfiguration().set("language", "en-US");
+// if (getConfig().get("language") == null) {
+// getConfig().set("language", "en-US");
// }
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 144) {
// Updater set it to true because plugin upgrading
// Default configuration disable it cause probably fresh install
- getConfiguration().getOrDefault("legacy-updater.shop-sign", true);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("legacy-updater.shop-sign", true);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 145) {
// Updater set it to true because plugin upgrading
// Default configuration disable it cause probably fresh install
- getConfiguration().set("logger.location", 0);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("logger.location", 0);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 146) {
// Updater set it to true because plugin upgrading
// Default configuration disable it cause probably fresh install
- getConfiguration().remove("language");
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("language", null);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 147) {
// Updater set it to true because plugin upgrading
// Default configuration disable it cause probably fresh install
- getConfiguration().remove("plugin.BKCommonLib");
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("plugin.BKCommonLib", null);
+ getConfig().set("config-version", ++selectedVersion);
}
if (selectedVersion == 148) {
- getConfiguration().set("integration.worldguard.respect-global-region",false);
- getConfiguration().set("config-version", ++selectedVersion);
+ getConfig().set("integration.worldguard.respect-global-region", false);
+ getConfig().set("config-version", ++selectedVersion);
}
- if (getConfiguration().getInt("matcher.work-type") != 0 && GameVersion.get(ReflectFactory.getServerVersion()).name().contains("1_16")) {
+ 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");
}
try (InputStreamReader buildInConfigReader = new InputStreamReader(new BufferedInputStream(Objects.requireNonNull(getResource("config.yml"))), StandardCharsets.UTF_8)) {
- if (new ConfigurationFixerLightning(this, new File(getDataFolder(), "config.yml"), getConfiguration(), YamlConfiguration.loadConfiguration(buildInConfigReader)).fix()) {
+ if (new ConfigurationFixer(this, new File(getDataFolder(), "config.yml"), getConfig(), YamlConfiguration.loadConfiguration(buildInConfigReader)).fix()) {
reloadConfiguration();
}
}
@@ -2030,7 +2038,7 @@ public void setupBootError(BootError bootError, boolean unregisterListeners) {
}
public void registerCustomCommands() {
- List customCommands = getConfiguration().getStringList("custom-commands");
+ List customCommands = getConfig().getStringList("custom-commands");
PluginCommand quickShopCommand = getCommand("qs");
if (quickShopCommand == null) {
getLogger().warning("Failed to get QuickShop PluginCommand instance.");
diff --git a/src/main/java/org/maxgamer/quickshop/api/economy/AbstractEconomy.java b/src/main/java/org/maxgamer/quickshop/api/economy/AbstractEconomy.java
index 95f21087f6..02d731e306 100644
--- a/src/main/java/org/maxgamer/quickshop/api/economy/AbstractEconomy.java
+++ b/src/main/java/org/maxgamer/quickshop/api/economy/AbstractEconomy.java
@@ -43,7 +43,7 @@ public AbstractEconomy() {
* @return Economy type that QuickShop now using
*/
public static EconomyType getNowUsing() {
- return EconomyType.fromID(QuickShop.getInstance().getConfiguration().getInt("economy-type"));
+ return EconomyType.fromID(QuickShop.getInstance().getConfig().getInt("economy-type"));
}
@Override
diff --git a/src/main/java/org/maxgamer/quickshop/api/economy/EconomyTransaction.java b/src/main/java/org/maxgamer/quickshop/api/economy/EconomyTransaction.java
index d07947f750..01bca46396 100644
--- a/src/main/java/org/maxgamer/quickshop/api/economy/EconomyTransaction.java
+++ b/src/main/java/org/maxgamer/quickshop/api/economy/EconomyTransaction.java
@@ -103,7 +103,7 @@ public EconomyTransaction(@Nullable UUID from, @Nullable UUID to, double amount,
//For passing Test
//noinspection ConstantConditions
if (QuickShop.getInstance() != null) {
- this.tryingFixBalanceInsufficient = QuickShop.getInstance().getConfiguration().getBoolean("trying-fix-banlance-insuffient");
+ this.tryingFixBalanceInsufficient = QuickShop.getInstance().getConfig().getBoolean("trying-fix-banlance-insuffient");
} else {
this.tryingFixBalanceInsufficient = false;
}
diff --git a/src/main/java/org/maxgamer/quickshop/api/shop/AbstractDisplayItem.java b/src/main/java/org/maxgamer/quickshop/api/shop/AbstractDisplayItem.java
index 05819b0fba..9c3bc13445 100644
--- a/src/main/java/org/maxgamer/quickshop/api/shop/AbstractDisplayItem.java
+++ b/src/main/java/org/maxgamer/quickshop/api/shop/AbstractDisplayItem.java
@@ -175,10 +175,10 @@ public static boolean checkIsTargetShopDisplay(@NotNull final ItemStack itemStac
*/
@NotNull
public static DisplayType getNowUsing() {
- DisplayType displayType = DisplayType.fromID(PLUGIN.getConfiguration().getInt("shop.display-type"));
+ DisplayType displayType = DisplayType.fromID(PLUGIN.getConfig().getInt("shop.display-type"));
//Falling back to RealDisplayItem when VirtualDisplayItem is unsupported
if (isNotSupportVirtualItem && displayType == DisplayType.VIRTUALITEM) {
- PLUGIN.getConfiguration().set("shop.display-type", 0);
+ PLUGIN.getConfig().set("shop.display-type", 0);
PLUGIN.saveConfiguration();
PLUGIN.getLogger().log(Level.WARNING, "Falling back to RealDisplayItem because VirtualDisplayItem is unsupported");
return DisplayType.REALITEM;
@@ -204,7 +204,7 @@ public static ItemStack createGuardItemStack(@NotNull ItemStack itemStack, @NotN
Util.debugLog("ItemStack " + itemStack + " cannot getting or creating ItemMeta, failed to create guarded ItemStack.");
return itemStack;
}
- if (PLUGIN.getConfiguration().getBoolean("shop.display-item-use-name")) {
+ if (PLUGIN.getConfig().getBoolean("shop.display-item-use-name")) {
if (iMeta.hasDisplayName()) {
iMeta.setDisplayName(iMeta.getDisplayName());
} else {
@@ -234,7 +234,7 @@ public static ShopProtectionFlag createShopProtectionFlag(
}
protected void init() {
- DISPLAY_ALLOW_STACKS = PLUGIN.getConfiguration().getBoolean("shop.display-allow-stacks");
+ DISPLAY_ALLOW_STACKS = PLUGIN.getConfig().getBoolean("shop.display-allow-stacks");
if (DISPLAY_ALLOW_STACKS) {
//Prevent stack over the normal size
originalItemStack.setAmount(Math.min(originalItemStack.getAmount(), originalItemStack.getMaxStackSize()));
diff --git a/src/main/java/org/maxgamer/quickshop/api/shop/Shop.java b/src/main/java/org/maxgamer/quickshop/api/shop/Shop.java
index 93f32ac561..3b7f387764 100644
--- a/src/main/java/org/maxgamer/quickshop/api/shop/Shop.java
+++ b/src/main/java/org/maxgamer/quickshop/api/shop/Shop.java
@@ -582,7 +582,7 @@ default boolean isShopSign(@NotNull Sign sign) {
if (lines[1].startsWith(SHOP_SIGN_PATTERN)) {
return true;
} else {
- if (!QuickShop.getInstance().getConfiguration().getOrDefault("legacy-updater.shop-sign", false)) {
+ if (!QuickShop.getInstance().getConfig().getBoolean("legacy-updater.shop-sign", false)) {
return false;
}
String header = lines[0];
diff --git a/src/main/java/org/maxgamer/quickshop/command/SimpleCommandManager.java b/src/main/java/org/maxgamer/quickshop/command/SimpleCommandManager.java
index c561d42a3f..9fb2f1fd0e 100644
--- a/src/main/java/org/maxgamer/quickshop/command/SimpleCommandManager.java
+++ b/src/main/java/org/maxgamer/quickshop/command/SimpleCommandManager.java
@@ -389,7 +389,7 @@ public boolean onCommand(
return true;
}
}
- if (sender instanceof Player && plugin.getConfiguration().getBoolean("effect.sound.oncommand")) {
+ if (sender instanceof Player && plugin.getConfig().getBoolean("effect.sound.oncommand")) {
Player player = (Player) sender;
((Player) sender)
.playSound(player.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 80.0F, 1.0F);
@@ -501,7 +501,7 @@ private boolean isAdapt(CommandContainer container, CommandSender sender) {
if (plugin.getBootError() != null) {
return Collections.emptyList();
}
- if (sender instanceof Player && plugin.getConfiguration().getBoolean("effect.sound.ontabcomplete")) {
+ if (sender instanceof Player && plugin.getConfig().getBoolean("effect.sound.ontabcomplete")) {
Player player = (Player) sender;
((Player) sender).playSound(player.getLocation(), Sound.BLOCK_DISPENSER_FAIL, 80.0F, 1.0F);
}
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Convert.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Convert.java
index 210266fab9..744e018c58 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Convert.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Convert.java
@@ -19,11 +19,11 @@
package org.maxgamer.quickshop.command.subcommand;
-import de.leonhard.storage.sections.FlatFileSection;
import lombok.SneakyThrows;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
+import org.bukkit.configuration.ConfigurationSection;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.maxgamer.quickshop.QuickShop;
@@ -73,7 +73,7 @@ public void onCommand(@NotNull ConsoleCommandSender sender, @NotNull String comm
sender.sendMessage(ChatColor.RED + "Your database is already in MySQL!");
return;
}
- FlatFileSection dbCfg = plugin.getConfiguration().getSection("database");
+ ConfigurationSection dbCfg = plugin.getConfig().getConfigurationSection("database");
String user = dbCfg.getString("user");
String pass = dbCfg.getString("password");
String host = dbCfg.getString("host");
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Debug.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Debug.java
index 32de8c5750..df6ca2b494 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Debug.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Debug.java
@@ -117,17 +117,17 @@ public List onTabComplete(
}
public void switchDebug(@NotNull CommandSender sender) {
- final boolean debug = plugin.getConfiguration().getBoolean("dev-mode");
+ final boolean debug = plugin.getConfig().getBoolean("dev-mode");
if (debug) {
- plugin.getConfiguration().set("dev-mode", false);
+ plugin.getConfig().set("dev-mode", false);
plugin.saveConfiguration();
plugin.reload();
plugin.text().of(sender, "command.now-nolonger-debuging").send();
return;
}
- plugin.getConfiguration().set("dev-mode", true);
+ plugin.getConfig().set("dev-mode", true);
plugin.saveConfiguration();
plugin.reload();
plugin.text().of(sender, "command.now-debuging").send();
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
index 65707387a2..f36556d2bf 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
@@ -59,11 +59,11 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
final String lookFor = sb.toString().toLowerCase();
- final double maxDistance = plugin.getConfiguration().getInt("shop.finding.distance");
- final boolean usingOldLogic = plugin.getConfiguration().getBoolean("shop.finding.oldLogic");
- final int shopLimit = usingOldLogic ? 1 : plugin.getConfiguration().getInt("shop.finding.limit");
- final boolean allShops = plugin.getConfiguration().getBoolean("shop.finding.all");
- final boolean excludeOutOfStock = plugin.getConfiguration().getBoolean("shop.finding.exclude-out-of-stock");
+ final double maxDistance = plugin.getConfig().getInt("shop.finding.distance");
+ final boolean usingOldLogic = plugin.getConfig().getBoolean("shop.finding.oldLogic");
+ final int shopLimit = usingOldLogic ? 1 : plugin.getConfig().getInt("shop.finding.limit");
+ final boolean allShops = plugin.getConfig().getBoolean("shop.finding.all");
+ final boolean excludeOutOfStock = plugin.getConfig().getBoolean("shop.finding.exclude-out-of-stock");
//Rewrite by Ghost_chu - Use vector to replace old chunks finding.
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Item.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Item.java
index 7e12347ba1..a4b7de628c 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Item.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Item.java
@@ -65,10 +65,10 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
itemStack.setAmount(1);
}
SimplePriceLimiter limiter = new SimplePriceLimiter(
- plugin.getConfiguration().getDouble("shop.minimum-price"),
- plugin.getConfiguration().getInt("shop.maximum-price"),
- plugin.getConfiguration().getBoolean("shop.allow-free-shop"),
- plugin.getConfiguration().getBoolean("whole-number-prices-only"));
+ plugin.getConfig().getDouble("shop.minimum-price"),
+ plugin.getConfig().getInt("shop.maximum-price"),
+ plugin.getConfig().getBoolean("shop.allow-free-shop"),
+ plugin.getConfig().getBoolean("whole-number-prices-only"));
PriceLimiterCheckResult checkResult = limiter.check(itemStack, shop.getPrice());
if (checkResult.getStatus() != PriceLimiterStatus.PASS) {
plugin.text().of(sender, "restricted-prices", MsgUtil.getTranslateText(shop.getItem()),
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 fcaa81a361..173c9d73d4 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
@@ -68,12 +68,12 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
return;
}
- final boolean format = plugin.getConfiguration().getBoolean("use-decimal-format");
+ final boolean format = plugin.getConfig().getBoolean("use-decimal-format");
double fee = 0;
if (plugin.isPriceChangeRequiresFee()) {
- fee = plugin.getConfiguration().getDouble("shop.fee-for-price-change");
+ fee = plugin.getConfig().getDouble("shop.fee-for-price-change");
}
final BlockIterator bIt = new BlockIterator(sender, 10);
@@ -84,10 +84,10 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
}
SimplePriceLimiter limiter = new SimplePriceLimiter(
- plugin.getConfiguration().getDouble("shop.minimum-price"),
- plugin.getConfiguration().getInt("shop.maximum-price"),
- plugin.getConfiguration().getBoolean("shop.allow-free-shop"),
- plugin.getConfiguration().getBoolean("whole-number-prices-only"));
+ plugin.getConfig().getDouble("shop.minimum-price"),
+ plugin.getConfig().getInt("shop.maximum-price"),
+ plugin.getConfig().getBoolean("shop.allow-free-shop"),
+ plugin.getConfig().getBoolean("whole-number-prices-only"));
while (bIt.hasNext()) {
final Block b = bIt.next();
@@ -129,7 +129,7 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
if (fee > 0) {
EconomyTransaction transaction = EconomyTransaction.builder()
- .allowLoan(plugin.getConfiguration().getOrDefault("shop.allow-economy-loan", false))
+ .allowLoan(plugin.getConfig().getBoolean("shop.allow-economy-loan", false))
.core(plugin.getEconomy())
.from(sender.getUniqueId())
.amount(fee)
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Refill.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Refill.java
index a23f13f6ba..16f1a5fab4 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Refill.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Refill.java
@@ -61,7 +61,7 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
if (StringUtils.isNumeric(cmdArg[0])) {
add = Integer.parseInt(cmdArg[0]);
} else {
- if (cmdArg[0].equals(plugin.getConfiguration().getString("shop.word-for-trade-all-items"))) {
+ if (cmdArg[0].equals(plugin.getConfig().getString("shop.word-for-trade-all-items"))) {
add = shop.getRemainingSpace();
} else {
plugin.text().of(sender, "thats-not-a-number").send();
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Reset.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Reset.java
index 61ae88ff02..762a617e9b 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Reset.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Reset.java
@@ -60,7 +60,7 @@ public void onCommand(@NotNull CommandSender sender, @NotNull String commandLabe
item.delete();
ench.delete();
potion.delete();
- MsgUtil.loadGameLanguage(Objects.requireNonNull(plugin.getConfiguration().getOrDefault("game-language", "default")));
+ MsgUtil.loadGameLanguage(Objects.requireNonNull(plugin.getConfig().getString("game-language", "default")));
MsgUtil.loadItemi18n();
MsgUtil.loadEnchi18n();
MsgUtil.loadPotioni18n();
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentUnlimited.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentUnlimited.java
index 47f71afe96..0cd2c20873 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentUnlimited.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentUnlimited.java
@@ -55,14 +55,14 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
if (shop.isUnlimited()) {
plugin.text().of(sender, "command.toggle-unlimited.unlimited").send();
- if (plugin.getConfiguration().getBoolean("unlimited-shop-owner-change")) {
+ if (plugin.getConfig().getBoolean("unlimited-shop-owner-change")) {
plugin.getShopManager().migrateOwnerToUnlimitedShopOwner(shop);
plugin.text().of(sender, "unlimited-shop-owner-changed", ((SimpleShopManager) plugin.getShopManager()).getCacheUnlimitedShopAccount().getName()).send();
}
return;
}
plugin.text().of(sender, "command.toggle-unlimited.limited").send();
- if (plugin.getConfiguration().getBoolean("unlimited-shop-owner-change")) {
+ if (plugin.getConfig().getBoolean("unlimited-shop-owner-change")) {
plugin.text().of(sender, "unlimited-shop-owner-keeped").send();
}
}
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Size.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Size.java
index baec8e1142..f43c6b0e8a 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Size.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Size.java
@@ -69,10 +69,10 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
ItemStack pendingItemStack = shop.getItem().clone();
pendingItemStack.setAmount(amount);
SimplePriceLimiter limiter = new SimplePriceLimiter(
- plugin.getConfiguration().getDouble("shop.minimum-price"),
- plugin.getConfiguration().getInt("shop.maximum-price"),
- plugin.getConfiguration().getBoolean("shop.allow-free-shop"),
- plugin.getConfiguration().getBoolean("whole-number-prices-only"));
+ plugin.getConfig().getDouble("shop.minimum-price"),
+ plugin.getConfig().getInt("shop.maximum-price"),
+ plugin.getConfig().getBoolean("shop.allow-free-shop"),
+ plugin.getConfig().getBoolean("whole-number-prices-only"));
PriceLimiterCheckResult checkResult = limiter.check(pendingItemStack, shop.getPrice());
if (checkResult.getStatus() != PriceLimiterStatus.PASS) {
plugin.text().of(sender, "restricted-prices", MsgUtil.getTranslateText(shop.getItem()),
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Unlimited.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Unlimited.java
index 57b930f668..d52c8723ca 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Unlimited.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Unlimited.java
@@ -48,14 +48,14 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
shop.update();
if (shop.isUnlimited()) {
plugin.text().of(sender, "command.toggle-unlimited.unlimited").send();
- if (plugin.getConfiguration().getBoolean("unlimited-shop-owner-change")) {
+ if (plugin.getConfig().getBoolean("unlimited-shop-owner-change")) {
plugin.getShopManager().migrateOwnerToUnlimitedShopOwner(shop);
plugin.text().of(sender, "unlimited-shop-owner-changed", ((SimpleShopManager) plugin.getShopManager()).getCacheUnlimitedShopAccount().getName()).send();
}
return;
}
plugin.text().of(sender, "command.toggle-unlimited.limited").send();
- if (plugin.getConfiguration().getBoolean("unlimited-shop-owner-change")) {
+ if (plugin.getConfig().getBoolean("unlimited-shop-owner-change")) {
plugin.text().of(sender, "unlimited-shop-owner-keeped").send();
}
return;
diff --git a/src/main/java/org/maxgamer/quickshop/database/DatabaseManager.java b/src/main/java/org/maxgamer/quickshop/database/DatabaseManager.java
index 29edcef99a..bfd20b7260 100644
--- a/src/main/java/org/maxgamer/quickshop/database/DatabaseManager.java
+++ b/src/main/java/org/maxgamer/quickshop/database/DatabaseManager.java
@@ -74,7 +74,7 @@ public DatabaseManager(@NotNull QuickShop plugin, @NotNull AbstractDatabaseCore
}
private void init() throws ConnectionException {
- this.useQueue = plugin.getConfiguration().getBoolean("database.queue");
+ this.useQueue = plugin.getConfig().getBoolean("database.queue");
if (task != null) {
task.cancel();
plugin.getDatabaseManager().runTask();
@@ -93,7 +93,7 @@ private void init() throws ConnectionException {
if (!task.isCancelled()) {
plugin.getDatabaseManager().runTask();
}
- }, 1, plugin.getConfiguration().getLong("database.queue-commit-interval") * 20);
+ }, 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_GemsEconomy.java b/src/main/java/org/maxgamer/quickshop/economy/Economy_GemsEconomy.java
index 2fe4d6c3b2..86944521f0 100644
--- a/src/main/java/org/maxgamer/quickshop/economy/Economy_GemsEconomy.java
+++ b/src/main/java/org/maxgamer/quickshop/economy/Economy_GemsEconomy.java
@@ -58,7 +58,7 @@ public Economy_GemsEconomy(@NotNull QuickShop plugin) {
private void init() {
- this.allowLoan = plugin.getConfiguration().getBoolean("shop.allow-economy-loan");
+ this.allowLoan = plugin.getConfig().getBoolean("shop.allow-economy-loan");
}
private void setupEconomy() {
diff --git a/src/main/java/org/maxgamer/quickshop/economy/Economy_Mixed.java b/src/main/java/org/maxgamer/quickshop/economy/Economy_Mixed.java
index 9a5a1c3140..c15b73d2e1 100644
--- a/src/main/java/org/maxgamer/quickshop/economy/Economy_Mixed.java
+++ b/src/main/java/org/maxgamer/quickshop/economy/Economy_Mixed.java
@@ -47,7 +47,7 @@
// Bukkit.dispatchCommand(
// Bukkit.getConsoleSender(),
// MsgUtil.fillArgs(
-// plugin.getConfiguration().getString("mixedeconomy.deposit"),
+// plugin.getConfig().getString("mixedeconomy.deposit"),
// Bukkit.getOfflinePlayer(name).getName(),
// String.valueOf(amount)));
// return true;
@@ -61,7 +61,7 @@
// Bukkit.dispatchCommand(
// Bukkit.getConsoleSender(),
// MsgUtil.fillArgs(
-// plugin.getConfiguration().getString("mixedeconomy.deposit"),
+// plugin.getConfig().getString("mixedeconomy.deposit"),
// trader.getName(),
// String.valueOf(amount)));
// return true;
@@ -104,7 +104,7 @@
// Bukkit.dispatchCommand(
// Bukkit.getConsoleSender(),
// MsgUtil.fillArgs(
-// plugin.getConfiguration().getString("mixedeconomy.withdraw"),
+// plugin.getConfig().getString("mixedeconomy.withdraw"),
// Bukkit.getOfflinePlayer(name).getName(),
// String.valueOf(amount)));
// return true;
@@ -118,7 +118,7 @@
// Bukkit.dispatchCommand(
// Bukkit.getConsoleSender(),
// MsgUtil.fillArgs(
-// plugin.getConfiguration().getString("mixedeconomy.withdraw"),
+// plugin.getConfig().getString("mixedeconomy.withdraw"),
// trader.getName(),
// String.valueOf(amount)));
// return true;
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 804a09634e..a306e0465e 100644
--- a/src/main/java/org/maxgamer/quickshop/economy/Economy_TNE.java
+++ b/src/main/java/org/maxgamer/quickshop/economy/Economy_TNE.java
@@ -58,7 +58,7 @@ public Economy_TNE(@NotNull QuickShop plugin) {
}
private void init() {
- this.allowLoan = plugin.getConfiguration().getBoolean("shop.allow-economy-loan");
+ this.allowLoan = plugin.getConfig().getBoolean("shop.allow-economy-loan");
}
private void setupEconomy() {
diff --git a/src/main/java/org/maxgamer/quickshop/economy/Economy_Vault.java b/src/main/java/org/maxgamer/quickshop/economy/Economy_Vault.java
index 1b18b8285e..64cd6ba4f1 100644
--- a/src/main/java/org/maxgamer/quickshop/economy/Economy_Vault.java
+++ b/src/main/java/org/maxgamer/quickshop/economy/Economy_Vault.java
@@ -68,7 +68,7 @@ public Economy_Vault(@NotNull QuickShop plugin) {
}
private void init() {
- this.allowLoan = plugin.getConfiguration().getBoolean("shop.allow-economy-loan");
+ this.allowLoan = plugin.getConfig().getBoolean("shop.allow-economy-loan");
}
private boolean setupEconomy() {
diff --git a/src/main/java/org/maxgamer/quickshop/eventmanager/QSEventManager.java b/src/main/java/org/maxgamer/quickshop/eventmanager/QSEventManager.java
index 24b140bda9..1854b47f97 100644
--- a/src/main/java/org/maxgamer/quickshop/eventmanager/QSEventManager.java
+++ b/src/main/java/org/maxgamer/quickshop/eventmanager/QSEventManager.java
@@ -66,7 +66,7 @@ public void pluginEnable(PluginEnableEvent event) {
private synchronized void rescan() {
this.ignoredListener.clear();
plugin
- .getConfiguration()
+ .getConfig()
.getStringList("shop.protection-checking-listener-blacklist")
.forEach(
input -> {
diff --git a/src/main/java/org/maxgamer/quickshop/integration/SimpleIntegrationManager.java b/src/main/java/org/maxgamer/quickshop/integration/SimpleIntegrationManager.java
index 1bfab75ae4..68ab77a862 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/SimpleIntegrationManager.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/SimpleIntegrationManager.java
@@ -81,7 +81,7 @@ public void searchAndRegisterPlugins() {
PluginManager pluginManager = plugin.getServer().getPluginManager();
for (Map.Entry> entry : INTEGRATION_MAPPING.entrySet()) {
String pluginName = entry.getKey();
- if (pluginManager.isPluginEnabled(pluginName) && plugin.getConfiguration().getBoolean("integration." + pluginName.toLowerCase() + ".enable")) {
+ if (pluginManager.isPluginEnabled(pluginName) && plugin.getConfig().getBoolean("integration." + pluginName.toLowerCase() + ".enable")) {
try {
register(entry.getValue());
} catch (Exception exception) {
diff --git a/src/main/java/org/maxgamer/quickshop/integration/fabledskyblock/FabledIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/fabledskyblock/FabledIntegration.java
index 0c97ca477e..8d36b70c30 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/fabledskyblock/FabledIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/fabledskyblock/FabledIntegration.java
@@ -46,8 +46,8 @@ public FabledIntegration(QuickShop plugin) {
}
private void loadConfiguration() {
- ignoreDisabledWorlds = plugin.getConfiguration().getBoolean("integration.fabledskyblock.ignore-disabled-worlds");
- whitelist = plugin.getConfiguration().getBoolean("integration.fabledskyblock.whitelist-mode");
+ ignoreDisabledWorlds = plugin.getConfig().getBoolean("integration.fabledskyblock.ignore-disabled-worlds");
+ whitelist = plugin.getConfig().getBoolean("integration.fabledskyblock.whitelist-mode");
}
/**
diff --git a/src/main/java/org/maxgamer/quickshop/integration/factionsuuid/FactionsUUIDIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/factionsuuid/FactionsUUIDIntegration.java
index 68ae2dfdca..16e8e9e76c 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/factionsuuid/FactionsUUIDIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/factionsuuid/FactionsUUIDIntegration.java
@@ -84,42 +84,42 @@ public FactionsUUIDIntegration(QuickShop plugin) {
}
private void init() {
- this.createFlags = plugin.getConfiguration().getStringList("integration.factions.create.flags");
- this.tradeFlags = plugin.getConfiguration().getStringList("integration.factions.trade.flags");
+ this.createFlags = plugin.getConfig().getStringList("integration.factions.create.flags");
+ this.tradeFlags = plugin.getConfig().getStringList("integration.factions.trade.flags");
- this.whiteList = plugin.getConfiguration().getBoolean("integration.factions.whitelist-mode");
+ this.whiteList = plugin.getConfig().getBoolean("integration.factions.whitelist-mode");
this.createRequireOpen =
- plugin.getConfiguration().getBoolean("integration.factions.create.require.open");
+ plugin.getConfig().getBoolean("integration.factions.create.require.open");
this.createRequireNormal =
- plugin.getConfiguration().getBoolean("integration.factions.create.require.normal");
+ plugin.getConfig().getBoolean("integration.factions.create.require.normal");
this.createRequireWilderness =
- plugin.getConfiguration().getBoolean("integration.factions.create.require.wilderness");
+ plugin.getConfig().getBoolean("integration.factions.create.require.wilderness");
this.createRequirePeaceful =
- plugin.getConfiguration().getBoolean("integration.factions.create.require.peaceful");
+ plugin.getConfig().getBoolean("integration.factions.create.require.peaceful");
this.createRequirePermanent =
- plugin.getConfiguration().getBoolean("integration.factions.create.require.permanent");
+ plugin.getConfig().getBoolean("integration.factions.create.require.permanent");
this.createRequireSafeZone =
- plugin.getConfiguration().getBoolean("integration.factions.create.require.safezone");
+ plugin.getConfig().getBoolean("integration.factions.create.require.safezone");
this.createRequireOwn =
- plugin.getConfiguration().getBoolean("integration.factions.create.require.own");
+ plugin.getConfig().getBoolean("integration.factions.create.require.own");
this.createRequireWarZone =
- plugin.getConfiguration().getBoolean("integration.factions.create.require.warzone");
+ plugin.getConfig().getBoolean("integration.factions.create.require.warzone");
this.tradeRequireOpen =
- plugin.getConfiguration().getBoolean("integration.factions.trade.require.open");
+ plugin.getConfig().getBoolean("integration.factions.trade.require.open");
this.tradeRequireNormal =
- plugin.getConfiguration().getBoolean("integration.factions.trade.require.normal");
+ plugin.getConfig().getBoolean("integration.factions.trade.require.normal");
this.tradeRequireWilderness =
- plugin.getConfiguration().getBoolean("integration.factions.trade.require.wilderness");
+ plugin.getConfig().getBoolean("integration.factions.trade.require.wilderness");
this.tradeRequirePeaceful =
- plugin.getConfiguration().getBoolean("integration.factions.trade.require.peaceful");
+ plugin.getConfig().getBoolean("integration.factions.trade.require.peaceful");
this.tradeRequirePermanent =
- plugin.getConfiguration().getBoolean("integration.factions.trade.require.permanent");
+ plugin.getConfig().getBoolean("integration.factions.trade.require.permanent");
this.tradeRequireSafeZone =
- plugin.getConfiguration().getBoolean("integration.factions.trade.require.safezone");
- this.tradeRequireOwn = plugin.getConfiguration().getBoolean("integration.factions.trade.require.own");
+ plugin.getConfig().getBoolean("integration.factions.trade.require.safezone");
+ this.tradeRequireOwn = plugin.getConfig().getBoolean("integration.factions.trade.require.own");
this.tradeRequireWarZone =
- plugin.getConfiguration().getBoolean("integration.factions.trade.require.warzone");
+ plugin.getConfig().getBoolean("integration.factions.trade.require.warzone");
}
private boolean check(@NotNull Player player, @NotNull Location location, boolean createRequireOpen, boolean createRequireSafeZone, boolean createRequirePermanent, boolean createRequirePeaceful, boolean createRequireWilderness, boolean createRequireWarZone, boolean createRequireNormal, boolean createRequireOwn, List createFlags, boolean whiteList) {
diff --git a/src/main/java/org/maxgamer/quickshop/integration/griefprevention/GriefPreventionIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/griefprevention/GriefPreventionIntegration.java
index db32345bf7..7b0bb263cc 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/griefprevention/GriefPreventionIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/griefprevention/GriefPreventionIntegration.java
@@ -19,7 +19,6 @@
package org.maxgamer.quickshop.integration.griefprevention;
-import de.leonhard.storage.sections.FlatFileSection;
import me.ryanhamshire.GriefPrevention.Claim;
import me.ryanhamshire.GriefPrevention.ClaimPermission;
import me.ryanhamshire.GriefPrevention.GriefPrevention;
@@ -27,6 +26,8 @@
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.Material;
+import org.bukkit.configuration.ConfigurationSection;
+import org.bukkit.configuration.MemoryConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@@ -66,7 +67,10 @@ public GriefPreventionIntegration(QuickShop plugin) {
}
private void init() {
- FlatFileSection configurationSection = plugin.getConfiguration().getSection("integration.griefprevention");
+ ConfigurationSection configurationSection = plugin.getConfig().getConfigurationSection("integration.griefprevention");
+ if (configurationSection == null) {
+ configurationSection = new MemoryConfiguration();
+ }
this.whiteList = configurationSection.getBoolean("whitelist-mode");
this.deleteOnClaimTrustChanged = configurationSection.getBoolean("delete-on-claim-trust-changed");
this.deleteOnClaimUnclaimed = configurationSection.getBoolean("delete-on-claim-unclaimed");
diff --git a/src/main/java/org/maxgamer/quickshop/integration/iridiumskyblock/IridiumSkyblockIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/iridiumskyblock/IridiumSkyblockIntegration.java
index 6af19d2b11..80dd5f20bf 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/iridiumskyblock/IridiumSkyblockIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/iridiumskyblock/IridiumSkyblockIntegration.java
@@ -57,7 +57,7 @@ public IridiumSkyblockIntegration(QuickShop plugin) {
}
private void init() {
- onlyOwnerCanCreateShop = plugin.getConfiguration().getBoolean("integration.iridiumskyblock.owner-create-only");
+ onlyOwnerCanCreateShop = plugin.getConfig().getBoolean("integration.iridiumskyblock.owner-create-only");
}
/**
@@ -116,7 +116,7 @@ public boolean canTradeShopHere(@NotNull Player player, @NotNull Location locati
*/
@Override
public void load() {
- if (plugin.getConfiguration().getBoolean("integration.iridiumskyblock.delete-shop-on-member-leave")) {
+ if (plugin.getConfig().getBoolean("integration.iridiumskyblock.delete-shop-on-member-leave")) {
Bukkit.getPluginManager().registerEvents(this, plugin);
}
}
diff --git a/src/main/java/org/maxgamer/quickshop/integration/lands/LandsIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/lands/LandsIntegration.java
index 2072ccdb7a..76013a8f9c 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/lands/LandsIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/lands/LandsIntegration.java
@@ -59,9 +59,9 @@ public LandsIntegration(QuickShop plugin) {
private void init() {
landsIntegration = new me.angeschossen.lands.api.integration.LandsIntegration(plugin);
- ignoreDisabledWorlds = plugin.getConfiguration().getBoolean("integration.lands.ignore-disabled-worlds");
- whitelist = plugin.getConfiguration().getBoolean("integration.lands.whitelist-mode");
- deleteWhenLosePermission = plugin.getConfiguration().getBoolean("integration.lands.delete-on-lose-permission");
+ ignoreDisabledWorlds = plugin.getConfig().getBoolean("integration.lands.ignore-disabled-worlds");
+ whitelist = plugin.getConfig().getBoolean("integration.lands.whitelist-mode");
+ deleteWhenLosePermission = plugin.getConfig().getBoolean("integration.lands.delete-on-lose-permission");
}
@Override
diff --git a/src/main/java/org/maxgamer/quickshop/integration/plotsquared/PlotSquaredIntegrationV6.java b/src/main/java/org/maxgamer/quickshop/integration/plotsquared/PlotSquaredIntegrationV6.java
index 7099490dc2..5684debe5a 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/plotsquared/PlotSquaredIntegrationV6.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/plotsquared/PlotSquaredIntegrationV6.java
@@ -78,8 +78,8 @@ public PlotSquaredIntegrationV6(QuickShop plugin) {
}
private void init() {
- this.whiteList = plugin.getConfiguration().getBoolean("integration.plotsquared.whitelist-mode");
- this.deleteUntrusted = plugin.getConfiguration().getBoolean("integration.plotsquared.delete-when-user-untrusted");
+ this.whiteList = plugin.getConfig().getBoolean("integration.plotsquared.whitelist-mode");
+ this.deleteUntrusted = plugin.getConfig().getBoolean("integration.plotsquared.delete-when-user-untrusted");
}
@Override
diff --git a/src/main/java/org/maxgamer/quickshop/integration/residence/ResidenceIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/residence/ResidenceIntegration.java
index 6c20d354b4..50ab656bf4 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/residence/ResidenceIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/residence/ResidenceIntegration.java
@@ -52,9 +52,9 @@ public ResidenceIntegration(QuickShop plugin) {
}
private void init() {
- this.whiteList = plugin.getConfiguration().getBoolean("integration.residence.whitelist-mode");
- this.createLimits = plugin.getConfiguration().getStringList("integration.residence.create");
- this.tradeLimits = plugin.getConfiguration().getStringList("integration.residence.trade");
+ this.whiteList = plugin.getConfig().getBoolean("integration.residence.whitelist-mode");
+ this.createLimits = plugin.getConfig().getStringList("integration.residence.create");
+ this.tradeLimits = plugin.getConfig().getStringList("integration.residence.trade");
}
@Override
diff --git a/src/main/java/org/maxgamer/quickshop/integration/superiorskyblock/SuperiorSkyblock2Integration.java b/src/main/java/org/maxgamer/quickshop/integration/superiorskyblock/SuperiorSkyblock2Integration.java
index 130bc1cd6d..c977371cad 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/superiorskyblock/SuperiorSkyblock2Integration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/superiorskyblock/SuperiorSkyblock2Integration.java
@@ -55,8 +55,8 @@ public SuperiorSkyblock2Integration(QuickShop plugin) {
}
private void init() {
- onlyOwnerCanCreateShop = plugin.getConfiguration().getBoolean("integration.superiorskyblock.owner-create-only");
- deleteShopOnMemberLeave = plugin.getConfiguration().getBoolean("integration.superiorskyblock.delete-shop-on-member-leave");
+ onlyOwnerCanCreateShop = plugin.getConfig().getBoolean("integration.superiorskyblock.owner-create-only");
+ deleteShopOnMemberLeave = plugin.getConfig().getBoolean("integration.superiorskyblock.delete-shop-on-member-leave");
}
/**
@@ -112,7 +112,7 @@ public boolean canTradeShopHere(@NotNull Player player, @NotNull Location locati
*/
@Override
public void load() {
- if (plugin.getConfiguration().getBoolean("integration.superiorskyblock.delete-shop-on-member-leave")) {
+ if (plugin.getConfig().getBoolean("integration.superiorskyblock.delete-shop-on-member-leave")) {
Bukkit.getPluginManager().registerEvents(this, plugin);
}
}
diff --git a/src/main/java/org/maxgamer/quickshop/integration/towny/TownyIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/towny/TownyIntegration.java
index 52fab60bac..d2b3c712a3 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/towny/TownyIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/towny/TownyIntegration.java
@@ -79,13 +79,13 @@ public TownyIntegration(QuickShop plugin) {
}
private void init() {
- createFlags = TownyFlags.deserialize(plugin.getConfiguration().getStringList("integration.towny.create"));
- tradeFlags = TownyFlags.deserialize(plugin.getConfiguration().getStringList("integration.towny.trade"));
- ignoreDisabledWorlds = plugin.getConfiguration().getBoolean("integration.towny.ignore-disabled-worlds");
- deleteShopOnLeave = plugin.getConfiguration().getBoolean("integration.towny.delete-shop-on-resident-leave");
- deleteShopOnPlotClear = plugin.getConfiguration().getBoolean("integration.towny.delete-shop-on-plot-clear");
- deleteShopOnPlotDestroy = plugin.getConfiguration().getBoolean("integration.towny.delete-shop-on-plot-destroy");
- whiteList = plugin.getConfiguration().getBoolean("integration.towny.whitelist-mode");
+ createFlags = TownyFlags.deserialize(plugin.getConfig().getStringList("integration.towny.create"));
+ tradeFlags = TownyFlags.deserialize(plugin.getConfig().getStringList("integration.towny.trade"));
+ ignoreDisabledWorlds = plugin.getConfig().getBoolean("integration.towny.ignore-disabled-worlds");
+ deleteShopOnLeave = plugin.getConfig().getBoolean("integration.towny.delete-shop-on-resident-leave");
+ deleteShopOnPlotClear = plugin.getConfig().getBoolean("integration.towny.delete-shop-on-plot-clear");
+ deleteShopOnPlotDestroy = plugin.getConfig().getBoolean("integration.towny.delete-shop-on-plot-destroy");
+ whiteList = plugin.getConfig().getBoolean("integration.towny.whitelist-mode");
}
@Override
diff --git a/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java
index dbe0497178..1161abcb2c 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java
@@ -90,15 +90,15 @@ public void load() {
}
private void init() {
- this.whiteList = plugin.getConfiguration().getBoolean("integration.worldguard.whitelist-mode");
- this.anyOwner = plugin.getConfiguration().getBoolean("integration.worldguard.any-owner");
- respectGlobalRegion = plugin.getConfiguration().getBoolean("integration.worldguard.respect-global-region");
+ this.whiteList = plugin.getConfig().getBoolean("integration.worldguard.whitelist-mode");
+ this.anyOwner = plugin.getConfig().getBoolean("integration.worldguard.any-owner");
+ respectGlobalRegion = plugin.getConfig().getBoolean("integration.worldguard.respect-global-region");
createFlags =
WorldGuardFlags.deserialize(
- plugin.getConfiguration().getStringList("integration.worldguard.create"));
+ plugin.getConfig().getStringList("integration.worldguard.create"));
tradeFlags =
WorldGuardFlags.deserialize(
- plugin.getConfiguration().getStringList("integration.worldguard.trade"));
+ plugin.getConfig().getStringList("integration.worldguard.trade"));
}
@Override
diff --git a/src/main/java/org/maxgamer/quickshop/listener/BlockListener.java b/src/main/java/org/maxgamer/quickshop/listener/BlockListener.java
index 1617e0a8f9..8bda493272 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/BlockListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/BlockListener.java
@@ -63,7 +63,7 @@ public BlockListener(@NotNull final QuickShop plugin, @Nullable final Cache cach
}
private void init() {
- this.update_sign_when_inventory_moving = super.getPlugin().getConfiguration().getOrDefault("shop.update-sign-when-inventory-moving", true);
+ this.update_sign_when_inventory_moving = super.getPlugin().getConfig().getBoolean("shop.update-sign-when-inventory-moving", true);
}
/*
@@ -83,7 +83,7 @@ public void onBreak(BlockBreakEvent e) {
if (p.getGameMode() == GameMode.CREATIVE && !p.getUniqueId().equals(shop.getOwner())) {
// Check SuperTool
if (p.getInventory().getItemInMainHand().getType() == Material.GOLDEN_AXE) {
- if (getPlugin().getConfiguration().getBoolean("shop.disable-super-tool")) {
+ if (getPlugin().getConfig().getBoolean("shop.disable-super-tool")) {
e.setCancelled(true);
plugin.text().of(p, "supertool-is-disabled").send();
return;
@@ -109,8 +109,8 @@ public void onBreak(BlockBreakEvent e) {
BlockState state = PaperLib.getBlockState(b, false).getState();
if (state instanceof Sign) {
Sign sign = (Sign) state;
- if (sign.getLine(0).equals(super.getPlugin().getConfiguration().getString("lockette.private"))
- || sign.getLine(0).equals(super.getPlugin().getConfiguration().getString("lockette.more_users"))) {
+ if (sign.getLine(0).equals(super.getPlugin().getConfig().getString("lockette.private"))
+ || sign.getLine(0).equals(super.getPlugin().getConfig().getString("lockette.more_users"))) {
// Ignore break lockette sign
return;
}
@@ -126,7 +126,7 @@ public void onBreak(BlockBreakEvent e) {
if (p.getGameMode() == GameMode.CREATIVE && !p.getUniqueId().equals(shop.getOwner())) {
// Check SuperTool
if (p.getInventory().getItemInMainHand().getType() == Material.GOLDEN_AXE) {
- if (getPlugin().getConfiguration().getBoolean("shop.disable-super-tool")) {
+ if (getPlugin().getConfig().getBoolean("shop.disable-super-tool")) {
e.setCancelled(true);
plugin.text().of(p, "supertool-is-disabled").send();
return;
@@ -142,7 +142,7 @@ public void onBreak(BlockBreakEvent e) {
return;
}
//Allow Shop owner break the shop sign(for sign replacement)
- if (getPlugin().getConfiguration().getBoolean("shop.allow-owner-break-shop-sign") && p.getUniqueId().equals(shop.getOwner())) {
+ if (getPlugin().getConfig().getBoolean("shop.allow-owner-break-shop-sign") && p.getUniqueId().equals(shop.getOwner())) {
return;
}
Util.debugLog("Player cannot break the shop infomation sign.");
diff --git a/src/main/java/org/maxgamer/quickshop/listener/ChatListener.java b/src/main/java/org/maxgamer/quickshop/listener/ChatListener.java
index 0ce3a42c2c..4998b630f4 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/ChatListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/ChatListener.java
@@ -38,7 +38,7 @@ public ChatListener(QuickShop plugin) {
@EventHandler(priority = EventPriority.LOWEST)
public void onChat(AsyncPlayerChatEvent e) {
- if (e.isCancelled() && plugin.getConfiguration().getBoolean("shop.ignore-cancel-chat-event")) {
+ if (e.isCancelled() && plugin.getConfig().getBoolean("shop.ignore-cancel-chat-event")) {
Util.debugLog("Ignored a chat event (Cancelled by another plugin, you can force process by turn on ignore-cancel-chat-event)");
return;
}
diff --git a/src/main/java/org/maxgamer/quickshop/listener/DisplayProtectionListener.java b/src/main/java/org/maxgamer/quickshop/listener/DisplayProtectionListener.java
index 28d5424f47..86408fecd2 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/DisplayProtectionListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/DisplayProtectionListener.java
@@ -50,7 +50,7 @@ public class DisplayProtectionListener extends AbstractProtectionListener {
public DisplayProtectionListener(QuickShop plugin, Cache cache) {
super(plugin, cache);
- useEnhanceProtection = plugin.getConfiguration().getBoolean("shop.enchance-display-protect");
+ useEnhanceProtection = plugin.getConfig().getBoolean("shop.enchance-display-protect");
if (useEnhanceProtection) {
plugin.getServer().getPluginManager().registerEvents(new EnhanceDisplayProtectionListener(plugin, cache), plugin);
}
@@ -63,7 +63,7 @@ public DisplayProtectionListener(QuickShop plugin, Cache cache) {
*/
@Override
public ReloadResult reloadModule() {
- if (useEnhanceProtection == plugin.getConfiguration().getBoolean("shop.enchance-display-protect")) {
+ if (useEnhanceProtection == plugin.getConfig().getBoolean("shop.enchance-display-protect")) {
return ReloadResult.builder().status(ReloadStatus.SUCCESS).build();
}
return ReloadResult.builder().status(ReloadStatus.REQUIRE_RESTART).build();
@@ -71,7 +71,7 @@ public ReloadResult reloadModule() {
private void sendAlert(@NotNull String msg) {
- if (!plugin.getConfiguration().getBoolean("send-display-item-protection-alert")) {
+ if (!plugin.getConfig().getBoolean("send-display-item-protection-alert")) {
return;
}
MsgUtil.sendGlobalAlert(msg);
diff --git a/src/main/java/org/maxgamer/quickshop/listener/EnhanceDisplayProtectionListener.java b/src/main/java/org/maxgamer/quickshop/listener/EnhanceDisplayProtectionListener.java
index 9c32f5b701..7496e2cd5f 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/EnhanceDisplayProtectionListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/EnhanceDisplayProtectionListener.java
@@ -56,7 +56,7 @@ public EnhanceDisplayProtectionListener(QuickShop plugin, Cache cache) {
}
private void sendAlert(@NotNull String msg) {
- if (!plugin.getConfiguration().getBoolean("send-display-item-protection-alert")) {
+ if (!plugin.getConfig().getBoolean("send-display-item-protection-alert")) {
return;
}
MsgUtil.sendGlobalAlert(msg);
diff --git a/src/main/java/org/maxgamer/quickshop/listener/InternalListener.java b/src/main/java/org/maxgamer/quickshop/listener/InternalListener.java
index 349557f347..ce2b39a425 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/InternalListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/InternalListener.java
@@ -49,8 +49,8 @@ public InternalListener(QuickShop plugin) {
}
private void readConfig() {
- this.loggingBalance = plugin.getConfiguration().getBoolean("logging.log-balance");
- this.loggingAction = plugin.getConfiguration().getBoolean("logging.log-actions");
+ this.loggingBalance = plugin.getConfig().getBoolean("logging.log-balance");
+ this.loggingAction = plugin.getConfig().getBoolean("logging.log-actions");
}
public boolean isForbidden(@NotNull Material shopMaterial, @NotNull Material itemMaterial) {
diff --git a/src/main/java/org/maxgamer/quickshop/listener/LockListener.java b/src/main/java/org/maxgamer/quickshop/listener/LockListener.java
index cf451ca074..ee1b4251ff 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/LockListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/LockListener.java
@@ -47,7 +47,7 @@ public LockListener(@NotNull final QuickShop plugin, @Nullable final Cache cache
@Override
public void register() {
- if (plugin.getConfiguration().getBoolean("shop.lock")) {
+ if (plugin.getConfig().getBoolean("shop.lock")) {
super.register();
} else {
super.unregister();
@@ -74,8 +74,8 @@ public void onBreak(BlockBreakEvent e) {
BlockState state = PaperLib.getBlockState(b, false).getState();
if (state instanceof Sign) {
final Sign sign = (Sign) state;
- if (sign.getLine(0).equals(super.getPlugin().getConfiguration().getString("lockette.private"))
- || sign.getLine(0).equals(super.getPlugin().getConfiguration().getString("lockette.more_users"))) {
+ if (sign.getLine(0).equals(super.getPlugin().getConfig().getString("lockette.private"))
+ || sign.getLine(0).equals(super.getPlugin().getConfig().getString("lockette.more_users"))) {
// Ignore break lockette sign
Util.debugLog("Skipped a dead-lock shop sign.(Lockette or other sign-lock plugin)");
return;
@@ -100,8 +100,8 @@ public void onBreak(BlockBreakEvent e) {
if (b instanceof Sign) {
final Sign sign = (Sign) b;
- if (sign.getLine(0).equals(super.getPlugin().getConfiguration().getString("lockette.private"))
- || sign.getLine(0).equals(super.getPlugin().getConfiguration().getString("lockette.more_users"))) {
+ if (sign.getLine(0).equals(super.getPlugin().getConfig().getString("lockette.private"))
+ || sign.getLine(0).equals(super.getPlugin().getConfig().getString("lockette.more_users"))) {
// Ignore break lockette sign
return;
}
diff --git a/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java b/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
index 8610faa590..f1b4e68c7a 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
@@ -61,7 +61,7 @@ public class PlayerListener extends AbstractQSListener {
public PlayerListener(QuickShop plugin) {
super(plugin);
- swapBehavior = plugin.getConfiguration().getBoolean("shop.interact.swap-click-behavior");
+ swapBehavior = plugin.getConfig().getBoolean("shop.interact.swap-click-behavior");
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
@@ -121,7 +121,7 @@ public void onAdventureClick(PlayerAnimationEvent event) {
}
private void playClickSound(@NotNull Player player) {
- if (plugin.getConfiguration().getBoolean("effect.sound.onclick")) {
+ if (plugin.getConfig().getBoolean("effect.sound.onclick")) {
player.playSound(player.getLocation(), Sound.BLOCK_DISPENSER_FAIL, 80.f, 1.0f);
}
}
@@ -239,7 +239,7 @@ else if (e.useInteractedBlock() == Event.Result.ALLOW
&& p.getGameMode() != GameMode.CREATIVE) {
if (e.useInteractedBlock() == Event.Result.DENY
|| !InteractUtil.check(InteractUtil.Action.CREATE, p.isSneaking())
- || plugin.getConfiguration().getBoolean("shop.disable-quick-create")
+ || plugin.getConfig().getBoolean("shop.disable-quick-create")
|| !plugin.getShopManager().canBuildShop(p, b, e.getBlockFace())) {
// As of the new checking system, most plugins will tell the
// player why they can't create a shop there.
@@ -316,7 +316,7 @@ private int getPlayerCanSell(Shop shop, double ownerBalance, double price, Inven
items = Math.min(items, shop.getRemainingSpace());
// Amount check player selling item total cost and the shop owner's balance
items = Math.min(items, ownerCanAfford);
- } else if (plugin.getConfiguration().getBoolean("shop.pay-unlimited-shop-owners")) {
+ } else if (plugin.getConfig().getBoolean("shop.pay-unlimited-shop-owners")) {
// even if the shop is unlimited, the config option pay-unlimited-shop-owners is set to
// true,
// the unlimited shop owner should have enough money.
@@ -358,7 +358,7 @@ public void onInventoryClose(InventoryCloseEvent e) {
public void onJoin(PlayerJoinEvent e) {
Util.debugLog("Player " + e.getPlayer().getName() + " using locale " + e.getPlayer().getLocale() + ": " + plugin.text().of(e.getPlayer(), "file-test").forLocale());
// Notify the player any messages they were sent
- if (plugin.getConfiguration().getBoolean("shop.auto-fetch-shop-messages")) {
+ if (plugin.getConfig().getBoolean("shop.auto-fetch-shop-messages")) {
MsgUtil.flush(e.getPlayer());
}
}
diff --git a/src/main/java/org/maxgamer/quickshop/listener/PluginListener.java b/src/main/java/org/maxgamer/quickshop/listener/PluginListener.java
index 8f1538f83d..4dc842e0bf 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/PluginListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/PluginListener.java
@@ -54,7 +54,7 @@ private void init() {
@EventHandler(priority = EventPriority.MONITOR)
public void onPluginDisabled(PluginDisableEvent event) {
String pluginName = event.getPlugin().getName();
- if (integrationHelper.isRegistered(pluginName) && plugin.getConfiguration().getBoolean("integration." + pluginName.toLowerCase() + ".enable")) {
+ if (integrationHelper.isRegistered(pluginName) && plugin.getConfig().getBoolean("integration." + pluginName.toLowerCase() + ".enable")) {
IntegratedPlugin integratedPlugin = integrationHelper.getIntegrationMap().get(pluginName);
if (integratedPlugin != null) {
Util.debugLog("[Hot Load] Calling for unloading " + integratedPlugin.getName());
@@ -70,7 +70,7 @@ public void onPluginDisabled(PluginDisableEvent event) {
@EventHandler(priority = EventPriority.MONITOR)
public void onPluginEnabled(PluginEnableEvent event) {
String pluginName = event.getPlugin().getName();
- if (integrationHelper.isRegistered(pluginName) && plugin.getConfiguration().getBoolean("integration." + pluginName.toLowerCase() + ".enable")) {
+ if (integrationHelper.isRegistered(pluginName) && plugin.getConfig().getBoolean("integration." + pluginName.toLowerCase() + ".enable")) {
integrationHelper.register(pluginName);
IntegratedPlugin integratedPlugin = integrationHelper.getIntegrationMap().get(pluginName);
if (integratedPlugin != null) {
diff --git a/src/main/java/org/maxgamer/quickshop/listener/ShopProtectionListener.java b/src/main/java/org/maxgamer/quickshop/listener/ShopProtectionListener.java
index 0be6c80af4..dbf51a15e8 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/ShopProtectionListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/ShopProtectionListener.java
@@ -64,8 +64,8 @@ public ShopProtectionListener(@NotNull QuickShop plugin, @Nullable Cache cache)
}
private void init() {
- this.sendProtectionAlert = plugin.getConfiguration().getOrDefault("send-shop-protection-alert", false);
- useEnhanceProtection = plugin.getConfiguration().getBoolean("shop.enchance-shop-protect");
+ this.sendProtectionAlert = plugin.getConfig().getBoolean("send-shop-protection-alert", false);
+ useEnhanceProtection = plugin.getConfig().getBoolean("shop.enchance-shop-protect");
scanAndFixPaperListener();
}
@@ -81,7 +81,7 @@ public void onWorldLoad(WorldLoadEvent event) {
}
public void scanAndFixPaperListener() {
- if (!plugin.getConfiguration().getBoolean("protect.hopper")) {
+ if (!plugin.getConfig().getBoolean("protect.hopper")) {
return;
}
if (!Util.isClassAvailable("com.destroystokyo.paper.PaperWorldConfig")) {
@@ -139,7 +139,7 @@ public void onBlockExplode(BlockExplodeEvent e) {
shop = getShopNextTo(b.getLocation());
}
if (shop != null) {
- if (plugin.getConfiguration().getBoolean("protect.explode")) {
+ if (plugin.getConfig().getBoolean("protect.explode")) {
e.setCancelled(true);
} else {
plugin.logEvent(new ShopRemoveLog(Util.getNilUniqueId(), "BlockBreak(explode)", shop.saveToInfoStorage()));
@@ -233,7 +233,7 @@ public void onExplode(EntityExplodeEvent e) {
if (shop == null) {
continue;
}
- if (plugin.getConfiguration().getBoolean("protect.explode")) {
+ if (plugin.getConfig().getBoolean("protect.explode")) {
e.setCancelled(true);
} else {
plugin.logEvent(new ShopRemoveLog(Util.getNilUniqueId(), "BlockBreak(explode)", shop.saveToInfoStorage()));
@@ -244,7 +244,7 @@ public void onExplode(EntityExplodeEvent e) {
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH)
public void onInventoryMove(InventoryMoveItemEvent event) {
- if (!plugin.getConfiguration().getBoolean("protect.hopper")) {
+ if (!plugin.getConfig().getBoolean("protect.hopper")) {
return;
}
final Location loc = event.getSource().getLocation();
@@ -294,7 +294,7 @@ public void onMobChangeBlock(EntityChangeBlockEvent event) {
return;
}
- if (plugin.getConfiguration().getBoolean("protect.entity")) {
+ if (plugin.getConfig().getBoolean("protect.entity")) {
event.setCancelled(true);
return;
}
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index 4a3f9e9634..93742fc95d 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -482,8 +482,8 @@ public void delete(boolean memoryOnly) {
}
// Delete it from the database
// Refund if necessary
- if (plugin.getConfiguration().getBoolean("shop.refund")) {
- plugin.getEconomy().deposit(this.getOwner(), plugin.getConfiguration().getDouble("shop.cost"),
+ if (plugin.getConfig().getBoolean("shop.refund")) {
+ plugin.getEconomy().deposit(this.getOwner(), plugin.getConfig().getDouble("shop.cost"),
Objects.requireNonNull(getLocation().getWorld()), getCurrency());
}
plugin.getShopManager().removeShop(this);
@@ -738,7 +738,7 @@ public List getSignText(@NotNull String locale) {
lines.add(new ComponentPackage(new ComponentBuilder("").appendLegacy(SHOP_SIGN_PREFIX).reset().color(ChatColor.RESET).appendLegacy(line2).create()));
//line 3
- if (plugin.getConfiguration().getBoolean("shop.force-use-item-original-name") || !this.getItem().hasItemMeta() || !this.getItem().getItemMeta().hasDisplayName()) {
+ if (plugin.getConfig().getBoolean("shop.force-use-item-original-name") || !this.getItem().hasItemMeta() || !this.getItem().getItemMeta().hasDisplayName()) {
BaseComponent[] left = TextComponent.fromLegacyText(plugin.text().of("signs.item-left").forLocale());
BaseComponent[] right = TextComponent.fromLegacyText(plugin.text().of("signs.item-right").forLocale());
if (plugin.getNbtapi() == null) {
@@ -808,7 +808,7 @@ public void setSignText(@NotNull List lines) {
}
}
if (plugin.getGameVersion().isSignGlowingSupport()) {
- boolean isGlowing = plugin.getConfiguration().getBoolean("shop.sign-glowing");
+ boolean isGlowing = plugin.getConfig().getBoolean("shop.sign-glowing");
sign.setGlowingText(isGlowing);
}
sign.update(true);
diff --git a/src/main/java/org/maxgamer/quickshop/shop/RealDisplayItem.java b/src/main/java/org/maxgamer/quickshop/shop/RealDisplayItem.java
index fef6ca5fbc..53cf2de03c 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/RealDisplayItem.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/RealDisplayItem.java
@@ -203,7 +203,7 @@ public void safeGuard(@NotNull Entity entity) {
Item item = (Item) entity;
// Set item protect in the armorstand's hand
- if (PLUGIN.getConfiguration().getBoolean("shop.display-item-use-name")) {
+ if (PLUGIN.getConfig().getBoolean("shop.display-item-use-name")) {
item.setCustomName(Util.getItemStackName(this.originalItemStack));
item.setCustomNameVisible(true);
} else {
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ShopLoader.java b/src/main/java/org/maxgamer/quickshop/shop/ShopLoader.java
index cf21fe4740..4f5718ad9b 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ShopLoader.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ShopLoader.java
@@ -98,7 +98,7 @@ public void loadShops(@Nullable String worldName) {
try (WarpedResultSet warpRS = plugin.getDatabaseHelper().selectAllShops(); ResultSet rs = warpRS.getResultSet()) {
Timer timer = new Timer();
timer.start();
- boolean deleteCorruptShops = plugin.getConfiguration().getOrDefault("debug.delete-corrupt-shops", false);
+ boolean deleteCorruptShops = plugin.getConfig().getBoolean("debug.delete-corrupt-shops", false);
this.plugin.getLogger().info("Loading shops from the database...");
while (rs.next()) {
++total;
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java b/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java
index 263cb0ca47..12f4289e1c 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java
@@ -40,7 +40,7 @@ public ShopPurger(QuickShop plugin) {
}
public void purge() {
- if (!plugin.getConfiguration().getBoolean("purge.enabled")) {
+ if (!plugin.getConfig().getBoolean("purge.enabled")) {
plugin.getLogger().info("[Shop Purger] Purge not enabled!");
return;
}
@@ -58,10 +58,10 @@ public void run() {
executing = true;
Util.debugLog("[Shop Purger] Scanning and removing shops");
List pendingRemovalShops = new ArrayList<>();
- int days = plugin.getConfiguration().getOrDefault("purge.days", 360);
- boolean deleteBanned = plugin.getConfiguration().getBoolean("purge.banned");
- boolean skipOp = plugin.getConfiguration().getBoolean("purge.skip-op");
- boolean returnCreationFee = plugin.getConfiguration().getBoolean("purge.return-create-fee");
+ int days = plugin.getConfig().getInt("purge.days", 360);
+ boolean deleteBanned = plugin.getConfig().getBoolean("purge.banned");
+ boolean skipOp = plugin.getConfig().getBoolean("purge.skip-op");
+ boolean returnCreationFee = plugin.getConfig().getBoolean("purge.return-create-fee");
for (Shop shop : plugin.getShopManager().getAllShops()) {
OfflinePlayer player = Bukkit.getOfflinePlayer(shop.getOwner());
if (!player.hasPlayedBefore()) {
@@ -97,7 +97,7 @@ public void run() {
if (returnCreationFee) {
EconomyTransaction transaction =
EconomyTransaction.builder()
- .amount(plugin.getConfiguration().getDouble("shop.cost"))
+ .amount(plugin.getConfig().getDouble("shop.cost"))
.allowLoan(false)
.core(QuickShop.getInstance().getEconomy())
.currency(shop.getCurrency())
diff --git a/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java b/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java
index 45b539eb18..6dfec7d876 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java
@@ -106,7 +106,7 @@ public SimpleShopManager(@NotNull QuickShop plugin) {
private void init() {
Util.debugLog("Loading caching tax account...");
- String taxAccount = plugin.getConfiguration().getOrDefault("tax-account", "tax");
+ String taxAccount = plugin.getConfig().getString("tax-account", "tax");
if (!taxAccount.isEmpty()) {
if (Util.isUUID(taxAccount)) {
this.cacheTaxAccount = new Trader(taxAccount,
@@ -119,19 +119,19 @@ private void init() {
// disable tax account
cacheTaxAccount = null;
}
- String uAccount = plugin.getConfiguration().getOrDefault("unlimited-shop-owner-change-account", "quickshop");
+ String uAccount = plugin.getConfig().getString("unlimited-shop-owner-change-account", "quickshop");
if (Util.isUUID(uAccount)) {
cacheUnlimitedShopAccount = new Trader(uAccount, Bukkit.getOfflinePlayer(UUID.fromString(uAccount)));
} else {
cacheUnlimitedShopAccount = new Trader(uAccount, Bukkit.getOfflinePlayer(uAccount));
}
this.priceLimiter = new SimplePriceLimiter(
- plugin.getConfiguration().getDouble("shop.minimum-price"),
- plugin.getConfiguration().getInt("shop.maximum-price"),
- plugin.getConfiguration().getBoolean("shop.allow-free-shop"),
- plugin.getConfiguration().getBoolean("whole-number-prices-only"));
- this.useOldCanBuildAlgorithm = plugin.getConfiguration().getBoolean("limits.old-algorithm");
- this.autoSign = plugin.getConfiguration().getBoolean("shop.auto-sign");
+ plugin.getConfig().getDouble("shop.minimum-price"),
+ plugin.getConfig().getInt("shop.maximum-price"),
+ plugin.getConfig().getBoolean("shop.allow-free-shop"),
+ plugin.getConfig().getBoolean("whole-number-prices-only"));
+ this.useOldCanBuildAlgorithm = plugin.getConfig().getBoolean("limits.old-algorithm");
+ this.autoSign = plugin.getConfig().getBoolean("shop.auto-sign");
}
@Override
@@ -293,7 +293,7 @@ public void createShop(@NotNull Shop shop, @NotNull Info info) {
if (info.getSignBlock().getType().isAir() || info.getSignBlock().getType() == Material.WATER) {
this.processWaterLoggedSign(shop.getLocation().getBlock(), info.getSignBlock());
} else {
- if (!plugin.getConfiguration().getBoolean("shop.allow-shop-without-space-for-sign")) {
+ if (!plugin.getConfig().getBoolean("shop.allow-shop-without-space-for-sign")) {
plugin.text().of(player, "failed-to-put-sign").send();
Util.debugLog("Sign cannot placed cause no enough space(Not air block)");
return;
@@ -688,7 +688,7 @@ public void actionBuy(
.world(shop.getLocation().getWorld())
.to(buyer);
if (!shop.isUnlimited()
- || (plugin.getConfiguration().getBoolean("shop.pay-unlimited-shop-owners")
+ || (plugin.getConfig().getBoolean("shop.pay-unlimited-shop-owners")
&& shop.isUnlimited())) {
transaction = builder.from(shop.getOwner()).build();
} else {
@@ -718,7 +718,7 @@ public void actionBuy(
MsgUtil.TransactionMessage transactionMessage = new MsgUtil.TransactionMessage(msg, Util.serialize(shop.getItem()), null);
- if (plugin.getConfiguration().getBoolean("shop.sending-stock-message-to-staffs")) {
+ if (plugin.getConfig().getBoolean("shop.sending-stock-message-to-staffs")) {
for (UUID staff : shop.getModerator().getStaffs()) {
MsgUtil.send(shop, staff, transactionMessage);
}
@@ -732,7 +732,7 @@ public void actionBuy(
Integer.toString(shop.getLocation().getBlockZ())).forLocale();
transactionMessage = new MsgUtil.TransactionMessage(msg, Util.serialize(shop.getItem()), null);
- if (plugin.getConfiguration().getBoolean("shop.sending-stock-message-to-staffs")) {
+ if (plugin.getConfig().getBoolean("shop.sending-stock-message-to-staffs")) {
for (UUID staff : shop.getModerator().getStaffs()) {
MsgUtil.send(shop, staff, transactionMessage);
}
@@ -767,7 +767,7 @@ public double getTax(@NotNull Shop shop, @NotNull Player p) {
@Override
public double getTax(@NotNull Shop shop, @NotNull UUID p) {
Util.ensureThread(false);
- double tax = plugin.getConfiguration().getDouble("tax");
+ double tax = plugin.getConfig().getDouble("tax");
Player player = plugin.getServer().getPlayer(p);
if (player != null) {
if (QuickShop.getPermissionManager().hasPermission(player, "quickshop.tax")) {
@@ -839,7 +839,7 @@ public void actionCreate(@NotNull Player p, Info info, @NotNull String message)
if (autoSign) {
if (info.getSignBlock() == null) {
- if (!plugin.getConfiguration().getBoolean("shop.allow-shop-without-space-for-sign")) {
+ if (!plugin.getConfig().getBoolean("shop.allow-shop-without-space-for-sign")) {
plugin.text().of(p, "failed-to-put-sign").send();
return;
}
@@ -847,7 +847,7 @@ public void actionCreate(@NotNull Player p, Info info, @NotNull String message)
Material signType = info.getSignBlock().getType();
if (signType != Material.WATER
&& !signType.isAir()
- && !plugin.getConfiguration().getBoolean("shop.allow-shop-without-space-for-sign")) {
+ && !plugin.getConfig().getBoolean("shop.allow-shop-without-space-for-sign")) {
plugin.text().of(p, "failed-to-put-sign").send();
return;
}
@@ -866,8 +866,8 @@ public void actionCreate(@NotNull Player p, Info info, @NotNull String message)
.replace(",", ".");
String[] processedDouble = strFormat.split("\\.");
if (processedDouble.length > 1) {
- int maximumDigitsLimit = plugin.getConfiguration()
- .getOrDefault("maximum-digits-in-price", -1);
+ int maximumDigitsLimit = plugin.getConfig()
+ .getInt("maximum-digits-in-price", -1);
if (processedDouble[1].length() > maximumDigitsLimit
&& maximumDigitsLimit != -1) {
plugin.text().of(p, "digits-reach-the-limit", String.valueOf(maximumDigitsLimit)).send();
@@ -881,7 +881,7 @@ public void actionCreate(@NotNull Player p, Info info, @NotNull String message)
}
// Price limit checking
- boolean decFormat = plugin.getConfiguration().getBoolean("use-decimal-format");
+ boolean decFormat = plugin.getConfig().getBoolean("use-decimal-format");
PriceLimiterCheckResult priceCheckResult = this.priceLimiter.check(info.getItem(), price);
@@ -947,7 +947,7 @@ public void actionCreate(@NotNull Player p, Info info, @NotNull String message)
// This must be called after the event has been called.
// Else, if the event is cancelled, they won't get their
// money back.
- double createCost = plugin.getConfiguration().getDouble("shop.cost");
+ double createCost = plugin.getConfig().getDouble("shop.cost");
if (QuickShop.getPermissionManager().hasPermission(p, "quickshop.bypasscreatefee")) {
createCost = 0;
}
@@ -978,7 +978,7 @@ public void actionCreate(@NotNull Player p, Info info, @NotNull String message)
// The shop about successfully created
createShop(shop, info);
- if (!plugin.getConfiguration().getBoolean("shop.lock")) {
+ if (!plugin.getConfig().getBoolean("shop.lock")) {
plugin.text().of(p, "shops-arent-locked").send();
}
@@ -1059,7 +1059,7 @@ public void actionSell(
taxAccount = this.cacheTaxAccount;
}
EconomyTransaction.EconomyTransactionBuilder builder = EconomyTransaction.builder()
- .allowLoan(plugin.getConfiguration().getOrDefault("shop.allow-economy-loan", false))
+ .allowLoan(plugin.getConfig().getBoolean("shop.allow-economy-loan", false))
.core(eco)
.from(seller)
.amount(total)
@@ -1068,7 +1068,7 @@ public void actionSell(
.world(shop.getLocation().getWorld())
.currency(shop.getCurrency());
if (!shop.isUnlimited()
- || (plugin.getConfiguration().getBoolean("shop.pay-unlimited-shop-owners")
+ || (plugin.getConfig().getBoolean("shop.pay-unlimited-shop-owners")
&& shop.isUnlimited())) {
transaction = builder.to(shop.getOwner()).build();
} else {
@@ -1093,7 +1093,7 @@ public void actionSell(
String msg;
// Notify the shop owner //TODO: move to a standalone method
Player player = plugin.getServer().getPlayer(seller);
- if (plugin.getConfiguration().getBoolean("show-tax")) {
+ if (plugin.getConfig().getBoolean("show-tax")) {
msg = plugin.text().of(seller, "player-bought-from-your-store-tax",
player != null ? player.getName() : seller.toString(),
Integer.toString(amount * shop.getItem().getAmount()),
@@ -1111,7 +1111,7 @@ public void actionSell(
MsgUtil.TransactionMessage transactionMessage = new MsgUtil.TransactionMessage(msg, Util.serialize(shop.getItem()), null);
MsgUtil.send(shop, shop.getOwner(), transactionMessage);
- if (plugin.getConfiguration().getBoolean("shop.sending-stock-message-to-staffs")) {
+ if (plugin.getConfig().getBoolean("shop.sending-stock-message-to-staffs")) {
for (UUID staff : shop.getModerator().getStaffs()) {
MsgUtil.send(shop, staff, transactionMessage);
}
@@ -1126,7 +1126,7 @@ public void actionSell(
transactionMessage = new MsgUtil.TransactionMessage(msg, Util.serialize(shop.getItem()), null);
MsgUtil.send(shop, shop.getOwner(), transactionMessage);
- if (plugin.getConfiguration().getBoolean("shop.sending-stock-message-to-staffs")) {
+ if (plugin.getConfig().getBoolean("shop.sending-stock-message-to-staffs")) {
for (UUID staff : shop.getModerator().getStaffs()) {
MsgUtil.send(shop, staff, transactionMessage);
}
@@ -1183,8 +1183,8 @@ public void sendSellSuccess(@NotNull UUID seller, @NotNull Shop shop, int amount
Integer.toString(amount),
MsgUtil.getTranslateText(shop.getItem()),
format(amount * shop.getPrice(), shop)).forLocale());
- if (plugin.getConfiguration().getBoolean("show-tax")) {
- double tax = plugin.getConfiguration().getDouble("tax");
+ if (plugin.getConfig().getBoolean("show-tax")) {
+ double tax = plugin.getConfig().getDouble("tax");
double total = amount * shop.getPrice();
if (tax != 0) {
if (!seller.equals(shop.getOwner())) {
@@ -1306,7 +1306,7 @@ private void actionTrade(@NotNull Player p, Info info, @NotNull String message)
plugin.text().of(p, "chest-was-removed").send();
return;
}
- if (p.getGameMode() == GameMode.CREATIVE && plugin.getConfiguration().getBoolean("shop.disable-creative-mode-trading")) {
+ if (p.getGameMode() == GameMode.CREATIVE && plugin.getConfig().getBoolean("shop.disable-creative-mode-trading")) {
plugin.text().of(p, "trading-in-creative-mode-is-disabled").send();
return;
}
@@ -1320,7 +1320,7 @@ private void actionTrade(@NotNull Player p, Info info, @NotNull String message)
amount = Integer.parseInt(message);
} else {
if (message.equalsIgnoreCase(
- plugin.getConfiguration().getOrDefault("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());
int invHaveItems = Util.countItems(p.getInventory(), shop.getItem());
@@ -1344,7 +1344,7 @@ private void actionTrade(@NotNull Player p, Info info, @NotNull String message)
// even if the shop is unlimited, the config option pay-unlimited-shop-owners is set to
// true,
// the unlimited shop owner should have enough money.
- if (plugin.getConfiguration().getBoolean("shop.pay-unlimited-shop-owners")) {
+ if (plugin.getConfig().getBoolean("shop.pay-unlimited-shop-owners")) {
amount = Math.min(amount, ownerCanAfford);
}
}
@@ -1357,7 +1357,7 @@ private void actionTrade(@NotNull Player p, Info info, @NotNull String message)
}
if (ownerCanAfford == 0
&& (!shop.isUnlimited()
- || plugin.getConfiguration().getBoolean("shop.pay-unlimited-shop-owners"))) {
+ || 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)
plugin.text().of(p, "the-owner-cant-afford-to-buy-from-you",
@@ -1389,7 +1389,7 @@ private void actionTrade(@NotNull Player p, Info info, @NotNull String message)
if (StringUtils.isNumeric(message)) {
amount = Integer.parseInt(message);
} else {
- if (message.equalsIgnoreCase(plugin.getConfiguration().getOrDefault("shop.word-for-trade-all-items", "all"))) {
+ if (message.equalsIgnoreCase(plugin.getConfig().getString("shop.word-for-trade-all-items", "all"))) {
int shopHaveItems = shop.getRemainingStock();
int invHaveSpaces = Util.countSpace(p.getInventory(), shop.getItem());
if (!shop.isUnlimited()) {
diff --git a/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java b/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java
index 607a806c9e..8621f78412 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/VirtualDisplayItem.java
@@ -406,7 +406,7 @@ private static PacketContainer createFakeItemMetaPacket(int entityID, ItemStack
//Create a DataWatcher
WrappedDataWatcher wpw = new WrappedDataWatcher();
//https://wiki.vg/index.php?title=Entity_metadata#Entity
- if (PLUGIN.getConfiguration().getBoolean("shop.display-item-use-name")) {
+ if (PLUGIN.getConfig().getBoolean("shop.display-item-use-name")) {
String itemName;
if (QuickShop.isTesting()) {
//Env Testing
diff --git a/src/main/java/org/maxgamer/quickshop/util/InteractUtil.java b/src/main/java/org/maxgamer/quickshop/util/InteractUtil.java
index dc74bcdc7f..97bef11e66 100644
--- a/src/main/java/org/maxgamer/quickshop/util/InteractUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/InteractUtil.java
@@ -18,7 +18,8 @@
*/
package org.maxgamer.quickshop.util;
-import de.leonhard.storage.sections.FlatFileSection;
+import org.bukkit.configuration.ConfigurationSection;
+import org.bukkit.configuration.MemoryConfiguration;
import org.maxgamer.quickshop.QuickShop;
import java.util.EnumMap;
@@ -34,8 +35,11 @@ public class InteractUtil {
private static Mode mode;
private static boolean init;
- public static void init(FlatFileSection configuration) {
- mode = Mode.getMode(configuration.getOrDefault("interact-mode", 0));
+ public static void init(ConfigurationSection configuration) {
+ if (configuration == null) {
+ configuration = new MemoryConfiguration();
+ }
+ mode = Mode.getMode(configuration.getInt("interact-mode", 0));
SNEAKING_ACTION_MAPPING.put(Action.CREATE, configuration.getBoolean("sneak-to-create"));
SNEAKING_ACTION_MAPPING.put(Action.TRADE, configuration.getBoolean("sneak-to-trade"));
SNEAKING_ACTION_MAPPING.put(Action.CONTROL, configuration.getBoolean("sneak-to-control"));
@@ -51,7 +55,7 @@ public static void init(FlatFileSection configuration) {
*/
public static boolean check(Action action, boolean isSneaking) {
if (!init) {
- init(QuickShop.getInstance().getConfiguration().getSection("shop.interact"));
+ init(QuickShop.getInstance().getConfig().getConfigurationSection("shop.interact"));
}
//Hopefully some coders can read this
boolean sneakAllowed = SNEAKING_ACTION_MAPPING.get(action);
diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
index fabe8abe35..7fa3d0d39a 100644
--- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
@@ -231,7 +231,7 @@ public static void loadI18nFile() {
plugin.getLogger().info("Loading plugin translations files...");
//Load game language i18n
- loadGameLanguage(plugin.getConfiguration().getOrDefault("game-language", "default"));
+ loadGameLanguage(plugin.getConfig().getString("game-language", "default"));
}
@Unstable
@@ -377,7 +377,7 @@ public static void loadTransactionMessages() {
*/
@Deprecated
public static void send(@NotNull UUID player, @NotNull TransactionMessage transactionMessage, boolean isUnlimited) {
- if (isUnlimited && plugin.getConfiguration().getBoolean("shop.ignore-unlimited-shop-messages")) {
+ if (isUnlimited && plugin.getConfig().getBoolean("shop.ignore-unlimited-shop-messages")) {
return; // Ignore unlimited shops messages.
}
Util.debugLog(transactionMessage.getMessage());
@@ -412,7 +412,7 @@ public static void send(@NotNull UUID player, @NotNull TransactionMessage transa
* Else, if they're not online, queues them in the database.
*/
public static void send(@NotNull Shop shop, @NotNull UUID player, @NotNull TransactionMessage transactionMessage) {
- if (shop.isUnlimited() && plugin.getConfiguration().getBoolean("shop.ignore-unlimited-shop-messages")) {
+ if (shop.isUnlimited() && plugin.getConfig().getBoolean("shop.ignore-unlimited-shop-messages")) {
return; // Ignore unlimited shops messages.
}
OfflinePlayer p = Bukkit.getOfflinePlayer(player);
@@ -470,7 +470,7 @@ public static void sendControlPanelInfo(@NotNull CommandSender sender, @NotNull
plugin.text().of(sender,
"controlpanel.setowner",
shop.ownerName()
- + ((plugin.getConfiguration().getBoolean("shop.show-owner-uuid-in-controlpanel-if-op")
+ + ((plugin.getConfig().getBoolean("shop.show-owner-uuid-in-controlpanel-if-op")
&& shop.isUnlimited())
? (" (" + shop.getOwner() + ")")
: "")).forLocale(),
@@ -517,7 +517,7 @@ public static void sendControlPanelInfo(@NotNull CommandSender sender, @NotNull
String text =
MsgUtil.fillArgs(
plugin.text().of(sender, "controlpanel.price").forLocale(),
- (plugin.getConfiguration().getBoolean("use-decimal-format"))
+ (plugin.getConfig().getBoolean("use-decimal-format"))
? decimalFormat(shop.getPrice())
: Double.toString(shop.getPrice()));
String hoverText = plugin.text().of(sender, "controlpanel.price-hover").forLocale();
@@ -581,7 +581,7 @@ public static String decimalFormat(double value) {
if (decimalFormat == null) {
//lazy initialize
try {
- String format = plugin.getConfiguration().getString("decimal-format");
+ String format = plugin.getConfig().getString("decimal-format");
decimalFormat = format == null ? new DecimalFormat() : new DecimalFormat(format);
} catch (Exception e) {
QuickShop.getInstance().getLogger().log(Level.WARNING, "Error when processing decimal format, using system default: " + e.getMessage());
@@ -645,7 +645,7 @@ public static String getEnchi18n(@NotNull Enchantment key) {
public static void printEnchantment(@NotNull Player p, @NotNull Shop shop, ChatSheetPrinter chatSheetPrinter) {
- if (shop.getItem().hasItemMeta() && shop.getItem().getItemMeta().hasItemFlag(ItemFlag.HIDE_ENCHANTS) && plugin.getConfiguration().getBoolean("respect-item-flag")) {
+ if (shop.getItem().hasItemMeta() && shop.getItem().getItemMeta().hasItemFlag(ItemFlag.HIDE_ENCHANTS) && plugin.getConfig().getBoolean("respect-item-flag")) {
return;
}
Map enchs = new HashMap<>();
diff --git a/src/main/java/org/maxgamer/quickshop/util/PermissionChecker.java b/src/main/java/org/maxgamer/quickshop/util/PermissionChecker.java
index 13a5c57208..fcc68f29cc 100644
--- a/src/main/java/org/maxgamer/quickshop/util/PermissionChecker.java
+++ b/src/main/java/org/maxgamer/quickshop/util/PermissionChecker.java
@@ -64,8 +64,8 @@ public PermissionChecker(@NotNull QuickShop plugin) {
}
private void init() {
- usePermissionChecker = this.plugin.getConfiguration().getBoolean("shop.protection-checking");
- if (plugin.getConfiguration().getInt("shop.protection-checking-handler") == 1) {
+ usePermissionChecker = this.plugin.getConfig().getBoolean("shop.protection-checking");
+ if (plugin.getConfig().getInt("shop.protection-checking-handler") == 1) {
this.eventManager = new QSEventManager(plugin);
} else {
this.eventManager = new BukkitEventManager();
@@ -93,7 +93,7 @@ public Result canBuild(@NotNull Player player, @NotNull Location location) {
*/
public Result canBuild(@NotNull Player player, @NotNull Block block) {
- if (plugin.getConfiguration().getStringList("shop.protection-checking-blacklist").contains(block.getWorld().getName())) {
+ if (plugin.getConfig().getStringList("shop.protection-checking-blacklist").contains(block.getWorld().getName())) {
Util.debugLog("Skipping protection checking in world " + block.getWorld().getName() + " causing it in blacklist.");
return Result.SUCCESS;
}
@@ -114,7 +114,7 @@ public Result canBuild(@NotNull Player player, @NotNull Block block) {
if (plugin.getBlockHubPlugin() != null) {
BlocksHubBukkit blocksHubBukkit = (BlocksHubBukkit) plugin.getBlockHubPlugin();
boolean bhCanBuild = blocksHubBukkit.getApi().hasAccess(player.getUniqueId(), blocksHubBukkit.getApi().getWorld(block.getWorld().getName()), block.getX(), block.getY(), block.getZ());
- if (plugin.getConfiguration().getBoolean("plugin.BlockHub.only")) {
+ if (plugin.getConfig().getBoolean("plugin.BlockHub.only")) {
Util.debugLog("BlockHub only mode response: " + bhCanBuild);
return new Result("BlockHub");
} else {
diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java
index f0234255ea..72ef8980f5 100644
--- a/src/main/java/org/maxgamer/quickshop/util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/util/Util.java
@@ -188,7 +188,7 @@ public static boolean isShoppables(@NotNull Material material) {
}
public static boolean isBlacklistWorld(@NotNull World world) {
- return plugin.getConfiguration().getStringList("shop.blacklist-world").contains(world.getName());
+ return plugin.getConfig().getStringList("shop.blacklist-world").contains(world.getName());
}
/**
@@ -276,10 +276,10 @@ public static ItemStack deserialize(@NotNull String config) throws InvalidConfig
if (itemDataVersion > Bukkit.getUnsafe().getDataVersion()) {
Util.debugLog("WARNING: DataVersion not matched with ItemStack: " + config);
// okay we need some things to do
- if (plugin.getConfiguration().getBoolean("shop.force-load-downgrade-items.enable")) {
+ if (plugin.getConfig().getBoolean("shop.force-load-downgrade-items.enable")) {
// okay it enabled
Util.debugLog("QuickShop is trying force loading " + config);
- if (plugin.getConfiguration().getInt("shop.force-load-downgrade-items.method") == 0) { // Mode 0
+ if (plugin.getConfig().getInt("shop.force-load-downgrade-items.method") == 0) { // Mode 0
//noinspection deprecation
item.put("v", Bukkit.getUnsafe().getDataVersion() - 1);
} else { // Mode other
@@ -410,7 +410,7 @@ public static String getClassPrefix(@NotNull Class> c) {
}
public static boolean useEnchantmentForEnchantedBook() {
- return plugin.getConfiguration().getBoolean("shop.use-enchantment-for-enchanted-book");
+ return plugin.getConfig().getBoolean("shop.use-enchantment-for-enchanted-book");
}
@NotNull
@@ -435,7 +435,7 @@ public static String getItemCustomName(@NotNull ItemStack itemStack) {
}
if (itemStack.hasItemMeta()
&& Objects.requireNonNull(itemStack.getItemMeta()).hasDisplayName()
- && !QuickShop.getInstance().getConfiguration().getBoolean("shop.force-use-item-original-name")) {
+ && !QuickShop.getInstance().getConfig().getBoolean("shop.force-use-item-original-name")) {
return itemStack.getItemMeta().getDisplayName();
}
return null;
@@ -569,9 +569,9 @@ public static void initialize() {
SHOPABLES.clear();
RESTRICTED_PRICES.clear();
CUSTOM_STACKSIZE.clear();
- devMode = plugin.getConfiguration().getBoolean("dev-mode");
+ devMode = plugin.getConfig().getBoolean("dev-mode");
- for (String s : plugin.getConfiguration().getStringList("shop-blocks")) {
+ for (String s : plugin.getConfig().getStringList("shop-blocks")) {
Material mat = Material.matchMaterial(s.toUpperCase());
if (mat == null) {
mat = Material.matchMaterial(s);
@@ -582,7 +582,7 @@ public static void initialize() {
SHOPABLES.add(mat);
}
}
- List configBlacklist = plugin.getConfiguration().getStringList("blacklist");
+ List configBlacklist = plugin.getConfig().getStringList("blacklist");
for (String s : configBlacklist) {
Material mat = Material.getMaterial(s.toUpperCase());
if (mat == null) {
@@ -595,7 +595,7 @@ public static void initialize() {
BLACKLIST.add(mat);
}
- for (String s : plugin.getConfiguration().getStringList("shop.price-restriction")) {
+ for (String s : plugin.getConfig().getStringList("shop.price-restriction")) {
String[] sp = s.split(";");
if (sp.length == 3) {
try {
@@ -610,7 +610,7 @@ public static void initialize() {
}
}
}
- for (String material : plugin.getConfiguration().getStringList("custom-item-stacksize")) {
+ for (String material : plugin.getConfig().getStringList("custom-item-stacksize")) {
String[] data = material.split(":");
if (data.length != 2) {
continue;
@@ -626,13 +626,13 @@ public static void initialize() {
}
CUSTOM_STACKSIZE.put(mat, Integer.parseInt(data[1]));
}
- disableDebugLogger = plugin.getConfiguration().getOrDefault("debug.disable-debuglogger", false);
+ disableDebugLogger = plugin.getConfig().getBoolean("debug.disable-debuglogger", false);
try {
- dyeColor = DyeColor.valueOf(plugin.getConfiguration().getString("shop.sign-dye-color"));
+ dyeColor = DyeColor.valueOf(plugin.getConfig().getString("shop.sign-dye-color"));
} catch (Exception ignored) {
}
- InteractUtil.init(plugin.getConfiguration().getSection("shop.interact"));
+ InteractUtil.init(plugin.getConfig().getConfigurationSection("shop.interact"));
}
/**
@@ -724,7 +724,7 @@ public static boolean isBlacklisted(@NotNull ItemStack stack) {
return false;
}
for (String lore : Objects.requireNonNull(stack.getItemMeta().getLore())) {
- List blacklistLores = plugin.getConfiguration().getStringList("shop.blacklist-lores");
+ List blacklistLores = plugin.getConfig().getStringList("shop.blacklist-lores");
for (String blacklistLore : blacklistLores) {
if (lore.contains(blacklistLore)) {
return true;
@@ -1115,7 +1115,7 @@ public static String getClassPrefix() {
*/
@NotNull
public static Material getSignMaterial() {
- Material signMaterial = Material.matchMaterial(plugin.getConfiguration().getOrDefault("shop.sign-material", "OAK_WALL_SIGN"));
+ Material signMaterial = Material.matchMaterial(plugin.getConfig().getString("shop.sign-material", "OAK_WALL_SIGN"));
if (signMaterial != null) {
return signMaterial;
}
@@ -1186,13 +1186,13 @@ public static boolean isDevMode() {
return devMode;
} else {
if (plugin != null) {
- devMode = plugin.getConfiguration().getBoolean("dev-mode");
+ devMode = plugin.getConfig().getBoolean("dev-mode");
return devMode;
} else {
return false;
}
}
- //F return devMode != null ? devMode : (devMode = plugin.getConfiguration().getBoolean("dev-mode"));
+ //F return devMode != null ? devMode : (devMode = plugin.getConfig().getBoolean("dev-mode"));
}
/**
@@ -1248,7 +1248,7 @@ public static File getCacheFolder() {
@NotNull
public static List getPlayerList() {
List tabList;
- if (plugin.getConfiguration().getBoolean("include-offlineplayer-list")) {
+ if (plugin.getConfig().getBoolean("include-offlineplayer-list")) {
tabList = Arrays.stream(plugin.getServer().getOfflinePlayers()).map(OfflinePlayer::getName).collect(Collectors.toList());
} else {
tabList = plugin.getServer().getOnlinePlayers().stream().map(Player::getName).collect(Collectors.toList());
diff --git a/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationFixer.java b/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationFixer.java
index 851dc31f26..dd6bbc5521 100644
--- a/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationFixer.java
+++ b/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationFixer.java
@@ -20,6 +20,7 @@
package org.maxgamer.quickshop.util.config;
import lombok.AllArgsConstructor;
+import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.maxgamer.quickshop.QuickShop;
@@ -60,9 +61,9 @@ public boolean fix() {
for (String key : builtInConfig.getKeys(true)) {
Object value = externalConfig.get(key);
Object buildInValue = builtInConfig.get(key);
- if (value == null || !value.getClass().getTypeName().equals(Objects.requireNonNull(buildInValue).getClass().getTypeName())) {
+ if (!(value instanceof ConfigurationSection) || !value.getClass().getTypeName().equals(Objects.requireNonNull(buildInValue).getClass().getTypeName())) {
plugin.getLogger().warning("Fixing configuration use default value: " + key);
- plugin.getConfiguration().set(key, buildInValue);
+ plugin.getConfig().set(key, buildInValue);
}
}
plugin.getLogger().info("QuickShop fixed the corrupted parts in configuration that we can found. We recommend you restart the server and make fix apply.");
diff --git a/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationFixerLightning.java b/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationFixerLightning.java
index 095e75529d..fceedff37e 100644
--- a/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationFixerLightning.java
+++ b/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationFixerLightning.java
@@ -63,7 +63,7 @@ public boolean fix() {
Object buildInValue = builtInConfig.get(key);
if (value == null || !value.getClass().getTypeName().equals(Objects.requireNonNull(buildInValue).getClass().getTypeName())) {
plugin.getLogger().warning("Fixing configuration use default value: " + key);
- plugin.getConfiguration().set(key, buildInValue);
+ plugin.getConfig().set(key, buildInValue);
}
}
plugin.getLogger().info("QuickShop fixed the corrupted parts in configuration that we can found. We recommend you restart the server and make fix apply.");
diff --git a/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationUpdater.java b/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationUpdater.java
index e948f5857a..7719f46f67 100644
--- a/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationUpdater.java
+++ b/src/main/java/org/maxgamer/quickshop/util/config/ConfigurationUpdater.java
@@ -19,8 +19,8 @@
package org.maxgamer.quickshop.util.config;
-import de.leonhard.storage.Yaml;
import lombok.Getter;
+import org.bukkit.configuration.ConfigurationSection;
import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.util.Util;
@@ -34,11 +34,11 @@
public class ConfigurationUpdater {
private final QuickShop plugin;
@Getter
- private final Yaml configuration;
+ private final ConfigurationSection configuration;
public ConfigurationUpdater(QuickShop plugin) {
this.plugin = plugin;
- this.configuration = plugin.getConfiguration();
+ this.configuration = plugin.getConfig();
}
private void writeServerUniqueId() {
diff --git a/src/main/java/org/maxgamer/quickshop/util/economyformatter/BuiltInEconomyFormatter.java b/src/main/java/org/maxgamer/quickshop/util/economyformatter/BuiltInEconomyFormatter.java
index 8b351918c7..d0feb24fd9 100644
--- a/src/main/java/org/maxgamer/quickshop/util/economyformatter/BuiltInEconomyFormatter.java
+++ b/src/main/java/org/maxgamer/quickshop/util/economyformatter/BuiltInEconomyFormatter.java
@@ -47,9 +47,9 @@ public BuiltInEconomyFormatter(QuickShop plugin) {
@Override
public ReloadResult reloadModule() {
CURRENCY_SYMBOL_MAPPING.clear();
- this.useDecimalFormat = plugin.getConfiguration().getOrDefault("use-decimal-format", false);
- this.currencySymbolOnRight = plugin.getConfiguration().getOrDefault("shop.currency-symbol-on-right", false);
- List symbols = plugin.getConfiguration().getStringList("shop.alternate-currency-symbol-list");
+ this.useDecimalFormat = plugin.getConfig().getBoolean("use-decimal-format", false);
+ this.currencySymbolOnRight = plugin.getConfig().getBoolean("shop.currency-symbol-on-right", false);
+ List symbols = plugin.getConfig().getStringList("shop.alternate-currency-symbol-list");
symbols.forEach(entry -> {
String[] splits = entry.split(";", 2);
if (splits.length < 2) {
@@ -65,7 +65,7 @@ public String getInternalFormat(double amount, @Nullable String currency) {
if (StringUtils.isEmpty(currency)) {
Util.debugLog("Format: Currency is null");
String formatted = useDecimalFormat ? MsgUtil.decimalFormat(amount) : Double.toString(amount);
- return currencySymbolOnRight ? formatted + plugin.getConfiguration().getOrDefault("shop.alternate-currency-symbol", "$") : plugin.getConfiguration().getOrDefault("shop.alternate-currency-symbol", "$") + formatted;
+ return currencySymbolOnRight ? formatted + plugin.getConfig().getString("shop.alternate-currency-symbol", "$") : plugin.getConfig().getString("shop.alternate-currency-symbol", "$") + formatted;
} else {
Util.debugLog("Format: Currency is: [" + currency + "]");
String formatted = useDecimalFormat ? MsgUtil.decimalFormat(amount) : Double.toString(amount);
diff --git a/src/main/java/org/maxgamer/quickshop/util/economyformatter/EconomyFormatter.java b/src/main/java/org/maxgamer/quickshop/util/economyformatter/EconomyFormatter.java
index 923956bc3e..f43d6c2b91 100644
--- a/src/main/java/org/maxgamer/quickshop/util/economyformatter/EconomyFormatter.java
+++ b/src/main/java/org/maxgamer/quickshop/util/economyformatter/EconomyFormatter.java
@@ -54,10 +54,10 @@ public EconomyFormatter(QuickShop plugin, AbstractEconomy economy) {
@Override
public ReloadResult reloadModule() {
CURRENCY_SYMBOL_MAPPING.clear();
- this.disableVaultFormat = plugin.getConfiguration().getOrDefault("shop.disable-vault-format", false);
- this.useDecimalFormat = plugin.getConfiguration().getOrDefault("use-decimal-format", false);
- this.currencySymbolOnRight = plugin.getConfiguration().getOrDefault("shop.currency-symbol-on-right", false);
- List symbols = plugin.getConfiguration().getStringList("shop.alternate-currency-symbol-list");
+ this.disableVaultFormat = plugin.getConfig().getBoolean("shop.disable-vault-format", false);
+ this.useDecimalFormat = plugin.getConfig().getBoolean("use-decimal-format", false);
+ this.currencySymbolOnRight = plugin.getConfig().getBoolean("shop.currency-symbol-on-right", false);
+ List symbols = plugin.getConfig().getStringList("shop.alternate-currency-symbol-list");
symbols.forEach(entry -> {
String[] splits = entry.split(";", 2);
if (splits.length < 2) {
@@ -119,7 +119,7 @@ private String getInternalFormat(double amount, @Nullable String currency) {
if (StringUtils.isEmpty(currency)) {
Util.debugLog("Format: Currency is null");
String formatted = useDecimalFormat ? MsgUtil.decimalFormat(amount) : Double.toString(amount);
- return currencySymbolOnRight ? formatted + plugin.getConfiguration().getOrDefault("shop.alternate-currency-symbol", "$") : plugin.getConfiguration().getOrDefault("shop.alternate-currency-symbol", "$") + formatted;
+ return currencySymbolOnRight ? formatted + plugin.getConfig().getString("shop.alternate-currency-symbol", "$") : plugin.getConfig().getString("shop.alternate-currency-symbol", "$") + formatted;
} else {
Util.debugLog("Format: Currency is: [" + currency + "]");
String formatted = useDecimalFormat ? MsgUtil.decimalFormat(amount) : Double.toString(amount);
diff --git a/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java b/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
index d068d163d5..470f249835 100644
--- a/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
@@ -19,12 +19,12 @@
package org.maxgamer.quickshop.util.matcher.item;
-import de.leonhard.storage.sections.FlatFileSection;
import de.tr7zw.nbtapi.NBTItem;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.attribute.Attribute;
import org.bukkit.block.ShulkerBox;
+import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.*;
@@ -58,8 +58,8 @@ public QuickShopItemMatcherImpl(@NotNull QuickShop plugin) {
}
private void init() {
- itemMetaMatcher = new ItemMetaMatcher(plugin.getConfiguration().getSection("matcher.item"), this);
- workType = plugin.getConfiguration().getInt("matcher.work-type");
+ itemMetaMatcher = new ItemMetaMatcher(plugin.getConfig().getConfigurationSection("matcher.item"), this);
+ workType = plugin.getConfig().getInt("matcher.work-type");
}
/**
@@ -198,7 +198,7 @@ private static class ItemMetaMatcher {
private final List matcherList = new ArrayList<>();
- public ItemMetaMatcher(@NotNull FlatFileSection itemMatcherConfig, @NotNull QuickShopItemMatcherImpl itemMatcher) {
+ public ItemMetaMatcher(@NotNull ConfigurationSection itemMatcherConfig, @NotNull QuickShopItemMatcherImpl itemMatcher) {
addIfEnable(itemMatcherConfig, "damage", (meta1, meta2) -> {
if (meta1 instanceof Damageable != meta2 instanceof Damageable) {
@@ -514,7 +514,7 @@ public ItemMetaMatcher(@NotNull FlatFileSection itemMatcherConfig, @NotNull Quic
}
}
- private void addIfEnable(FlatFileSection itemMatcherConfig, String path, Matcher matcher) {
+ private void addIfEnable(ConfigurationSection itemMatcherConfig, String path, Matcher matcher) {
if (itemMatcherConfig.getBoolean(path)) {
matcherList.add(matcher);
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/paste/Paste.java b/src/main/java/org/maxgamer/quickshop/util/paste/Paste.java
index b0dc0fbd4b..e948d8711e 100644
--- a/src/main/java/org/maxgamer/quickshop/util/paste/Paste.java
+++ b/src/main/java/org/maxgamer/quickshop/util/paste/Paste.java
@@ -20,10 +20,10 @@
package org.maxgamer.quickshop.util.paste;
import com.google.common.cache.CacheStats;
-import de.leonhard.storage.sections.FlatFileSection;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import org.bukkit.World;
+import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -253,8 +253,8 @@ public class Paste {
StandardCharsets.UTF_8);
// Process the data to protect passwords.
try {
- FlatFileSection configurationSection =
- plugin.getConfiguration().getSection("database");
+ ConfigurationSection configurationSection =
+ plugin.getConfig().getConfigurationSection("database");
config =
config.replaceAll(
Objects.requireNonNull(
diff --git a/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
index 9652cbbe16..49bb497958 100644
--- a/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
+++ b/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
@@ -46,7 +46,7 @@ public DisplayAutoDespawnWatcher(@NotNull QuickShop plugin) {
}
private void init() {
- this.range = plugin.getConfiguration().getInt("shop.display-despawn-range");
+ this.range = plugin.getConfig().getInt("shop.display-despawn-range");
}
@Override
diff --git a/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java
index 54abd2c4d5..b3da83f232 100644
--- a/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java
+++ b/src/main/java/org/maxgamer/quickshop/watcher/LogWatcher.java
@@ -52,7 +52,7 @@ public LogWatcher(QuickShop plugin, File log) {
//noinspection ResultOfMethodCallIgnored
log.createNewFile();
} else {
- if ((log.length() / 1024f / 1024f) > plugin.getConfiguration().getDouble("logging.file-size")) {
+ if ((log.length() / 1024f / 1024f) > plugin.getConfig().getDouble("logging.file-size")) {
Path logPath = plugin.getDataFolder().toPath().resolve("logs");
Files.createDirectories(logPath);
//Find a available name
diff --git a/src/main/java/org/maxgamer/quickshop/watcher/OngoingFeeWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/OngoingFeeWatcher.java
index d677742a94..d3a5ed6df9 100644
--- a/src/main/java/org/maxgamer/quickshop/watcher/OngoingFeeWatcher.java
+++ b/src/main/java/org/maxgamer/quickshop/watcher/OngoingFeeWatcher.java
@@ -58,9 +58,9 @@ public void run() {
return;
}
- boolean allowLoan = plugin.getConfiguration().getBoolean("shop.allow-economy-loan");
- boolean ignoreUnlimited = plugin.getConfiguration().getBoolean("shop.ongoing-fee.ignore-unlimited");
- double gobalCost = plugin.getConfiguration().getDouble("shop.ongoing-fee.cost-per-shop");
+ boolean allowLoan = plugin.getConfig().getBoolean("shop.allow-economy-loan");
+ boolean ignoreUnlimited = plugin.getConfig().getBoolean("shop.ongoing-fee.ignore-unlimited");
+ double gobalCost = plugin.getConfig().getDouble("shop.ongoing-fee.cost-per-shop");
for (Shop shop : plugin.getShopManager().getAllShops()) {
if ((!shop.isUnlimited() || !ignoreUnlimited) && !shop.isDeleted()) {
UUID shopOwner = shop.getOwner();
diff --git a/src/test/java/org/maxgamer/quickshop/eventmanager/ListenerContainerTest.java b/src/test/java/org/maxgamer/quickshop/eventmanager/ListenerContainerTest.java
index d175406e0a..a606e64b9e 100644
--- a/src/test/java/org/maxgamer/quickshop/eventmanager/ListenerContainerTest.java
+++ b/src/test/java/org/maxgamer/quickshop/eventmanager/ListenerContainerTest.java
@@ -20,7 +20,6 @@
package org.maxgamer.quickshop.eventmanager;
-import de.leonhard.storage.sections.FlatFileSection;
import org.bukkit.Server;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
@@ -64,7 +63,7 @@ public FileConfiguration getConfig() {
}
@NotNull
- public FlatFileSection getConfiguration() {
+ public FileConfiguration getConfiguration() {
return null;
}
diff --git a/src/test/java/org/maxgamer/quickshop/util/InteractUtilTest.java b/src/test/java/org/maxgamer/quickshop/util/InteractUtilTest.java
index 398efba5ae..8e39bd8d13 100644
--- a/src/test/java/org/maxgamer/quickshop/util/InteractUtilTest.java
+++ b/src/test/java/org/maxgamer/quickshop/util/InteractUtilTest.java
@@ -19,46 +19,44 @@
package org.maxgamer.quickshop.util;
-import de.leonhard.storage.LightningBuilder;
-import de.leonhard.storage.Yaml;
-import de.leonhard.storage.sections.FlatFileSection;
+import org.bukkit.configuration.ConfigurationSection;
+import org.bukkit.configuration.MemoryConfiguration;
+import org.junit.Assert;
import org.junit.Test;
-import java.io.File;
-
public class InteractUtilTest {
- private FlatFileSection genConfig(int mode, boolean allowSneaking) {
- Yaml configurationSection = LightningBuilder.fromFile(new File("unit-test.yml")).createYaml();
+ private ConfigurationSection genConfig(int mode, boolean allowSneaking) {
+ ConfigurationSection configurationSection = new MemoryConfiguration();
configurationSection.set("shop.interact.interact-mode", mode);
configurationSection.set("shop.interact.sneak-to-create", allowSneaking);
- return configurationSection.getSection("");
+ return configurationSection;
}
@Test
public void testInteractBoolean() {
//ONLY
-// InteractUtil.init(genConfig(0, true));
-// Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, true));
-// Assert.assertFalse(InteractUtil.check(InteractUtil.Action.CREATE, false));
-// InteractUtil.init(genConfig(0, false));
-// Assert.assertFalse(InteractUtil.check(InteractUtil.Action.CREATE, true));
-// Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
-// //BOTH
-// InteractUtil.init(genConfig(1, false));
-// Assert.assertFalse(InteractUtil.check(InteractUtil.Action.CREATE, true));
-// Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
-// InteractUtil.init(genConfig(1, true));
-// Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, true));
-// Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
-// //REVERSED
-// InteractUtil.init(genConfig(2, false));
-// Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, true));
-// Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
-// InteractUtil.init(genConfig(2, true));
-// Assert.assertFalse(InteractUtil.check(InteractUtil.Action.CREATE, true));
-// Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
+ InteractUtil.init(genConfig(0, true));
+ Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, true));
+ Assert.assertFalse(InteractUtil.check(InteractUtil.Action.CREATE, false));
+ InteractUtil.init(genConfig(0, false));
+ Assert.assertFalse(InteractUtil.check(InteractUtil.Action.CREATE, true));
+ Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
+//BOTH
+ InteractUtil.init(genConfig(1, false));
+ Assert.assertFalse(InteractUtil.check(InteractUtil.Action.CREATE, true));
+ Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
+ InteractUtil.init(genConfig(1, true));
+ Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, true));
+ Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
+//REVERSED
+ InteractUtil.init(genConfig(2, false));
+ Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, true));
+ Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
+ InteractUtil.init(genConfig(2, true));
+ Assert.assertFalse(InteractUtil.check(InteractUtil.Action.CREATE, true));
+ Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
}
}
From 87412f5670f545be0ba728c44b4a0183478480cc Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 11 Dec 2021 21:03:50 +0800
Subject: [PATCH 048/725] Refactor new language system [1/3] preparing local
language files
---
crowdin.yml | 2 +-
.../game/game/MojangGameLanguageImpl.java | 4 +-
...tMapper.java => LanguageFilesManager.java} | 6 +-
.../localization/text/SimpleTextManager.java | 138 ++++++++++--------
.../quickshop/shop/ContainerShop.java | 2 +-
.../org/maxgamer/quickshop/util/MsgUtil.java | 9 +-
.../resources/crowdin}/af-ZA/messages.json | 0
.../resources/crowdin}/ar-SA/messages.json | 0
.../resources/crowdin}/ca-ES/messages.json | 0
.../resources/crowdin}/cs-CZ/messages.json | 0
.../resources/crowdin}/da-DK/messages.json | 0
.../resources/crowdin}/de-DE/messages.json | 0
.../resources/crowdin}/el-GR/messages.json | 0
.../resources/crowdin}/en-US/messages.json | 0
.../resources/crowdin}/es-ES/messages.json | 0
.../resources/crowdin}/fi-FI/messages.json | 0
.../resources/crowdin}/fr-FR/messages.json | 0
.../resources/crowdin}/he-IL/messages.json | 0
.../resources/crowdin}/hu-HU/messages.json | 0
.../resources/crowdin}/it-IT/messages.json | 0
.../resources/crowdin}/ja-JP/messages.json | 0
.../resources/crowdin}/ko-KR/messages.json | 0
.../resources/crowdin}/nl-NL/messages.json | 0
.../resources/crowdin}/no-NO/messages.json | 0
.../resources/crowdin}/pl-PL/messages.json | 0
.../resources/crowdin}/pt-BR/messages.json | 0
.../resources/crowdin}/pt-PT/messages.json | 0
.../resources/crowdin}/ro-RO/messages.json | 0
.../resources/crowdin}/ru-RU/messages.json | 0
.../resources/crowdin}/sr-SP/messages.json | 0
.../resources/crowdin}/sv-SE/messages.json | 0
.../resources/crowdin}/tr-TR/messages.json | 0
.../resources/crowdin}/uk-UA/messages.json | 0
.../resources/crowdin}/vi-VN/messages.json | 0
.../resources/crowdin}/zh-CN/messages.json | 0
.../resources/crowdin}/zh-HK/messages.json | 0
.../resources/crowdin}/zh-TW/messages.json | 0
37 files changed, 92 insertions(+), 69 deletions(-)
rename src/main/java/org/maxgamer/quickshop/localization/text/{TextMapper.java => LanguageFilesManager.java} (95%)
rename {crowdin/lang => src/main/resources/crowdin}/af-ZA/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/ar-SA/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/ca-ES/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/cs-CZ/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/da-DK/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/de-DE/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/el-GR/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/en-US/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/es-ES/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/fi-FI/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/fr-FR/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/he-IL/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/hu-HU/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/it-IT/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/ja-JP/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/ko-KR/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/nl-NL/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/no-NO/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/pl-PL/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/pt-BR/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/pt-PT/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/ro-RO/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/ru-RU/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/sr-SP/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/sv-SE/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/tr-TR/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/uk-UA/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/vi-VN/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/zh-CN/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/zh-HK/messages.json (100%)
rename {crowdin/lang => src/main/resources/crowdin}/zh-TW/messages.json (100%)
diff --git a/crowdin.yml b/crowdin.yml
index 15ad6b03b9..bba8990858 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -1,3 +1,3 @@
files:
- source: /src/main/resources/lang/*.json
- translation: /crowdin/lang/%locale%/%original_file_name%
+ translation: /src/main/resources/crowdin/%locale%/%original_file_name%
diff --git a/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java b/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java
index 07dff80c7b..521cc6d3f0 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java
@@ -70,8 +70,8 @@ public class MojangGameLanguageImpl extends BukkitGameLanguageImpl implements Ga
public MojangGameLanguageImpl(@NotNull QuickShop plugin, @NotNull String languageCode) {
super(plugin);
this.plugin = plugin;
- languageCode = MsgUtil.processGameLanguageCode(languageCode);
- switch (plugin.getConfiguration().getOrDefault("mojangapi-mirror", 0)) {
+ languageCode = MsgUtil.getGameLanguageCode(languageCode);
+ switch (plugin.getConfig().getInt("mojangapi-mirror", 0)) {
case 0:
mirror = new MojangApiOfficialMirror();
plugin.getLogger().info("Game assets server selected: Mojang API");
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/TextMapper.java b/src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java
similarity index 95%
rename from src/main/java/org/maxgamer/quickshop/localization/text/TextMapper.java
rename to src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java
index 671bef6b1f..a0b39dd727 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/TextMapper.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java
@@ -22,14 +22,18 @@
import com.dumptruckman.bukkit.configuration.json.JsonConfiguration;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import org.maxgamer.quickshop.util.Util;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-public class TextMapper {
+//TODO: Refactor to a localeCode->localeContentBean class mapping
+public class LanguageFilesManager {
+ //distributionPath->[localeCode->OTA files]
private final Map> locale2ContentMapping = new ConcurrentHashMap<>();
+ //distributionPath->bundled files
private final Map bundledFile2ContentMapping = new ConcurrentHashMap<>();
/**
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index 34eca19605..42cf7f2d48 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -22,6 +22,7 @@
import com.dumptruckman.bukkit.configuration.json.JsonConfiguration;
import lombok.SneakyThrows;
import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.ConfigurationSection;
@@ -45,6 +46,7 @@
import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
@@ -54,12 +56,12 @@
import java.util.regex.PatternSyntaxException;
public class SimpleTextManager implements TextManager, Reloadable {
- private static final String CROWDIN_LANGUAGE_FILE = "/master/crowdin/lang/%locale%/messages.json";
+ private static final String CROWDIN_LANGUAGE_FILE_PATH = "/master/crowdin/lang/%locale%/messages.json";
public final List postProcessors = new ArrayList<>();
private final QuickShop plugin;
private final Distribution distribution;
// >
- private final TextMapper mapper = new TextMapper();
+ private final LanguageFilesManager languageFilesManager = new LanguageFilesManager();
public SimpleTextManager(QuickShop plugin) {
@@ -93,7 +95,7 @@ private File getOverrideFilesFolder(@NotNull String path) {
* Reset everything
*/
private void reset() {
- mapper.reset();
+ languageFilesManager.reset();
postProcessors.clear();
}
@@ -106,11 +108,27 @@ private void reset() {
private JsonConfiguration loadBundled(String file) {
JsonConfiguration bundledLang = new JsonConfiguration();
File fileObject = new File(file);
+ String parentStr = fileObject.getParent();
+ String fileName = fileObject.getName();
try {
- bundledLang.loadFromString(new String(IOUtils.toByteArray(new InputStreamReader(plugin.getResource("lang/" + fileObject.getName()), StandardCharsets.UTF_8), StandardCharsets.UTF_8)));
+ InputStream stream = null;
+ if (!StringUtils.isEmpty(parentStr)) {
+ //Try to fetch matched i18n resources
+ stream = plugin.getResource("crowdin/" + parentStr + "/" + fileName);
+ }
+ if (stream == null) {
+ //Fallback to default
+ stream = plugin.getResource("lang/" + fileName);
+ }
+ if (stream != null) {
+ bundledLang.loadFromString(new String(IOUtils.toByteArray(new InputStreamReader(stream, StandardCharsets.UTF_8), StandardCharsets.UTF_8)));
+ } else {
+ plugin.getLogger().log(Level.WARNING, "Cannot load bundled language file from jar, bundled language files " + (parentStr == null ? "" : parentStr) + "/" + fileName + " not found.");
+ bundledLang = new JsonConfiguration();
+ }
} catch (IOException | InvalidConfigurationException ex) {
bundledLang = new JsonConfiguration();
- plugin.getLogger().log(Level.SEVERE, "Cannot load bundled language file from Jar, some strings may missing!", ex);
+ plugin.getLogger().log(Level.SEVERE, "Cannot load bundled language file from jar, some strings may missing!", ex);
}
return bundledLang;
}
@@ -121,43 +139,44 @@ private JsonConfiguration loadBundled(String file) {
public void load() {
plugin.getLogger().info("Checking for translation updates, this may need a while...");
this.reset();
- distribution.getAvailableLanguages(); // Make a request that loading the manifest to create manifest cache for
- // parallel threads
- List enabledLanguagesRegex = plugin.getConfiguration().getStringList("enabled-languages");
+ List enabledLanguagesRegex = plugin.getConfig().getStringList("enabled-languages");
//Make sure is a lowercase regex, prevent case-sensitive and underscore issue
for (int i = 0; i < enabledLanguagesRegex.size(); i++) {
enabledLanguagesRegex.set(i, enabledLanguagesRegex.get(i).toLowerCase(Locale.ROOT).replace("-", "_"));
}
- // Multi File and Multi-Language loader
- // Offline Initiated
- mapper.deployBundled("/master/crowdin/lang/%locale%/messages.json", loadBundled("/master/crowdin/lang/%locale%/messages.json"));
- distribution.getAvailableLanguages().parallelStream().forEach(crowdinCode -> distribution.getAvailableFiles().parallelStream().forEach(crowdinFile -> {
- try {
- // Minecraft client use lowercase wi
- String minecraftCode = crowdinCode.toLowerCase(Locale.ROOT).replace("-", "_");
- if (!localeEnabled(minecraftCode, enabledLanguagesRegex)) {
- Util.debugLog("Locale: " + minecraftCode + " not enabled in configuration.");
- return;
- }
- Util.debugLog("Loading translation for locale: " + crowdinCode + " (" + minecraftCode + ")");
- // Deploy bundled to mapper
- mapper.deployBundled(crowdinFile, loadBundled(crowdinFile));
- JsonConfiguration configuration = getDistributionConfiguration(crowdinFile, crowdinCode);
- // Loading override text (allow user modification the translation)
- JsonConfiguration override = getOverrideConfiguration(crowdinFile, minecraftCode);
- applyOverrideConfiguration(configuration, override);
- // Deploy distribution to mapper
- mapper.deploy(crowdinFile, minecraftCode, configuration, loadBundled(crowdinFile));
- Util.debugLog("Locale " + crowdinFile.replace("%locale%", crowdinCode) + " has been successfully loaded");
- } // Key founds in available locales but not in custom mapping on crowdin platform
- catch (IOException e) {
- // Network error
- plugin.getLogger().log(Level.WARNING, "Couldn't update the translation for locale " + crowdinCode + " please check your network connection.", e);
- } catch (Exception e) {
- // Translation syntax error or other exceptions
- plugin.getLogger().log(Level.WARNING, "Couldn't update the translation for locale " + crowdinCode + ".", e);
- }
- }));
+ //====Multi File and Multi-Language loader start====
+ //Init offline default file
+ languageFilesManager.deployBundled(CROWDIN_LANGUAGE_FILE_PATH, loadBundled(CROWDIN_LANGUAGE_FILE_PATH));
+ //Get language code first
+ distribution.getAvailableLanguages().parallelStream().forEach(crowdinCode ->
+ //Then load all the files in this language code
+ distribution.getAvailableFiles().forEach(crowdinFile -> {
+ try {
+ // Minecraft client use lowercase
+ String minecraftCode = crowdinCode.toLowerCase(Locale.ROOT).replace("-", "_");
+ if (!localeEnabled(minecraftCode, enabledLanguagesRegex)) {
+ Util.debugLog("Locale: " + minecraftCode + " not enabled in configuration.");
+ return;
+ }
+ Util.debugLog("Loading translation for locale: " + crowdinCode + " (" + minecraftCode + ")");
+ // Deploy bundled to mapper
+ languageFilesManager.deployBundled(crowdinFile, loadBundled(crowdinFile));
+ JsonConfiguration configuration = getDistributionConfiguration(crowdinFile, crowdinCode);
+ // Loading override text (allow user modification the translation)
+ JsonConfiguration override = getOverrideConfiguration(crowdinFile, minecraftCode);
+ applyOverrideConfiguration(configuration, override);
+ // Deploy distribution to mapper
+ languageFilesManager.deploy(crowdinFile, minecraftCode, configuration, loadBundled(crowdinFile));
+ Util.debugLog("Locale " + crowdinFile.replace("%locale%", crowdinCode) + " has been successfully loaded");
+ } // Key founds in available locales but not in custom mapping on crowdin platform
+ catch (IOException e) {
+ // Network error
+ plugin.getLogger().log(Level.WARNING, "Couldn't update the translation for locale " + crowdinCode + " please check your network connection.", e);
+ } catch (Exception e) {
+ // Translation syntax error or other exceptions
+ plugin.getLogger().log(Level.WARNING, "Couldn't update the translation for locale " + crowdinCode + ".", e);
+ }
+ }));
// Register post processor
postProcessors.add(new FillerProcessor());
@@ -256,7 +275,7 @@ private JsonConfiguration getOverrideConfiguration(@NotNull String overrideFile,
*/
@Override
public @NotNull Text of(@NotNull String path, Object... args) {
- return new Text(this, (CommandSender) null, mapper.getDistribution(CROWDIN_LANGUAGE_FILE), mapper.getBundled(CROWDIN_LANGUAGE_FILE), path, args);
+ return new Text(this, (CommandSender) null, languageFilesManager.getDistribution(CROWDIN_LANGUAGE_FILE_PATH), languageFilesManager.getBundled(CROWDIN_LANGUAGE_FILE_PATH), path, args);
}
/**
@@ -269,7 +288,7 @@ private JsonConfiguration getOverrideConfiguration(@NotNull String overrideFile,
*/
@Override
public @NotNull Text of(@Nullable CommandSender sender, @NotNull String path, Object... args) {
- return new Text(this, sender, mapper.getDistribution(CROWDIN_LANGUAGE_FILE), mapper.getBundled(CROWDIN_LANGUAGE_FILE), path, args);
+ return new Text(this, sender, languageFilesManager.getDistribution(CROWDIN_LANGUAGE_FILE_PATH), languageFilesManager.getBundled(CROWDIN_LANGUAGE_FILE_PATH), path, args);
}
/**
@@ -282,7 +301,7 @@ private JsonConfiguration getOverrideConfiguration(@NotNull String overrideFile,
*/
@Override
public @NotNull Text of(@Nullable UUID sender, @NotNull String path, Object... args) {
- return new Text(this, sender, mapper.getDistribution(CROWDIN_LANGUAGE_FILE), mapper.getBundled(CROWDIN_LANGUAGE_FILE), path, args);
+ return new Text(this, sender, languageFilesManager.getDistribution(CROWDIN_LANGUAGE_FILE_PATH), languageFilesManager.getBundled(CROWDIN_LANGUAGE_FILE_PATH), path, args);
}
/**
@@ -294,7 +313,7 @@ private JsonConfiguration getOverrideConfiguration(@NotNull String overrideFile,
*/
@Override
public @NotNull TextList ofList(@NotNull String path, Object... args) {
- return new TextList(this, (CommandSender) null, mapper.getDistribution(CROWDIN_LANGUAGE_FILE), mapper.getBundled(CROWDIN_LANGUAGE_FILE), path, args);
+ return new TextList(this, (CommandSender) null, languageFilesManager.getDistribution(CROWDIN_LANGUAGE_FILE_PATH), languageFilesManager.getBundled(CROWDIN_LANGUAGE_FILE_PATH), path, args);
}
/**
@@ -307,7 +326,7 @@ private JsonConfiguration getOverrideConfiguration(@NotNull String overrideFile,
*/
@Override
public @NotNull TextList ofList(@Nullable UUID sender, @NotNull String path, Object... args) {
- return new TextList(this, sender, mapper.getDistribution(CROWDIN_LANGUAGE_FILE), mapper.getBundled(CROWDIN_LANGUAGE_FILE), path, args);
+ return new TextList(this, sender, languageFilesManager.getDistribution(CROWDIN_LANGUAGE_FILE_PATH), languageFilesManager.getBundled(CROWDIN_LANGUAGE_FILE_PATH), path, args);
}
/**
@@ -320,7 +339,7 @@ private JsonConfiguration getOverrideConfiguration(@NotNull String overrideFile,
*/
@Override
public @NotNull TextList ofList(@Nullable CommandSender sender, @NotNull String path, Object... args) {
- return new TextList(this, sender, mapper.getDistribution(CROWDIN_LANGUAGE_FILE), mapper.getBundled(CROWDIN_LANGUAGE_FILE), path, args);
+ return new TextList(this, sender, languageFilesManager.getDistribution(CROWDIN_LANGUAGE_FILE_PATH), languageFilesManager.getBundled(CROWDIN_LANGUAGE_FILE_PATH), path, args);
}
@Override
@@ -332,14 +351,13 @@ public ReloadResult reloadModule() {
public static class TextList implements org.maxgamer.quickshop.api.localization.text.TextList {
private final SimpleTextManager manager;
private final String path;
- private final QuickShop plugin;
private final Map mapping;
private final CommandSender sender;
private final Object[] args;
+ @Nullable
private final JsonConfiguration bundled;
- private TextList(SimpleTextManager manager, CommandSender sender, Map mapping, JsonConfiguration bundled, String path, Object... args) {
- this.plugin = manager.plugin;
+ private TextList(SimpleTextManager manager, CommandSender sender, Map mapping, @Nullable JsonConfiguration bundled, String path, Object... args) {
this.manager = manager;
this.sender = sender;
this.mapping = mapping;
@@ -348,8 +366,7 @@ private TextList(SimpleTextManager manager, CommandSender sender, Map mapping, JsonConfiguration bundled, String path, Object... args) {
- this.plugin = manager.plugin;
+ private TextList(SimpleTextManager manager, UUID sender, Map mapping, @Nullable JsonConfiguration bundled, String path, Object... args) {
this.manager = manager;
if (sender != null) {
this.sender = Bukkit.getPlayer(sender);
@@ -400,14 +417,15 @@ public List forLocale(@NotNull String locale) {
JsonConfiguration index = mapping.get(locale);
if (index == null) {
Util.debugLog("Fallback " + locale + " to default game-language locale caused by QuickShop doesn't support this locale");
- if (MsgUtil.processGameLanguageCode(plugin.getConfiguration().getOrDefault("game-language", "default")).equals(locale)) {
+ String languageCode = MsgUtil.getDefaultGameLanguageCode();
+ if (languageCode.equals(locale)) {
List str = fallbackLocal();
if (str.isEmpty()) {
return Collections.singletonList("Fallback Missing Language Key: " + path + ", report to QuickShop!");
}
return postProcess(str);
} else {
- return forLocale(MsgUtil.processGameLanguageCode(plugin.getConfiguration().getOrDefault("game-language", "default")));
+ return forLocale(languageCode);
}
} else {
List str = index.getStringList(path);
@@ -434,7 +452,7 @@ public List forLocale() {
if (sender instanceof Player) {
return forLocale(((Player) sender).getLocale());
} else {
- return forLocale(MsgUtil.processGameLanguageCode(plugin.getConfiguration().getOrDefault("game-language", "default")));
+ return forLocale(MsgUtil.getDefaultGameLanguageCode());
}
}
@@ -455,14 +473,13 @@ public void send() {
public static class Text implements org.maxgamer.quickshop.api.localization.text.Text {
private final SimpleTextManager manager;
private final String path;
- private final QuickShop plugin;
private final Map mapping;
private final CommandSender sender;
private final Object[] args;
+ @Nullable
private final JsonConfiguration bundled;
- private Text(SimpleTextManager manager, CommandSender sender, Map mapping, JsonConfiguration bundled, String path, Object... args) {
- this.plugin = manager.plugin;
+ private Text(SimpleTextManager manager, CommandSender sender, Map mapping, @Nullable JsonConfiguration bundled, String path, Object... args) {
this.manager = manager;
this.sender = sender;
this.mapping = mapping;
@@ -471,8 +488,7 @@ private Text(SimpleTextManager manager, CommandSender sender, Map mapping, JsonConfiguration bundled, String path, Object... args) {
- this.plugin = manager.plugin;
+ private Text(SimpleTextManager manager, UUID sender, Map mapping, @Nullable JsonConfiguration bundled, String path, Object... args) {
this.manager = manager;
if (sender != null) {
this.sender = Bukkit.getPlayer(sender);
@@ -492,7 +508,7 @@ private Text(SimpleTextManager manager, UUID sender, Map cachedGameLanguageCode = null;
+ public static String getDefaultGameLanguageCode() {
+ return getGameLanguageCode(plugin.getConfig().getString("game-language", "default"));
+ }
+
@Unstable
- public static String processGameLanguageCode(String languageCode) {
+ public static String getGameLanguageCode(String languageCode) {
if (cachedGameLanguageCode != null && cachedGameLanguageCode.getKey().equals(languageCode)) {
return cachedGameLanguageCode.getValue();
-
}
String copyCode = languageCode;
if ("default".equalsIgnoreCase(languageCode)) {
@@ -212,7 +215,7 @@ public static void loadGameLanguage(@NotNull String languageCode) {
}
public static String getTranslateText(ItemStack stack) {
- if (plugin.getConfiguration().getBoolean("force-use-item-original-name") || !stack.hasItemMeta() || !stack.getItemMeta().hasDisplayName()) {
+ if (plugin.getConfig().getBoolean("force-use-item-original-name") || !stack.hasItemMeta() || !stack.getItemMeta().hasDisplayName()) {
return convertItemStackToTranslateText(stack.getType());
} else {
return Util.getItemStackName(stack);
diff --git a/crowdin/lang/af-ZA/messages.json b/src/main/resources/crowdin/af-ZA/messages.json
similarity index 100%
rename from crowdin/lang/af-ZA/messages.json
rename to src/main/resources/crowdin/af-ZA/messages.json
diff --git a/crowdin/lang/ar-SA/messages.json b/src/main/resources/crowdin/ar-SA/messages.json
similarity index 100%
rename from crowdin/lang/ar-SA/messages.json
rename to src/main/resources/crowdin/ar-SA/messages.json
diff --git a/crowdin/lang/ca-ES/messages.json b/src/main/resources/crowdin/ca-ES/messages.json
similarity index 100%
rename from crowdin/lang/ca-ES/messages.json
rename to src/main/resources/crowdin/ca-ES/messages.json
diff --git a/crowdin/lang/cs-CZ/messages.json b/src/main/resources/crowdin/cs-CZ/messages.json
similarity index 100%
rename from crowdin/lang/cs-CZ/messages.json
rename to src/main/resources/crowdin/cs-CZ/messages.json
diff --git a/crowdin/lang/da-DK/messages.json b/src/main/resources/crowdin/da-DK/messages.json
similarity index 100%
rename from crowdin/lang/da-DK/messages.json
rename to src/main/resources/crowdin/da-DK/messages.json
diff --git a/crowdin/lang/de-DE/messages.json b/src/main/resources/crowdin/de-DE/messages.json
similarity index 100%
rename from crowdin/lang/de-DE/messages.json
rename to src/main/resources/crowdin/de-DE/messages.json
diff --git a/crowdin/lang/el-GR/messages.json b/src/main/resources/crowdin/el-GR/messages.json
similarity index 100%
rename from crowdin/lang/el-GR/messages.json
rename to src/main/resources/crowdin/el-GR/messages.json
diff --git a/crowdin/lang/en-US/messages.json b/src/main/resources/crowdin/en-US/messages.json
similarity index 100%
rename from crowdin/lang/en-US/messages.json
rename to src/main/resources/crowdin/en-US/messages.json
diff --git a/crowdin/lang/es-ES/messages.json b/src/main/resources/crowdin/es-ES/messages.json
similarity index 100%
rename from crowdin/lang/es-ES/messages.json
rename to src/main/resources/crowdin/es-ES/messages.json
diff --git a/crowdin/lang/fi-FI/messages.json b/src/main/resources/crowdin/fi-FI/messages.json
similarity index 100%
rename from crowdin/lang/fi-FI/messages.json
rename to src/main/resources/crowdin/fi-FI/messages.json
diff --git a/crowdin/lang/fr-FR/messages.json b/src/main/resources/crowdin/fr-FR/messages.json
similarity index 100%
rename from crowdin/lang/fr-FR/messages.json
rename to src/main/resources/crowdin/fr-FR/messages.json
diff --git a/crowdin/lang/he-IL/messages.json b/src/main/resources/crowdin/he-IL/messages.json
similarity index 100%
rename from crowdin/lang/he-IL/messages.json
rename to src/main/resources/crowdin/he-IL/messages.json
diff --git a/crowdin/lang/hu-HU/messages.json b/src/main/resources/crowdin/hu-HU/messages.json
similarity index 100%
rename from crowdin/lang/hu-HU/messages.json
rename to src/main/resources/crowdin/hu-HU/messages.json
diff --git a/crowdin/lang/it-IT/messages.json b/src/main/resources/crowdin/it-IT/messages.json
similarity index 100%
rename from crowdin/lang/it-IT/messages.json
rename to src/main/resources/crowdin/it-IT/messages.json
diff --git a/crowdin/lang/ja-JP/messages.json b/src/main/resources/crowdin/ja-JP/messages.json
similarity index 100%
rename from crowdin/lang/ja-JP/messages.json
rename to src/main/resources/crowdin/ja-JP/messages.json
diff --git a/crowdin/lang/ko-KR/messages.json b/src/main/resources/crowdin/ko-KR/messages.json
similarity index 100%
rename from crowdin/lang/ko-KR/messages.json
rename to src/main/resources/crowdin/ko-KR/messages.json
diff --git a/crowdin/lang/nl-NL/messages.json b/src/main/resources/crowdin/nl-NL/messages.json
similarity index 100%
rename from crowdin/lang/nl-NL/messages.json
rename to src/main/resources/crowdin/nl-NL/messages.json
diff --git a/crowdin/lang/no-NO/messages.json b/src/main/resources/crowdin/no-NO/messages.json
similarity index 100%
rename from crowdin/lang/no-NO/messages.json
rename to src/main/resources/crowdin/no-NO/messages.json
diff --git a/crowdin/lang/pl-PL/messages.json b/src/main/resources/crowdin/pl-PL/messages.json
similarity index 100%
rename from crowdin/lang/pl-PL/messages.json
rename to src/main/resources/crowdin/pl-PL/messages.json
diff --git a/crowdin/lang/pt-BR/messages.json b/src/main/resources/crowdin/pt-BR/messages.json
similarity index 100%
rename from crowdin/lang/pt-BR/messages.json
rename to src/main/resources/crowdin/pt-BR/messages.json
diff --git a/crowdin/lang/pt-PT/messages.json b/src/main/resources/crowdin/pt-PT/messages.json
similarity index 100%
rename from crowdin/lang/pt-PT/messages.json
rename to src/main/resources/crowdin/pt-PT/messages.json
diff --git a/crowdin/lang/ro-RO/messages.json b/src/main/resources/crowdin/ro-RO/messages.json
similarity index 100%
rename from crowdin/lang/ro-RO/messages.json
rename to src/main/resources/crowdin/ro-RO/messages.json
diff --git a/crowdin/lang/ru-RU/messages.json b/src/main/resources/crowdin/ru-RU/messages.json
similarity index 100%
rename from crowdin/lang/ru-RU/messages.json
rename to src/main/resources/crowdin/ru-RU/messages.json
diff --git a/crowdin/lang/sr-SP/messages.json b/src/main/resources/crowdin/sr-SP/messages.json
similarity index 100%
rename from crowdin/lang/sr-SP/messages.json
rename to src/main/resources/crowdin/sr-SP/messages.json
diff --git a/crowdin/lang/sv-SE/messages.json b/src/main/resources/crowdin/sv-SE/messages.json
similarity index 100%
rename from crowdin/lang/sv-SE/messages.json
rename to src/main/resources/crowdin/sv-SE/messages.json
diff --git a/crowdin/lang/tr-TR/messages.json b/src/main/resources/crowdin/tr-TR/messages.json
similarity index 100%
rename from crowdin/lang/tr-TR/messages.json
rename to src/main/resources/crowdin/tr-TR/messages.json
diff --git a/crowdin/lang/uk-UA/messages.json b/src/main/resources/crowdin/uk-UA/messages.json
similarity index 100%
rename from crowdin/lang/uk-UA/messages.json
rename to src/main/resources/crowdin/uk-UA/messages.json
diff --git a/crowdin/lang/vi-VN/messages.json b/src/main/resources/crowdin/vi-VN/messages.json
similarity index 100%
rename from crowdin/lang/vi-VN/messages.json
rename to src/main/resources/crowdin/vi-VN/messages.json
diff --git a/crowdin/lang/zh-CN/messages.json b/src/main/resources/crowdin/zh-CN/messages.json
similarity index 100%
rename from crowdin/lang/zh-CN/messages.json
rename to src/main/resources/crowdin/zh-CN/messages.json
diff --git a/crowdin/lang/zh-HK/messages.json b/src/main/resources/crowdin/zh-HK/messages.json
similarity index 100%
rename from crowdin/lang/zh-HK/messages.json
rename to src/main/resources/crowdin/zh-HK/messages.json
diff --git a/crowdin/lang/zh-TW/messages.json b/src/main/resources/crowdin/zh-TW/messages.json
similarity index 100%
rename from crowdin/lang/zh-TW/messages.json
rename to src/main/resources/crowdin/zh-TW/messages.json
From 07ca3a13fc4eb27bdc8359d38b666d2d3ceed977 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 11 Dec 2021 21:04:28 +0800
Subject: [PATCH 049/725] Fix color issue with certain input
---
.../quickshop/localization/text/LanguageFilesManager.java | 5 +++++
.../quickshop/localization/text/SimpleTextManager.java | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java
index a0b39dd727..47724d1073 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java
@@ -53,6 +53,9 @@ public void reset() {
* @param bundled The values from bundled file
*/
public void deploy(@NotNull String distributionPath, @NotNull String locale, @NotNull JsonConfiguration distribution, @NotNull JsonConfiguration bundled) {
+ //Parsed color
+ Util.parseColours(bundled);
+ Util.parseColours(distribution);
this.bundledFile2ContentMapping.put(distributionPath, bundled);
this.locale2ContentMapping.computeIfAbsent(distributionPath, e -> new HashMap<>());
this.locale2ContentMapping.get(distributionPath).put(locale, distribution);
@@ -65,6 +68,8 @@ public void deploy(@NotNull String distributionPath, @NotNull String locale, @No
* @param bundled The values from bundled file
*/
public void deployBundled(@NotNull String distributionPath, @NotNull JsonConfiguration bundled) {
+ //Parsed color
+ Util.parseColours(bundled);
this.bundledFile2ContentMapping.put(distributionPath, bundled);
}
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index 42cf7f2d48..fd030a6df8 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -35,7 +35,6 @@
import org.maxgamer.quickshop.api.localization.text.postprocessor.PostProcessor;
import org.maxgamer.quickshop.localization.text.distributions.Distribution;
import org.maxgamer.quickshop.localization.text.distributions.crowdin.CrowdinOTA;
-import org.maxgamer.quickshop.localization.text.postprocessing.impl.ColorProcessor;
import org.maxgamer.quickshop.localization.text.postprocessing.impl.FillerProcessor;
import org.maxgamer.quickshop.localization.text.postprocessing.impl.PlaceHolderApiProcessor;
import org.maxgamer.quickshop.util.MsgUtil;
@@ -181,7 +180,8 @@ public void load() {
// Register post processor
postProcessors.add(new FillerProcessor());
postProcessors.add(new PlaceHolderApiProcessor());
- postProcessors.add(new ColorProcessor());
+ //We done this when deploys language
+ //postProcessors.add(new ColorProcessor());
}
/**
From a87fda2889ee012fbb32a6fb072b3652054cf98e Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 11 Dec 2021 21:04:52 +0800
Subject: [PATCH 050/725] Fix testing and bump spigot-api to
1.18.1-R0.1-SNAPSHOT
---
pom.xml | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/pom.xml b/pom.xml
index ceda44a4d2..0cf5c12936 100644
--- a/pom.xml
+++ b/pom.xml
@@ -621,14 +621,8 @@
org.spigotmc
spigot-api
- 1.18-rc3-R0.1-SNAPSHOT
+ 1.18.1-R0.1-SNAPSHOT
provided
-
-
- commons-lang
- commons-lang
-
-
org.apache.commons
From 77df889b3d743558a4a7dd2942b6d00072f095e3 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 11 Dec 2021 21:20:17 +0800
Subject: [PATCH 051/725] Fix test
---
.../java/org/maxgamer/quickshop/util/InteractUtilTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/maxgamer/quickshop/util/InteractUtilTest.java b/src/test/java/org/maxgamer/quickshop/util/InteractUtilTest.java
index 8e39bd8d13..ec7584adec 100644
--- a/src/test/java/org/maxgamer/quickshop/util/InteractUtilTest.java
+++ b/src/test/java/org/maxgamer/quickshop/util/InteractUtilTest.java
@@ -31,7 +31,7 @@ private ConfigurationSection genConfig(int mode, boolean allowSneaking) {
ConfigurationSection configurationSection = new MemoryConfiguration();
configurationSection.set("shop.interact.interact-mode", mode);
configurationSection.set("shop.interact.sneak-to-create", allowSneaking);
- return configurationSection;
+ return configurationSection.getConfigurationSection("shop.interact");
}
@Test
@@ -43,14 +43,14 @@ public void testInteractBoolean() {
InteractUtil.init(genConfig(0, false));
Assert.assertFalse(InteractUtil.check(InteractUtil.Action.CREATE, true));
Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
-//BOTH
+ //BOTH
InteractUtil.init(genConfig(1, false));
Assert.assertFalse(InteractUtil.check(InteractUtil.Action.CREATE, true));
Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
InteractUtil.init(genConfig(1, true));
Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, true));
Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
-//REVERSED
+ //REVERSED
InteractUtil.init(genConfig(2, false));
Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, true));
Assert.assertTrue(InteractUtil.check(InteractUtil.Action.CREATE, false));
From 9b8a32e436a172a4873f58c1d2f4256f9b0d2ba8 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 02:56:15 +0800
Subject: [PATCH 052/725] Fix comment missing issue, implement itself comment
updater
---
.../org/maxgamer/quickshop/QuickShop.java | 11 +-
.../util/config/ConfigCommentUpdater.java | 209 ++++++++++++++++++
2 files changed, 216 insertions(+), 4 deletions(-)
create mode 100644 src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index 9036621957..60470bebb6 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -81,6 +81,7 @@
import org.maxgamer.quickshop.util.Timer;
import org.maxgamer.quickshop.util.*;
import org.maxgamer.quickshop.util.compatibility.SimpleCompatibilityManager;
+import org.maxgamer.quickshop.util.config.ConfigCommentUpdater;
import org.maxgamer.quickshop.util.config.ConfigProvider;
import org.maxgamer.quickshop.util.config.ConfigurationFixer;
import org.maxgamer.quickshop.util.envcheck.*;
@@ -90,10 +91,7 @@
import org.maxgamer.quickshop.util.reporter.error.RollbarErrorReporter;
import org.maxgamer.quickshop.watcher.*;
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
+import java.io.*;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
@@ -2004,6 +2002,11 @@ private void updateConfig(int selectedVersion) throws IOException {
saveConfiguration();
reloadConfiguration();
+ //Add comment for config.yml
+ try (InputStream inputStream = Objects.requireNonNull(getResource("config.yml"))) {
+ new ConfigCommentUpdater(this, inputStream, new File(getDataFolder(), "config.yml")).updateComment();
+ }
+
//Delete old example configuration files
Files.deleteIfExists(new File(getDataFolder(), "example.config.yml").toPath());
Files.deleteIfExists(new File(getDataFolder(), "example-configuration.txt").toPath());
diff --git a/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java b/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
new file mode 100644
index 0000000000..f09224d064
--- /dev/null
+++ b/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
@@ -0,0 +1,209 @@
+/*
+ * This file is a part of project QuickShop, the name is ConfigCommentUpdater.java
+ * Copyright (C) PotatoCraft Studio 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 .
+ *
+ */
+
+package org.maxgamer.quickshop.util.config;
+
+import org.maxgamer.quickshop.QuickShop;
+import org.maxgamer.quickshop.util.holder.QuickShopInstanceHolder;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
+import java.util.*;
+import java.util.logging.Level;
+
+/**
+ * A node based yaml comment updater
+ *
+ * @author sandtechnology
+ */
+public class ConfigCommentUpdater extends QuickShopInstanceHolder {
+ private static final String HEADER = "HEAD-" + UUID.randomUUID();
+ private static final String FOOTER = "END-" + UUID.randomUUID();
+ private final InputStream builtInConfig;
+ private final File externalConfig;
+
+ public ConfigCommentUpdater(QuickShop plugin, InputStream builtInConfig, File externalConfig) {
+ super(plugin);
+ this.builtInConfig = builtInConfig;
+ this.externalConfig = externalConfig;
+ }
+
+ public void updateComment() {
+ boolean hasBackup = false;
+ boolean hasWrite = false;
+ Path backupFile = externalConfig.toPath().resolve(UUID.randomUUID() + "-bak.yml");
+ try {
+ Files.copy(externalConfig.toPath(), backupFile, StandardCopyOption.REPLACE_EXISTING);
+ hasBackup = true;
+ BufferedReader reader = new BufferedReader(new InputStreamReader(builtInConfig, StandardCharsets.UTF_8));
+ List builtInContent = new ArrayList<>();
+ while (true) {
+ String result = reader.readLine();
+ if (result == null) {
+ break;
+ }
+ builtInContent.add(result);
+ }
+
+ PathMarker pathMarker = new PathMarker();
+ Map> key2NonKeyContentMap = new LinkedHashMap<>();
+ Set pendingComment = new LinkedHashSet<>();
+ for (String s : builtInContent) {
+ String trimmedStr = s.trim();
+ if (trimmedStr.isEmpty()) {
+ pendingComment.add("");
+ continue;
+ }
+ if (trimmedStr.startsWith("#")) {
+ pendingComment.add(s);
+ } else
+ //First node is header, so just use current
+ if (pathMarker.parseRawInput(s)) {
+ String pathNow = pathMarker.getPath();
+ key2NonKeyContentMap.merge(pathNow, new LinkedHashSet<>(pendingComment), (oldList, newList) -> {
+ oldList.addAll(newList);
+ return oldList;
+ });
+ pendingComment.clear();
+ }
+ }
+ if (!pendingComment.isEmpty()) {
+ key2NonKeyContentMap.put(FOOTER, pendingComment);
+ }
+
+ List externalContent = Files.readAllLines(externalConfig.toPath());
+ List output = new ArrayList<>(externalContent.size());
+ int offset = 0;
+ for (int i = 0; i < externalContent.size(); i++) {
+ String s = externalContent.get(i);
+ if (s.isEmpty() || s.trim().startsWith("#")) {
+ pendingComment.add(s);
+ offset--;
+ continue;
+ }
+ output.add(s);
+ if (pathMarker.parseRawInput(s)) {
+ String pathNow = pathMarker.getPath();
+ Set comments = key2NonKeyContentMap.getOrDefault(pathNow, Collections.emptySet());
+ pendingComment.addAll(comments);
+ for (String comment : pendingComment) {
+ output.add(i + offset, comment);
+ offset++;
+ }
+ pendingComment.clear();
+ }
+ }
+
+ output.addAll(key2NonKeyContentMap.getOrDefault(FOOTER, Collections.emptySet()));
+ hasWrite = true;
+ Files.write(externalConfig.toPath(), output, StandardCharsets.UTF_8);
+ } catch (Throwable e) {
+ if (hasBackup && hasWrite) {
+ plugin.getLogger().log(Level.WARNING, "Failed to update comment for config.yml, rollback...", e);
+ try {
+ Files.copy(backupFile, externalConfig.toPath(), StandardCopyOption.REPLACE_EXISTING);
+ } catch (Throwable ex) {
+ plugin.getLogger().log(Level.WARNING, "Failed to rollback config.yml! Please rollback it manually by renaming " + backupFile.getFileName() + " to config.yml!", ex);
+ }
+ } else {
+ plugin.getLogger().log(Level.WARNING, "Failed to update comment for config.yml, no changes taken.", e);
+ }
+ }
+ }
+
+ private static class PathMarker {
+ private final List path = new ArrayList<>(Collections.singletonList(HEADER));
+ private int pathDepth = 0;
+
+ public void addNode(String s) {
+ path.add(s);
+ }
+
+ private int countSpace(String s) {
+ int i = 0;
+ for (char c : s.toCharArray()) {
+ if (c == ' ') {
+ i++;
+ } else {
+ break;
+ }
+ }
+ return i;
+ }
+
+ public boolean parseRawInput(String str) {
+ String trimmedStr = str.trim();
+ if (trimmedStr.startsWith("#") || !(trimmedStr.contains(": ") || trimmedStr.endsWith(":"))) {
+ return false;
+ }
+ int pathDepthNow = countSpace(str);
+ String nodeStr = trimmedStr.split(":", 2)[0];
+ if (!nodeStr.isEmpty()) {
+ if (pathDepthNow > pathDepth) {
+ addNode(nodeStr);
+ } else if (pathDepthNow < pathDepth) {
+ for (int j = 0; j < pathDepth - pathDepthNow; j++) {
+ removeNode();
+ }
+ addNode(nodeStr);
+ } else {
+ replaceNode(nodeStr);
+ }
+ pathDepth = pathDepthNow;
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public void replaceNode(String s) {
+ if (!path.isEmpty()) {
+ path.set(path.size() - 1, s);
+ } else {
+ path.add(s);
+ }
+ }
+
+ public void reset() {
+ path.clear();
+ }
+
+ public void removeNode() {
+ if (!path.isEmpty()) {
+ path.remove(path.size() - 1);
+ }
+ }
+
+
+ public String getPath() {
+ StringJoiner stringJoiner = new StringJoiner(".");
+ for (String s : path) {
+ stringJoiner.add(s);
+ }
+ return stringJoiner.toString();
+ }
+ }
+}
+
From a0d415ecf872c568ef0c50446ea02f76cbcc2424 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 09:28:57 +0800
Subject: [PATCH 053/725] Delete backup when update successful
---
.../org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java b/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
index f09224d064..33badedf4c 100644
--- a/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
+++ b/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
@@ -119,6 +119,7 @@ public void updateComment() {
output.addAll(key2NonKeyContentMap.getOrDefault(FOOTER, Collections.emptySet()));
hasWrite = true;
Files.write(externalConfig.toPath(), output, StandardCharsets.UTF_8);
+ backupFile.toFile().delete();
} catch (Throwable e) {
if (hasBackup && hasWrite) {
plugin.getLogger().log(Level.WARNING, "Failed to update comment for config.yml, rollback...", e);
From 133a97b7432a00a9bb6c3042533e2c461562e305 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 09:57:04 +0800
Subject: [PATCH 054/725] Handle local files loading
---
.../distributions/crowdin/CrowdinOTA.java | 33 ++++++++-----------
.../distributions/crowdin/bean/Manifest.java | 1 +
.../org/maxgamer/quickshop/util/HttpUtil.java | 26 +++++++++++++--
3 files changed, 38 insertions(+), 22 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/CrowdinOTA.java b/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/CrowdinOTA.java
index 70562c82ad..04a4554a04 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/CrowdinOTA.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/CrowdinOTA.java
@@ -29,7 +29,6 @@
import org.apache.commons.codec.digest.DigestUtils;
import org.bukkit.configuration.file.YamlConfiguration;
import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.localization.text.distributions.Distribution;
import org.maxgamer.quickshop.localization.text.distributions.crowdin.bean.Manifest;
@@ -62,7 +61,7 @@ public CrowdinOTA(QuickShop plugin) {
* @return The distribution manifest
*/
- @Nullable
+ @NotNull
public Manifest getManifest() {
return JsonUtil.regular().fromJson(getManifestJson(), Manifest.class);
}
@@ -70,12 +69,12 @@ public Manifest getManifest() {
/**
* Getting the Crowdin distribution manifest json
*
- * @return The distribution manifest json
+ * @return The distribution manifest json, return local one when failed
*/
- @Nullable
+ @NotNull
public String getManifestJson() {
String url = CROWDIN_OTA_HOST + "manifest.json";
- return HttpUtil.createGet(url);
+ return HttpUtil.createGet(url, "{\"files\":[\"\\/master\\/crowdin\\/lang\\/%locale%\\/messages.json\"],\"languages\":[\"af\",\"ar\",\"ca\",\"zh-CN\",\"zh-TW\",\"zh-HK\",\"cs\",\"da\",\"nl\",\"en\",\"fi\",\"fr\",\"de\",\"el\",\"he\",\"hu\",\"it\",\"ja\",\"ko\",\"no\",\"pl\",\"pt-PT\",\"pt-BR\",\"ro\",\"ru\",\"sr\",\"es-ES\",\"sv-SE\",\"tr\",\"uk\",\"vi\"],\"language_mapping\":{\"ro\":{\"locale\":\"ro-RO\"},\"fr\":{\"locale\":\"fr-FR\"},\"es-ES\":{\"locale\":\"es-ES\"},\"af\":{\"locale\":\"af-ZA\"},\"ar\":{\"locale\":\"ar-SA\"},\"ca\":{\"locale\":\"ca-ES\"},\"cs\":{\"locale\":\"cs-CZ\"},\"da\":{\"locale\":\"da-DK\"},\"de\":{\"locale\":\"de-DE\"},\"el\":{\"locale\":\"el-GR\"},\"fi\":{\"locale\":\"fi-FI\"},\"he\":{\"locale\":\"he-IL\"},\"hu\":{\"locale\":\"hu-HU\"},\"it\":{\"locale\":\"it-IT\"},\"ja\":{\"locale\":\"ja-JP\"},\"ko\":{\"locale\":\"ko-KR\"},\"nl\":{\"locale\":\"nl-NL\"},\"no\":{\"locale\":\"no-NO\"},\"pl\":{\"locale\":\"pl-PL\"},\"pt-PT\":{\"locale\":\"pt-PT\"},\"ru\":{\"locale\":\"ru-RU\"},\"sr\":{\"locale\":\"sr-SP\"},\"sv-SE\":{\"locale\":\"sv-SE\"},\"tr\":{\"locale\":\"tr-TR\"},\"uk\":{\"locale\":\"uk-UA\"},\"zh-CN\":{\"locale\":\"zh-CN\"},\"zh-TW\":{\"locale\":\"zh-TW\"},\"en\":{\"locale\":\"en-US\"},\"vi\":{\"locale\":\"vi-VN\"},\"pt-BR\":{\"locale\":\"pt-BR\"},\"zh-HK\":{\"locale\":\"zh-HK\"}},\"custom_languages\":[],\"timestamp\":1639272930,\"local\":true}");
}
/**
@@ -85,9 +84,6 @@ public String getManifestJson() {
* @return The language mapping
*/
public Map genLanguageMapping() {
- if (getManifestJson() == null) {
- return new HashMap<>();
- }
Map mapping = new HashMap<>();
JsonElement parser = new JsonParser().parse(getManifestJson());
for (Map.Entry set : parser.getAsJsonObject().getAsJsonObject("language_mapping").entrySet()) {
@@ -127,9 +123,6 @@ public List getAvailableLanguages() {
@NotNull
public List getAvailableFiles() {
Manifest manifest = getManifest();
- if (manifest == null) {
- return Collections.emptyList();
- }
return manifest.getFiles();
}
@@ -143,12 +136,13 @@ public List getAvailableFiles() {
public String getFile(String fileCrowdinPath, String crowdinLocale, boolean forceFlush) throws Exception {
Manifest manifest = getManifest();
// Validate
- if (manifest == null) {
- throw new IllegalStateException("Failed to get project manifest");
- }
if (!manifest.getFiles().contains(fileCrowdinPath)) {
throw new IllegalArgumentException("The file " + fileCrowdinPath + " not exists on Crowdin");
}
+ //Local stub
+ if (manifest.isLocal()) {
+ return "{}";
+ }
// if (manifest.getCustom_languages() != null && !manifest.getCustom_languages().contains(crowdinLocale)) {
// throw new IllegalArgumentException("The locale " + crowdinLocale + " not exists on Crowdin");
// }
@@ -178,10 +172,10 @@ public String getFile(String fileCrowdinPath, String crowdinLocale, boolean forc
// Out of the cache
String url = CROWDIN_OTA_HOST + "content" + fileCrowdinPath.replace("%locale%", crowdinLocale);
plugin.getLogger().info("Updating translation " + crowdinLocale + " from: " + url);
- String data = HttpUtil.createGet(url);
+ String data = HttpUtil.createGet(url, forceFlush);
if (data == null) {
// Failed to grab data
- throw new OTAException();
+ throw new OTAException("Failed to grab data");
}
// Successfully grab the data from the remote server
otaCacheControl.writeObjectCache(postProcessingPath, data.getBytes(StandardCharsets.UTF_8), manifestTimestamp);
@@ -232,10 +226,11 @@ public String getFile(String fileCrowdinPath, String crowdinLocale, boolean forc
}
@EqualsAndHashCode(callSuper = true)
- @AllArgsConstructor
- @Builder
@Data
- public static class OTAException extends Exception {
+ public static class OTAException extends RuntimeException {
+ public OTAException(String message) {
+ super(message);
+ }
}
@AllArgsConstructor
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/bean/Manifest.java b/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/bean/Manifest.java
index df7aac8ced..c80bed00e8 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/bean/Manifest.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/bean/Manifest.java
@@ -34,4 +34,5 @@ public class Manifest {
private List languages;
private List> custom_languages;
private long timestamp;
+ private boolean local;
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/HttpUtil.java b/src/main/java/org/maxgamer/quickshop/util/HttpUtil.java
index 2078ae533c..f331d3e0fd 100644
--- a/src/main/java/org/maxgamer/quickshop/util/HttpUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/HttpUtil.java
@@ -23,6 +23,7 @@
import lombok.val;
import okhttp3.*;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.io.IOException;
@@ -43,10 +44,29 @@ public static Response makeGet(@NotNull String url) throws IOException {
return client.newCall(new Request.Builder().get().url(url).build()).execute();
}
+ @NotNull
+ public static String createGet(@NotNull String url, String def) {
+ String result = createGet(url, false);
+ if (result == null) {
+ result = def;
+ }
+ requestCachePool.put(url, result);
+ return result;
+ }
+
+ @Nullable
public static String createGet(@NotNull String url) {
- String cache = requestCachePool.getIfPresent(url);
- if (cache != null) {
- return cache;
+ return createGet(url, false);
+ }
+
+ @Nullable
+ public static String createGet(@NotNull String url, boolean flushCache) {
+ String cache;
+ if (!flushCache) {
+ cache = requestCachePool.getIfPresent(url);
+ if (cache != null) {
+ return cache;
+ }
}
try (Response response = client.newCall(new Request.Builder().get().url(url).build()).execute()) {
val body = response.body();
From de4bc9c16488010329b2ff3a48cf729e2e56b984 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 10:07:59 +0800
Subject: [PATCH 055/725] Fix plugin loading stuck on i18n loading
---
.../java/org/maxgamer/quickshop/ServiceInjector.java | 4 ++--
.../game/game/MojangGameLanguageImpl.java | 11 +++++++----
.../text/distributions/crowdin/CrowdinOTA.java | 8 ++++----
.../java/org/maxgamer/quickshop/util/MsgUtil.java | 6 +++++-
4 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/ServiceInjector.java b/src/main/java/org/maxgamer/quickshop/ServiceInjector.java
index 6ffc069b70..3f47ee70ce 100644
--- a/src/main/java/org/maxgamer/quickshop/ServiceInjector.java
+++ b/src/main/java/org/maxgamer/quickshop/ServiceInjector.java
@@ -55,11 +55,11 @@ public class ServiceInjector {
}
}
- public static @NotNull GameLanguage getGameLanguage(@NotNull GameLanguage def) {
+ public static @Nullable GameLanguage getGameLanguage() {
@Nullable RegisteredServiceProvider extends GameLanguage> registeredServiceProvider =
Bukkit.getServicesManager().getRegistration(GameLanguage.class);
if (registeredServiceProvider == null) {
- return def;
+ return null;
} else {
return registeredServiceProvider.getProvider();
}
diff --git a/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java b/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java
index 521cc6d3f0..da909c4b3e 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java
@@ -62,15 +62,16 @@ public class MojangGameLanguageImpl extends BukkitGameLanguageImpl implements Ga
private final static Lock LOCK = new ReentrantLock();
private static final Condition DOWNLOAD_CONDITION = LOCK.newCondition();
private final QuickShop plugin;
+ private final String languageCode;
@Nullable
- private final JsonObject lang;
+ private volatile JsonObject lang = null;
private MojangApiMirror mirror;
@SneakyThrows
public MojangGameLanguageImpl(@NotNull QuickShop plugin, @NotNull String languageCode) {
super(plugin);
this.plugin = plugin;
- languageCode = MsgUtil.getGameLanguageCode(languageCode);
+ this.languageCode = MsgUtil.getGameLanguageCode(languageCode);
switch (plugin.getConfig().getInt("mojangapi-mirror", 0)) {
case 0:
mirror = new MojangApiOfficialMirror();
@@ -95,8 +96,9 @@ public MojangGameLanguageImpl(@NotNull QuickShop plugin, @NotNull String languag
plugin.getLogger().warning("You're selected unofficial game assets server, use at your own risk.");
break;
}
+ }
-
+ public void load() {
LOCK.lock();
try {
final GameLanguageLoadThread loadThread = new GameLanguageLoadThread(plugin, languageCode, mirror);
@@ -107,10 +109,11 @@ public MojangGameLanguageImpl(@NotNull QuickShop plugin, @NotNull String languag
plugin.getLogger().info("No longer waiting file downloading because it now timed out, now downloading in background, please reset itemi18n.yml, potioni18n.yml and enchi18n.yml after download completed.");
}
this.lang = loadThread.getLang(); // Get the Lang whatever thread running or died.
+ } catch (InterruptedException exception) {
+ plugin.getLogger().warning("Failed to wait game language thread loading");
} finally {
LOCK.unlock();
}
-
}
@Override
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/CrowdinOTA.java b/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/CrowdinOTA.java
index 04a4554a04..ccf863359d 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/CrowdinOTA.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/distributions/crowdin/CrowdinOTA.java
@@ -41,7 +41,10 @@
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.concurrent.locks.ReentrantLock;
public class CrowdinOTA implements Distribution {
@@ -108,9 +111,6 @@ public Map genLanguageMapping() {
@NotNull
public List getAvailableLanguages() {
Manifest manifest = getManifest();
- if (manifest == null) {
- return Collections.emptyList();
- }
List languages = new ArrayList<>();
Map mapping = genLanguageMapping();
for (String language : manifest.getLanguages()) {
diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
index ae202a3383..b03fe12fa2 100644
--- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
@@ -211,7 +211,11 @@ public static String getGameLanguageCode(String languageCode) {
@Unstable
@Deprecated
public static void loadGameLanguage(@NotNull String languageCode) {
- gameLanguage = ServiceInjector.getGameLanguage(new MojangGameLanguageImpl(plugin, languageCode));
+ gameLanguage = ServiceInjector.getGameLanguage();
+ if (gameLanguage == null) {
+ gameLanguage = new MojangGameLanguageImpl(plugin, languageCode);
+ ((MojangGameLanguageImpl) gameLanguage).load();
+ }
}
public static String getTranslateText(ItemStack stack) {
From 0756cbe75a3523156f376f452160c8d00fd78a6c Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 10:14:44 +0800
Subject: [PATCH 056/725] Printing errors when cannot create column
---
.../org/maxgamer/quickshop/database/SimpleDatabaseHelper.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/database/SimpleDatabaseHelper.java b/src/main/java/org/maxgamer/quickshop/database/SimpleDatabaseHelper.java
index 0ced6acd04..647d77e7d5 100644
--- a/src/main/java/org/maxgamer/quickshop/database/SimpleDatabaseHelper.java
+++ b/src/main/java/org/maxgamer/quickshop/database/SimpleDatabaseHelper.java
@@ -187,11 +187,13 @@ public void edit(PreparedStatement ps) {
@Override
public void onFailed(SQLException e) {
- Util.debugLog("Cannot create column " + columnName + " casued by:" + e.getMessage());
+ QuickShop.getInstance().getLogger().log(Level.WARNING, "Cannot create column " + columnName, e);
+ Util.debugLog("Cannot create column " + columnName + ", caused by:" + e.getMessage());
}
}));
return true;
} catch (SQLException sqlException) {
+ QuickShop.getInstance().getLogger().log(Level.WARNING, "Cannot create column " + columnName, sqlException);
Util.debugLog("Cannot create column " + columnName + " casued by:" + sqlException.getMessage());
return false;
}
From 15e11ef0365f399aeb0d962e0e50ea61bb4f7e70 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 10:34:46 +0800
Subject: [PATCH 057/725] Fix misleading message and apply tradeAllWord to
trade message
---
.../command/subcommand/SubCommand_Create.java | 2 +-
.../maxgamer/quickshop/listener/PlayerListener.java | 9 +++++----
src/main/resources/lang/messages.json | 11 ++++++-----
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Create.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Create.java
index 8aeaafa37e..3525603c73 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Create.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Create.java
@@ -152,7 +152,7 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
plugin.getShopManager().handleChat(sender, price);
return;
}
- plugin.text().of(sender, "not-looking-at-shop").send();
+ plugin.text().of(sender, "not-looking-at-valid-shop-block").send();
}
@NotNull
diff --git a/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java b/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
index f1b4e68c7a..509f324a6f 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
@@ -200,6 +200,7 @@ private void postTrade(PlayerInteractEvent e) {
final AbstractEconomy eco = plugin.getEconomy();
final double price = shop.getPrice();
final Inventory playerInventory = p.getInventory();
+ final String tradeAllWord = plugin.getConfig().getString("shop.word-for-trade-all-items", "all");
if (shop.isSelling()) {
if (shop.getRemainingStock() == 0) {
plugin.text().of(p, "purchase-out-of-stock", shop.ownerName()).send();
@@ -208,9 +209,9 @@ private void postTrade(PlayerInteractEvent e) {
final double traderBalance = eco.getBalance(p.getUniqueId(), shop.getLocation().getWorld(), shop.getCurrency());
int itemAmount = getPlayerCanBuy(shop, traderBalance, price, playerInventory);
if (shop.isStackingShop()) {
- plugin.text().of(p, "how-many-buy-stack", Integer.toString(shop.getItem().getAmount()), Integer.toString(itemAmount)).send();
+ plugin.text().of(p, "how-many-buy-stack", Integer.toString(shop.getItem().getAmount()), Integer.toString(itemAmount), tradeAllWord).send();
} else {
- plugin.text().of(p, "how-many-buy", Integer.toString(itemAmount)).send();
+ plugin.text().of(p, "how-many-buy", Integer.toString(itemAmount), tradeAllWord).send();
}
} else {
if (shop.getRemainingSpace() == 0) {
@@ -220,9 +221,9 @@ private void postTrade(PlayerInteractEvent e) {
final double ownerBalance = eco.getBalance(shop.getOwner(), shop.getLocation().getWorld(), shop.getCurrency());
int items = getPlayerCanSell(shop, ownerBalance, price, playerInventory);
if (shop.isStackingShop()) {
- plugin.text().of(p, "how-many-sell-stack", Integer.toString(shop.getItem().getAmount()), Integer.toString(items)).send();
+ plugin.text().of(p, "how-many-sell-stack", Integer.toString(shop.getItem().getAmount()), Integer.toString(items), tradeAllWord).send();
} else {
- plugin.text().of(p, "how-many-sell", Integer.toString(items)).send();
+ plugin.text().of(p, "how-many-sell", Integer.toString(items), tradeAllWord).send();
}
}
// Add the new action
diff --git a/src/main/resources/lang/messages.json b/src/main/resources/lang/messages.json
index e8f4a107ab..355f5c6138 100644
--- a/src/main/resources/lang/messages.json
+++ b/src/main/resources/lang/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &ball&a in chat, to sell all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From ca66f41f93b28b070a6ada99e4f62956ce4f1abd Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 11:41:19 +0800
Subject: [PATCH 058/725] Fix NoSuchFileException
---
.../maxgamer/quickshop/util/config/ConfigCommentUpdater.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java b/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
index 33badedf4c..671a701353 100644
--- a/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
+++ b/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
@@ -53,7 +53,7 @@ public ConfigCommentUpdater(QuickShop plugin, InputStream builtInConfig, File ex
public void updateComment() {
boolean hasBackup = false;
boolean hasWrite = false;
- Path backupFile = externalConfig.toPath().resolve(UUID.randomUUID() + "-bak.yml");
+ Path backupFile = externalConfig.toPath().getParent().resolve("config-" + UUID.randomUUID() + "-bak.yml");
try {
Files.copy(externalConfig.toPath(), backupFile, StandardCopyOption.REPLACE_EXISTING);
hasBackup = true;
From e574c33d648ecbe94538f7f40bde9e03913f8bfd Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 12:02:56 +0800
Subject: [PATCH 059/725] Loading bundled file for not internet connection
---
.../quickshop/localization/text/SimpleTextManager.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index fd030a6df8..c4efedd2cc 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -160,7 +160,9 @@ public void load() {
Util.debugLog("Loading translation for locale: " + crowdinCode + " (" + minecraftCode + ")");
// Deploy bundled to mapper
languageFilesManager.deployBundled(crowdinFile, loadBundled(crowdinFile));
- JsonConfiguration configuration = getDistributionConfiguration(crowdinFile, crowdinCode);
+ // Loading bundled file (for no internet connection or failed loading)
+ JsonConfiguration configuration = loadBundled(crowdinFile.replace("%locale%", crowdinCode));
+ applyOverrideConfiguration(configuration, getDistributionConfiguration(crowdinFile, crowdinCode));
// Loading override text (allow user modification the translation)
JsonConfiguration override = getOverrideConfiguration(crowdinFile, minecraftCode);
applyOverrideConfiguration(configuration, override);
@@ -221,7 +223,7 @@ private void applyOverrideConfiguration(@NotNull JsonConfiguration distributionC
if (content instanceof ConfigurationSection) {
continue;
}
- Util.debugLog("Override key " + key + " with content: " + content);
+ //Util.debugLog("Override key " + key + " with content: " + content);
distributionConfiguration.set(key, content);
}
}
From d531acc64ef9864ba0b270ffae0f315036d9daaa Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 12:48:20 +0800
Subject: [PATCH 060/725] Language System improvement Let
cachedGameLanguageCode only caching default one Fix stuck loading issue for
textManager Add related languages code matching, Fix #1
---
.../org/maxgamer/quickshop/QuickShop.java | 1 +
.../api/localization/text/TextManager.java | 7 +
.../localization/text/SimpleTextManager.java | 172 ++++++++++++------
.../org/maxgamer/quickshop/util/MsgUtil.java | 15 +-
4 files changed, 129 insertions(+), 66 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index 60470bebb6..edf1090cf3 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -612,6 +612,7 @@ public final void onLoad() {
this.bootError = null;
getLogger().info("Loading messages translation over-the-air (this may need take a while).");
this.textManager = new SimpleTextManager(this);
+ textManager.load();
getLogger().info("Loading up integration modules.");
this.integrationHelper = new SimpleIntegrationManager(this);
this.integrationHelper.callIntegrationsLoad(IntegrateStage.onLoadBegin);
diff --git a/src/main/java/org/maxgamer/quickshop/api/localization/text/TextManager.java b/src/main/java/org/maxgamer/quickshop/api/localization/text/TextManager.java
index bc583c3870..99ab24ed8a 100644
--- a/src/main/java/org/maxgamer/quickshop/api/localization/text/TextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/api/localization/text/TextManager.java
@@ -82,6 +82,13 @@ public interface TextManager {
@NotNull
TextList ofList(@NotNull String path, Object... args);
+ /**
+ * Return the set of available Languages
+ *
+ * @return the set of available Languages
+ */
+ List getAvailableLanguages();
+
/**
* Getting the translation with path with player's locale (if available)
*
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index c4efedd2cc..2b47d5b5f5 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -20,6 +20,8 @@
package org.maxgamer.quickshop.localization.text;
import com.dumptruckman.bukkit.configuration.json.JsonConfiguration;
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
import lombok.SneakyThrows;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
@@ -50,6 +52,8 @@
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.*;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
@@ -68,7 +72,6 @@ public SimpleTextManager(QuickShop plugin) {
plugin.getReloadManager().register(this);
plugin.getLogger().info("Translation over-the-air platform selected: Crowdin");
this.distribution = new CrowdinOTA(plugin);
- load();
}
/**
@@ -90,13 +93,7 @@ private File getOverrideFilesFolder(@NotNull String path) {
return moduleFolder;
}
- /**
- * Reset everything
- */
- private void reset() {
- languageFilesManager.reset();
- postProcessors.clear();
- }
+ private final List availableLanguages = new CopyOnWriteArrayList<>();
/**
* Loading bundled files from Jar file
@@ -132,58 +129,27 @@ private JsonConfiguration loadBundled(String file) {
return bundledLang;
}
+ private final Cache languagesCache =
+ CacheBuilder.newBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build();
+
/**
- * Loading Crowdin OTA module and i18n system
+ * Reset everything
*/
- public void load() {
- plugin.getLogger().info("Checking for translation updates, this may need a while...");
- this.reset();
- List enabledLanguagesRegex = plugin.getConfig().getStringList("enabled-languages");
- //Make sure is a lowercase regex, prevent case-sensitive and underscore issue
- for (int i = 0; i < enabledLanguagesRegex.size(); i++) {
- enabledLanguagesRegex.set(i, enabledLanguagesRegex.get(i).toLowerCase(Locale.ROOT).replace("-", "_"));
- }
- //====Multi File and Multi-Language loader start====
- //Init offline default file
- languageFilesManager.deployBundled(CROWDIN_LANGUAGE_FILE_PATH, loadBundled(CROWDIN_LANGUAGE_FILE_PATH));
- //Get language code first
- distribution.getAvailableLanguages().parallelStream().forEach(crowdinCode ->
- //Then load all the files in this language code
- distribution.getAvailableFiles().forEach(crowdinFile -> {
- try {
- // Minecraft client use lowercase
- String minecraftCode = crowdinCode.toLowerCase(Locale.ROOT).replace("-", "_");
- if (!localeEnabled(minecraftCode, enabledLanguagesRegex)) {
- Util.debugLog("Locale: " + minecraftCode + " not enabled in configuration.");
- return;
- }
- Util.debugLog("Loading translation for locale: " + crowdinCode + " (" + minecraftCode + ")");
- // Deploy bundled to mapper
- languageFilesManager.deployBundled(crowdinFile, loadBundled(crowdinFile));
- // Loading bundled file (for no internet connection or failed loading)
- JsonConfiguration configuration = loadBundled(crowdinFile.replace("%locale%", crowdinCode));
- applyOverrideConfiguration(configuration, getDistributionConfiguration(crowdinFile, crowdinCode));
- // Loading override text (allow user modification the translation)
- JsonConfiguration override = getOverrideConfiguration(crowdinFile, minecraftCode);
- applyOverrideConfiguration(configuration, override);
- // Deploy distribution to mapper
- languageFilesManager.deploy(crowdinFile, minecraftCode, configuration, loadBundled(crowdinFile));
- Util.debugLog("Locale " + crowdinFile.replace("%locale%", crowdinCode) + " has been successfully loaded");
- } // Key founds in available locales but not in custom mapping on crowdin platform
- catch (IOException e) {
- // Network error
- plugin.getLogger().log(Level.WARNING, "Couldn't update the translation for locale " + crowdinCode + " please check your network connection.", e);
- } catch (Exception e) {
- // Translation syntax error or other exceptions
- plugin.getLogger().log(Level.WARNING, "Couldn't update the translation for locale " + crowdinCode + ".", e);
- }
- }));
+ private void reset() {
+ languagesCache.cleanUp();
+ languageFilesManager.reset();
+ postProcessors.clear();
+ availableLanguages.clear();
+ }
- // Register post processor
- postProcessors.add(new FillerProcessor());
- postProcessors.add(new PlaceHolderApiProcessor());
- //We done this when deploys language
- //postProcessors.add(new ColorProcessor());
+ /**
+ * Return the set of available Languages
+ *
+ * @return the set of available Languages
+ */
+ @Override
+ public List getAvailableLanguages() {
+ return Collections.unmodifiableList(availableLanguages);
}
/**
@@ -249,6 +215,95 @@ private JsonConfiguration getDistributionConfiguration(@NotNull String distribut
return configuration;
}
+ /**
+ * Loading Crowdin OTA module and i18n system
+ */
+ public void load() {
+ plugin.getLogger().info("Checking for translation updates, this may need a while...");
+ this.reset();
+ List enabledLanguagesRegex = plugin.getConfig().getStringList("enabled-languages");
+ //Make sure is a lowercase regex, prevent case-sensitive and underscore issue
+ for (int i = 0; i < enabledLanguagesRegex.size(); i++) {
+ enabledLanguagesRegex.set(i, enabledLanguagesRegex.get(i).toLowerCase(Locale.ROOT).replace("-", "_"));
+ }
+ //====Multi File and Multi-Language loader start====
+ //Init offline default file
+ languageFilesManager.deployBundled(CROWDIN_LANGUAGE_FILE_PATH, loadBundled(CROWDIN_LANGUAGE_FILE_PATH));
+ //Get language code first
+ distribution.getAvailableLanguages().parallelStream().forEach(crowdinCode ->
+ //Then load all the files in this language code
+ distribution.getAvailableFiles().forEach(crowdinFile -> {
+ try {
+ // Minecraft client use lowercase
+ String minecraftCode = crowdinCode.toLowerCase(Locale.ROOT).replace("-", "_");
+ if (!localeEnabled(minecraftCode, enabledLanguagesRegex)) {
+ Util.debugLog("Locale: " + minecraftCode + " not enabled in configuration.");
+ return;
+ }
+ availableLanguages.add(crowdinCode);
+ Util.debugLog("Loading translation for locale: " + crowdinCode + " (" + minecraftCode + ")");
+ // Deploy bundled to mapper
+ languageFilesManager.deployBundled(crowdinFile, loadBundled(crowdinFile));
+ // Loading bundled file (for no internet connection or failed loading)
+ JsonConfiguration configuration = loadBundled(crowdinFile.replace("%locale%", crowdinCode));
+ applyOverrideConfiguration(configuration, getDistributionConfiguration(crowdinFile, crowdinCode));
+ // Loading override text (allow user modification the translation)
+ JsonConfiguration override = getOverrideConfiguration(crowdinFile, minecraftCode);
+ applyOverrideConfiguration(configuration, override);
+ // Deploy distribution to mapper
+ languageFilesManager.deploy(crowdinFile, minecraftCode, configuration, loadBundled(crowdinFile));
+ Util.debugLog("Locale " + crowdinFile.replace("%locale%", crowdinCode) + " has been successfully loaded");
+ } // Key founds in available locales but not in custom mapping on crowdin platform
+ catch (IOException e) {
+ // Network error
+ plugin.getLogger().log(Level.WARNING, "Couldn't update the translation for locale " + crowdinCode + " please check your network connection.", e);
+ } catch (Exception e) {
+ // Translation syntax error or other exceptions
+ plugin.getLogger().log(Level.WARNING, "Couldn't update the translation for locale " + crowdinCode + ".", e);
+ }
+ }));
+
+ // Register post processor
+ postProcessors.add(new FillerProcessor());
+ postProcessors.add(new PlaceHolderApiProcessor());
+ //We done this when deploys language
+ //postProcessors.add(new ColorProcessor());
+ }
+
+ private String findRelativeLanguages(String langCode) {
+ if (langCode.isEmpty()) {
+ return "en_us";
+ }
+ String result = languagesCache.getIfPresent(langCode);
+ if (result == null) {
+ result = "en_us";
+ if (availableLanguages.contains(langCode)) {
+ result = langCode;
+ } else {
+ String[] splits = langCode.split("_", 2);
+ if (splits.length != 2) {
+ for (String availableLanguage : availableLanguages) {
+ if (availableLanguage.startsWith(langCode) || availableLanguage.endsWith(langCode)) {
+ result = availableLanguage;
+ break;
+ }
+ }
+ } else {
+ String start = splits[0] + "_";
+ String end = "_" + splits[1];
+ for (String availableLanguage : availableLanguages) {
+ if (availableLanguage.startsWith(start) || availableLanguage.endsWith(end)) {
+ result = availableLanguage;
+ break;
+ }
+ }
+ }
+ }
+ }
+ languagesCache.put(langCode, result);
+ return result;
+ }
+
/**
* Getting user's override configuration for specific distribution path
*
@@ -406,7 +461,6 @@ private List postProcess(@NotNull List text) {
}
return texts;
}
-
/**
* Getting the text that use specify locale
*
@@ -416,7 +470,7 @@ private List postProcess(@NotNull List text) {
@Override
@NotNull
public List forLocale(@NotNull String locale) {
- JsonConfiguration index = mapping.get(locale);
+ JsonConfiguration index = mapping.get(manager.findRelativeLanguages(locale));
if (index == null) {
Util.debugLog("Fallback " + locale + " to default game-language locale caused by QuickShop doesn't support this locale");
String languageCode = MsgUtil.getDefaultGameLanguageCode();
diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
index b03fe12fa2..58ba8f0b61 100644
--- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
@@ -168,18 +168,20 @@ public static String fillArgs(@Nullable String raw, @Nullable String... args) {
return raw;
}
- private static Map.Entry cachedGameLanguageCode = null;
+ private volatile static Map.Entry cachedGameLanguageCode = null;
public static String getDefaultGameLanguageCode() {
- return getGameLanguageCode(plugin.getConfig().getString("game-language", "default"));
+ String languageCode = plugin.getConfig().getString("game-language", "default");
+ if (cachedGameLanguageCode != null && cachedGameLanguageCode.getKey().equals(languageCode)) {
+ return cachedGameLanguageCode.getValue();
+ }
+ String result = getGameLanguageCode(languageCode);
+ cachedGameLanguageCode = new AbstractMap.SimpleEntry<>(languageCode, result);
+ return result;
}
@Unstable
public static String getGameLanguageCode(String languageCode) {
- if (cachedGameLanguageCode != null && cachedGameLanguageCode.getKey().equals(languageCode)) {
- return cachedGameLanguageCode.getValue();
- }
- String copyCode = languageCode;
if ("default".equalsIgnoreCase(languageCode)) {
Locale locale = Locale.getDefault();
String language = locale.getLanguage();
@@ -201,7 +203,6 @@ public static String getGameLanguageCode(String languageCode) {
}
}
languageCode = languageCode.replace("-", "_").toLowerCase(Locale.ROOT);
- cachedGameLanguageCode = new AbstractMap.SimpleEntry<>(copyCode, languageCode);
return languageCode;
} else {
return languageCode.replace("-", "_").toLowerCase(Locale.ROOT);
From f28ec1adcd2bcdeb28eb51dfed0f3e9a88b4b065 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 12:49:07 +0800
Subject: [PATCH 061/725] Update languagesCache only when no cache
---
.../maxgamer/quickshop/localization/text/SimpleTextManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index 2b47d5b5f5..137d98d4f2 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -299,8 +299,8 @@ private String findRelativeLanguages(String langCode) {
}
}
}
+ languagesCache.put(langCode, result);
}
- languagesCache.put(langCode, result);
return result;
}
From 172ae9a6ccaac63f1cedcd02a72b1309e0d007f6 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 13:23:09 +0800
Subject: [PATCH 062/725] Fix misleading sell messages
---
src/main/resources/crowdin/zh-HK/messages.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/crowdin/zh-HK/messages.json b/src/main/resources/crowdin/zh-HK/messages.json
index fdf027e3e6..98a2f71dd5 100644
--- a/src/main/resources/crowdin/zh-HK/messages.json
+++ b/src/main/resources/crowdin/zh-HK/messages.json
@@ -110,7 +110,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &ball&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &ball&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -307,7 +307,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &ball&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From 4eaafb7330ce80b5e14fdabcf00cc8c896041ebf Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 13:31:28 +0800
Subject: [PATCH 063/725] Fix misleading sell messages
---
src/main/resources/lang/messages.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/lang/messages.json b/src/main/resources/lang/messages.json
index 355f5c6138..6944ca2125 100644
--- a/src/main/resources/lang/messages.json
+++ b/src/main/resources/lang/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From 97ab93bc22dfa074d2bbbd7f965a172c712d58bc Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 14:04:29 +0800
Subject: [PATCH 064/725] Try to fix crowdin issue
---
crowdin.yml | 2 +-
.../maxgamer/quickshop/localization/text/SimpleTextManager.java | 2 +-
src/main/resources/crowdin/{ => lang}/af-ZA/messages.json | 0
src/main/resources/crowdin/{ => lang}/ar-SA/messages.json | 0
src/main/resources/crowdin/{ => lang}/ca-ES/messages.json | 0
src/main/resources/crowdin/{ => lang}/cs-CZ/messages.json | 0
src/main/resources/crowdin/{ => lang}/da-DK/messages.json | 0
src/main/resources/crowdin/{ => lang}/de-DE/messages.json | 0
src/main/resources/crowdin/{ => lang}/el-GR/messages.json | 0
src/main/resources/crowdin/{ => lang}/en-US/messages.json | 0
src/main/resources/crowdin/{ => lang}/es-ES/messages.json | 0
src/main/resources/crowdin/{ => lang}/fi-FI/messages.json | 0
src/main/resources/crowdin/{ => lang}/fr-FR/messages.json | 0
src/main/resources/crowdin/{ => lang}/he-IL/messages.json | 0
src/main/resources/crowdin/{ => lang}/hu-HU/messages.json | 0
src/main/resources/crowdin/{ => lang}/it-IT/messages.json | 0
src/main/resources/crowdin/{ => lang}/ja-JP/messages.json | 0
src/main/resources/crowdin/{ => lang}/ko-KR/messages.json | 0
src/main/resources/crowdin/{ => lang}/nl-NL/messages.json | 0
src/main/resources/crowdin/{ => lang}/no-NO/messages.json | 0
src/main/resources/crowdin/{ => lang}/pl-PL/messages.json | 0
src/main/resources/crowdin/{ => lang}/pt-BR/messages.json | 0
src/main/resources/crowdin/{ => lang}/pt-PT/messages.json | 0
src/main/resources/crowdin/{ => lang}/ro-RO/messages.json | 0
src/main/resources/crowdin/{ => lang}/ru-RU/messages.json | 0
src/main/resources/crowdin/{ => lang}/sr-SP/messages.json | 0
src/main/resources/crowdin/{ => lang}/sv-SE/messages.json | 0
src/main/resources/crowdin/{ => lang}/tr-TR/messages.json | 0
src/main/resources/crowdin/{ => lang}/uk-UA/messages.json | 0
src/main/resources/crowdin/{ => lang}/vi-VN/messages.json | 0
src/main/resources/crowdin/{ => lang}/zh-CN/messages.json | 0
src/main/resources/crowdin/{ => lang}/zh-HK/messages.json | 0
src/main/resources/crowdin/{ => lang}/zh-TW/messages.json | 0
33 files changed, 2 insertions(+), 2 deletions(-)
rename src/main/resources/crowdin/{ => lang}/af-ZA/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/ar-SA/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/ca-ES/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/cs-CZ/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/da-DK/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/de-DE/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/el-GR/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/en-US/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/es-ES/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/fi-FI/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/fr-FR/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/he-IL/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/hu-HU/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/it-IT/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/ja-JP/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/ko-KR/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/nl-NL/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/no-NO/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/pl-PL/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/pt-BR/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/pt-PT/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/ro-RO/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/ru-RU/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/sr-SP/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/sv-SE/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/tr-TR/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/uk-UA/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/vi-VN/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/zh-CN/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/zh-HK/messages.json (100%)
rename src/main/resources/crowdin/{ => lang}/zh-TW/messages.json (100%)
diff --git a/crowdin.yml b/crowdin.yml
index bba8990858..a844a5a5ae 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -1,3 +1,3 @@
files:
- source: /src/main/resources/lang/*.json
- translation: /src/main/resources/crowdin/%locale%/%original_file_name%
+ translation: /**/crowdin/%locale%/%original_file_name%
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index 137d98d4f2..250ab0c382 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -110,7 +110,7 @@ private JsonConfiguration loadBundled(String file) {
InputStream stream = null;
if (!StringUtils.isEmpty(parentStr)) {
//Try to fetch matched i18n resources
- stream = plugin.getResource("crowdin/" + parentStr + "/" + fileName);
+ stream = plugin.getResource("crowdin/lang/" + parentStr + "/" + fileName);
}
if (stream == null) {
//Fallback to default
diff --git a/src/main/resources/crowdin/af-ZA/messages.json b/src/main/resources/crowdin/lang/af-ZA/messages.json
similarity index 100%
rename from src/main/resources/crowdin/af-ZA/messages.json
rename to src/main/resources/crowdin/lang/af-ZA/messages.json
diff --git a/src/main/resources/crowdin/ar-SA/messages.json b/src/main/resources/crowdin/lang/ar-SA/messages.json
similarity index 100%
rename from src/main/resources/crowdin/ar-SA/messages.json
rename to src/main/resources/crowdin/lang/ar-SA/messages.json
diff --git a/src/main/resources/crowdin/ca-ES/messages.json b/src/main/resources/crowdin/lang/ca-ES/messages.json
similarity index 100%
rename from src/main/resources/crowdin/ca-ES/messages.json
rename to src/main/resources/crowdin/lang/ca-ES/messages.json
diff --git a/src/main/resources/crowdin/cs-CZ/messages.json b/src/main/resources/crowdin/lang/cs-CZ/messages.json
similarity index 100%
rename from src/main/resources/crowdin/cs-CZ/messages.json
rename to src/main/resources/crowdin/lang/cs-CZ/messages.json
diff --git a/src/main/resources/crowdin/da-DK/messages.json b/src/main/resources/crowdin/lang/da-DK/messages.json
similarity index 100%
rename from src/main/resources/crowdin/da-DK/messages.json
rename to src/main/resources/crowdin/lang/da-DK/messages.json
diff --git a/src/main/resources/crowdin/de-DE/messages.json b/src/main/resources/crowdin/lang/de-DE/messages.json
similarity index 100%
rename from src/main/resources/crowdin/de-DE/messages.json
rename to src/main/resources/crowdin/lang/de-DE/messages.json
diff --git a/src/main/resources/crowdin/el-GR/messages.json b/src/main/resources/crowdin/lang/el-GR/messages.json
similarity index 100%
rename from src/main/resources/crowdin/el-GR/messages.json
rename to src/main/resources/crowdin/lang/el-GR/messages.json
diff --git a/src/main/resources/crowdin/en-US/messages.json b/src/main/resources/crowdin/lang/en-US/messages.json
similarity index 100%
rename from src/main/resources/crowdin/en-US/messages.json
rename to src/main/resources/crowdin/lang/en-US/messages.json
diff --git a/src/main/resources/crowdin/es-ES/messages.json b/src/main/resources/crowdin/lang/es-ES/messages.json
similarity index 100%
rename from src/main/resources/crowdin/es-ES/messages.json
rename to src/main/resources/crowdin/lang/es-ES/messages.json
diff --git a/src/main/resources/crowdin/fi-FI/messages.json b/src/main/resources/crowdin/lang/fi-FI/messages.json
similarity index 100%
rename from src/main/resources/crowdin/fi-FI/messages.json
rename to src/main/resources/crowdin/lang/fi-FI/messages.json
diff --git a/src/main/resources/crowdin/fr-FR/messages.json b/src/main/resources/crowdin/lang/fr-FR/messages.json
similarity index 100%
rename from src/main/resources/crowdin/fr-FR/messages.json
rename to src/main/resources/crowdin/lang/fr-FR/messages.json
diff --git a/src/main/resources/crowdin/he-IL/messages.json b/src/main/resources/crowdin/lang/he-IL/messages.json
similarity index 100%
rename from src/main/resources/crowdin/he-IL/messages.json
rename to src/main/resources/crowdin/lang/he-IL/messages.json
diff --git a/src/main/resources/crowdin/hu-HU/messages.json b/src/main/resources/crowdin/lang/hu-HU/messages.json
similarity index 100%
rename from src/main/resources/crowdin/hu-HU/messages.json
rename to src/main/resources/crowdin/lang/hu-HU/messages.json
diff --git a/src/main/resources/crowdin/it-IT/messages.json b/src/main/resources/crowdin/lang/it-IT/messages.json
similarity index 100%
rename from src/main/resources/crowdin/it-IT/messages.json
rename to src/main/resources/crowdin/lang/it-IT/messages.json
diff --git a/src/main/resources/crowdin/ja-JP/messages.json b/src/main/resources/crowdin/lang/ja-JP/messages.json
similarity index 100%
rename from src/main/resources/crowdin/ja-JP/messages.json
rename to src/main/resources/crowdin/lang/ja-JP/messages.json
diff --git a/src/main/resources/crowdin/ko-KR/messages.json b/src/main/resources/crowdin/lang/ko-KR/messages.json
similarity index 100%
rename from src/main/resources/crowdin/ko-KR/messages.json
rename to src/main/resources/crowdin/lang/ko-KR/messages.json
diff --git a/src/main/resources/crowdin/nl-NL/messages.json b/src/main/resources/crowdin/lang/nl-NL/messages.json
similarity index 100%
rename from src/main/resources/crowdin/nl-NL/messages.json
rename to src/main/resources/crowdin/lang/nl-NL/messages.json
diff --git a/src/main/resources/crowdin/no-NO/messages.json b/src/main/resources/crowdin/lang/no-NO/messages.json
similarity index 100%
rename from src/main/resources/crowdin/no-NO/messages.json
rename to src/main/resources/crowdin/lang/no-NO/messages.json
diff --git a/src/main/resources/crowdin/pl-PL/messages.json b/src/main/resources/crowdin/lang/pl-PL/messages.json
similarity index 100%
rename from src/main/resources/crowdin/pl-PL/messages.json
rename to src/main/resources/crowdin/lang/pl-PL/messages.json
diff --git a/src/main/resources/crowdin/pt-BR/messages.json b/src/main/resources/crowdin/lang/pt-BR/messages.json
similarity index 100%
rename from src/main/resources/crowdin/pt-BR/messages.json
rename to src/main/resources/crowdin/lang/pt-BR/messages.json
diff --git a/src/main/resources/crowdin/pt-PT/messages.json b/src/main/resources/crowdin/lang/pt-PT/messages.json
similarity index 100%
rename from src/main/resources/crowdin/pt-PT/messages.json
rename to src/main/resources/crowdin/lang/pt-PT/messages.json
diff --git a/src/main/resources/crowdin/ro-RO/messages.json b/src/main/resources/crowdin/lang/ro-RO/messages.json
similarity index 100%
rename from src/main/resources/crowdin/ro-RO/messages.json
rename to src/main/resources/crowdin/lang/ro-RO/messages.json
diff --git a/src/main/resources/crowdin/ru-RU/messages.json b/src/main/resources/crowdin/lang/ru-RU/messages.json
similarity index 100%
rename from src/main/resources/crowdin/ru-RU/messages.json
rename to src/main/resources/crowdin/lang/ru-RU/messages.json
diff --git a/src/main/resources/crowdin/sr-SP/messages.json b/src/main/resources/crowdin/lang/sr-SP/messages.json
similarity index 100%
rename from src/main/resources/crowdin/sr-SP/messages.json
rename to src/main/resources/crowdin/lang/sr-SP/messages.json
diff --git a/src/main/resources/crowdin/sv-SE/messages.json b/src/main/resources/crowdin/lang/sv-SE/messages.json
similarity index 100%
rename from src/main/resources/crowdin/sv-SE/messages.json
rename to src/main/resources/crowdin/lang/sv-SE/messages.json
diff --git a/src/main/resources/crowdin/tr-TR/messages.json b/src/main/resources/crowdin/lang/tr-TR/messages.json
similarity index 100%
rename from src/main/resources/crowdin/tr-TR/messages.json
rename to src/main/resources/crowdin/lang/tr-TR/messages.json
diff --git a/src/main/resources/crowdin/uk-UA/messages.json b/src/main/resources/crowdin/lang/uk-UA/messages.json
similarity index 100%
rename from src/main/resources/crowdin/uk-UA/messages.json
rename to src/main/resources/crowdin/lang/uk-UA/messages.json
diff --git a/src/main/resources/crowdin/vi-VN/messages.json b/src/main/resources/crowdin/lang/vi-VN/messages.json
similarity index 100%
rename from src/main/resources/crowdin/vi-VN/messages.json
rename to src/main/resources/crowdin/lang/vi-VN/messages.json
diff --git a/src/main/resources/crowdin/zh-CN/messages.json b/src/main/resources/crowdin/lang/zh-CN/messages.json
similarity index 100%
rename from src/main/resources/crowdin/zh-CN/messages.json
rename to src/main/resources/crowdin/lang/zh-CN/messages.json
diff --git a/src/main/resources/crowdin/zh-HK/messages.json b/src/main/resources/crowdin/lang/zh-HK/messages.json
similarity index 100%
rename from src/main/resources/crowdin/zh-HK/messages.json
rename to src/main/resources/crowdin/lang/zh-HK/messages.json
diff --git a/src/main/resources/crowdin/zh-TW/messages.json b/src/main/resources/crowdin/lang/zh-TW/messages.json
similarity index 100%
rename from src/main/resources/crowdin/zh-TW/messages.json
rename to src/main/resources/crowdin/lang/zh-TW/messages.json
From 662205bd29245c4fe230a0d175d522b12949005b Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 14:09:27 +0800
Subject: [PATCH 065/725] Update Crowdin configuration file
---
crowdin.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crowdin.yml b/crowdin.yml
index a844a5a5ae..ba89c9604a 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -1,3 +1,3 @@
files:
- source: /src/main/resources/lang/*.json
- translation: /**/crowdin/%locale%/%original_file_name%
+ translation: /**/crowdin/lang/%locale%/%original_file_name%
From 210dff8b15768cd31351b4943d89ba6420311ca2 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 17:44:25 +0800
Subject: [PATCH 066/725] Try to fix crowdin issue again
---
crowdin.yml | 2 +-
.../resources/crowdin => crowdin}/lang/af-ZA/messages.json | 0
.../resources/crowdin => crowdin}/lang/ar-SA/messages.json | 0
.../resources/crowdin => crowdin}/lang/ca-ES/messages.json | 0
.../resources/crowdin => crowdin}/lang/cs-CZ/messages.json | 0
.../resources/crowdin => crowdin}/lang/da-DK/messages.json | 0
.../resources/crowdin => crowdin}/lang/de-DE/messages.json | 0
.../resources/crowdin => crowdin}/lang/el-GR/messages.json | 0
.../resources/crowdin => crowdin}/lang/en-US/messages.json | 0
.../resources/crowdin => crowdin}/lang/es-ES/messages.json | 0
.../resources/crowdin => crowdin}/lang/fi-FI/messages.json | 0
.../resources/crowdin => crowdin}/lang/fr-FR/messages.json | 0
.../resources/crowdin => crowdin}/lang/he-IL/messages.json | 0
.../resources/crowdin => crowdin}/lang/hu-HU/messages.json | 0
.../resources/crowdin => crowdin}/lang/it-IT/messages.json | 0
.../resources/crowdin => crowdin}/lang/ja-JP/messages.json | 0
.../resources/crowdin => crowdin}/lang/ko-KR/messages.json | 0
.../resources/crowdin => crowdin}/lang/nl-NL/messages.json | 0
.../resources/crowdin => crowdin}/lang/no-NO/messages.json | 0
.../resources/crowdin => crowdin}/lang/pl-PL/messages.json | 0
.../resources/crowdin => crowdin}/lang/pt-BR/messages.json | 0
.../resources/crowdin => crowdin}/lang/pt-PT/messages.json | 0
.../resources/crowdin => crowdin}/lang/ro-RO/messages.json | 0
.../resources/crowdin => crowdin}/lang/ru-RU/messages.json | 0
.../resources/crowdin => crowdin}/lang/sr-SP/messages.json | 0
.../resources/crowdin => crowdin}/lang/sv-SE/messages.json | 0
.../resources/crowdin => crowdin}/lang/tr-TR/messages.json | 0
.../resources/crowdin => crowdin}/lang/uk-UA/messages.json | 0
.../resources/crowdin => crowdin}/lang/vi-VN/messages.json | 0
.../resources/crowdin => crowdin}/lang/zh-CN/messages.json | 0
.../resources/crowdin => crowdin}/lang/zh-HK/messages.json | 0
.../resources/crowdin => crowdin}/lang/zh-TW/messages.json | 0
pom.xml | 5 +++++
33 files changed, 6 insertions(+), 1 deletion(-)
rename {src/main/resources/crowdin => crowdin}/lang/af-ZA/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/ar-SA/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/ca-ES/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/cs-CZ/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/da-DK/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/de-DE/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/el-GR/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/en-US/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/es-ES/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/fi-FI/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/fr-FR/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/he-IL/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/hu-HU/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/it-IT/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/ja-JP/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/ko-KR/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/nl-NL/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/no-NO/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/pl-PL/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/pt-BR/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/pt-PT/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/ro-RO/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/ru-RU/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/sr-SP/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/sv-SE/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/tr-TR/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/uk-UA/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/vi-VN/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/zh-CN/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/zh-HK/messages.json (100%)
rename {src/main/resources/crowdin => crowdin}/lang/zh-TW/messages.json (100%)
diff --git a/crowdin.yml b/crowdin.yml
index ba89c9604a..15ad6b03b9 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -1,3 +1,3 @@
files:
- source: /src/main/resources/lang/*.json
- translation: /**/crowdin/lang/%locale%/%original_file_name%
+ translation: /crowdin/lang/%locale%/%original_file_name%
diff --git a/src/main/resources/crowdin/lang/af-ZA/messages.json b/crowdin/lang/af-ZA/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/af-ZA/messages.json
rename to crowdin/lang/af-ZA/messages.json
diff --git a/src/main/resources/crowdin/lang/ar-SA/messages.json b/crowdin/lang/ar-SA/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/ar-SA/messages.json
rename to crowdin/lang/ar-SA/messages.json
diff --git a/src/main/resources/crowdin/lang/ca-ES/messages.json b/crowdin/lang/ca-ES/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/ca-ES/messages.json
rename to crowdin/lang/ca-ES/messages.json
diff --git a/src/main/resources/crowdin/lang/cs-CZ/messages.json b/crowdin/lang/cs-CZ/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/cs-CZ/messages.json
rename to crowdin/lang/cs-CZ/messages.json
diff --git a/src/main/resources/crowdin/lang/da-DK/messages.json b/crowdin/lang/da-DK/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/da-DK/messages.json
rename to crowdin/lang/da-DK/messages.json
diff --git a/src/main/resources/crowdin/lang/de-DE/messages.json b/crowdin/lang/de-DE/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/de-DE/messages.json
rename to crowdin/lang/de-DE/messages.json
diff --git a/src/main/resources/crowdin/lang/el-GR/messages.json b/crowdin/lang/el-GR/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/el-GR/messages.json
rename to crowdin/lang/el-GR/messages.json
diff --git a/src/main/resources/crowdin/lang/en-US/messages.json b/crowdin/lang/en-US/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/en-US/messages.json
rename to crowdin/lang/en-US/messages.json
diff --git a/src/main/resources/crowdin/lang/es-ES/messages.json b/crowdin/lang/es-ES/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/es-ES/messages.json
rename to crowdin/lang/es-ES/messages.json
diff --git a/src/main/resources/crowdin/lang/fi-FI/messages.json b/crowdin/lang/fi-FI/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/fi-FI/messages.json
rename to crowdin/lang/fi-FI/messages.json
diff --git a/src/main/resources/crowdin/lang/fr-FR/messages.json b/crowdin/lang/fr-FR/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/fr-FR/messages.json
rename to crowdin/lang/fr-FR/messages.json
diff --git a/src/main/resources/crowdin/lang/he-IL/messages.json b/crowdin/lang/he-IL/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/he-IL/messages.json
rename to crowdin/lang/he-IL/messages.json
diff --git a/src/main/resources/crowdin/lang/hu-HU/messages.json b/crowdin/lang/hu-HU/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/hu-HU/messages.json
rename to crowdin/lang/hu-HU/messages.json
diff --git a/src/main/resources/crowdin/lang/it-IT/messages.json b/crowdin/lang/it-IT/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/it-IT/messages.json
rename to crowdin/lang/it-IT/messages.json
diff --git a/src/main/resources/crowdin/lang/ja-JP/messages.json b/crowdin/lang/ja-JP/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/ja-JP/messages.json
rename to crowdin/lang/ja-JP/messages.json
diff --git a/src/main/resources/crowdin/lang/ko-KR/messages.json b/crowdin/lang/ko-KR/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/ko-KR/messages.json
rename to crowdin/lang/ko-KR/messages.json
diff --git a/src/main/resources/crowdin/lang/nl-NL/messages.json b/crowdin/lang/nl-NL/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/nl-NL/messages.json
rename to crowdin/lang/nl-NL/messages.json
diff --git a/src/main/resources/crowdin/lang/no-NO/messages.json b/crowdin/lang/no-NO/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/no-NO/messages.json
rename to crowdin/lang/no-NO/messages.json
diff --git a/src/main/resources/crowdin/lang/pl-PL/messages.json b/crowdin/lang/pl-PL/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/pl-PL/messages.json
rename to crowdin/lang/pl-PL/messages.json
diff --git a/src/main/resources/crowdin/lang/pt-BR/messages.json b/crowdin/lang/pt-BR/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/pt-BR/messages.json
rename to crowdin/lang/pt-BR/messages.json
diff --git a/src/main/resources/crowdin/lang/pt-PT/messages.json b/crowdin/lang/pt-PT/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/pt-PT/messages.json
rename to crowdin/lang/pt-PT/messages.json
diff --git a/src/main/resources/crowdin/lang/ro-RO/messages.json b/crowdin/lang/ro-RO/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/ro-RO/messages.json
rename to crowdin/lang/ro-RO/messages.json
diff --git a/src/main/resources/crowdin/lang/ru-RU/messages.json b/crowdin/lang/ru-RU/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/ru-RU/messages.json
rename to crowdin/lang/ru-RU/messages.json
diff --git a/src/main/resources/crowdin/lang/sr-SP/messages.json b/crowdin/lang/sr-SP/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/sr-SP/messages.json
rename to crowdin/lang/sr-SP/messages.json
diff --git a/src/main/resources/crowdin/lang/sv-SE/messages.json b/crowdin/lang/sv-SE/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/sv-SE/messages.json
rename to crowdin/lang/sv-SE/messages.json
diff --git a/src/main/resources/crowdin/lang/tr-TR/messages.json b/crowdin/lang/tr-TR/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/tr-TR/messages.json
rename to crowdin/lang/tr-TR/messages.json
diff --git a/src/main/resources/crowdin/lang/uk-UA/messages.json b/crowdin/lang/uk-UA/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/uk-UA/messages.json
rename to crowdin/lang/uk-UA/messages.json
diff --git a/src/main/resources/crowdin/lang/vi-VN/messages.json b/crowdin/lang/vi-VN/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/vi-VN/messages.json
rename to crowdin/lang/vi-VN/messages.json
diff --git a/src/main/resources/crowdin/lang/zh-CN/messages.json b/crowdin/lang/zh-CN/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/zh-CN/messages.json
rename to crowdin/lang/zh-CN/messages.json
diff --git a/src/main/resources/crowdin/lang/zh-HK/messages.json b/crowdin/lang/zh-HK/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/zh-HK/messages.json
rename to crowdin/lang/zh-HK/messages.json
diff --git a/src/main/resources/crowdin/lang/zh-TW/messages.json b/crowdin/lang/zh-TW/messages.json
similarity index 100%
rename from src/main/resources/crowdin/lang/zh-TW/messages.json
rename to crowdin/lang/zh-TW/messages.json
diff --git a/pom.xml b/pom.xml
index 0cf5c12936..319deedfce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -338,6 +338,11 @@
false
src/main/resources/lang
+
+ crowdin/lang
+ false
+ crowdin/lang
+
From 5930b732be5956209728c1947d31081f7bd3f0db Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:00 +0800
Subject: [PATCH 067/725] New translations messages.json (Romanian)
---
crowdin/lang/ro-RO/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/ro-RO/messages.json b/crowdin/lang/ro-RO/messages.json
index e728af2cc7..063641d296 100644
--- a/crowdin/lang/ro-RO/messages.json
+++ b/crowdin/lang/ro-RO/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.\".",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aIntra in chat, cat de mult doresti sa ai &dSELL&a. Ai &{0}&un disponibil. Introdu &ball&la chat, pentru a vinde pe toate.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cNu poti crea un magazin aici.",
"blacklisted-item": "&cNu poti vinde acest obiect pentru ca este pe lista neagra",
"how-much-to-trade-for": "&aIntra in chat, cat de mult doresti sa tranzacționezi &{1}x {0}&a.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From ea66c3cf690004cf030980af7a1373d031875a3b Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:01 +0800
Subject: [PATCH 068/725] New translations messages.json (Dutch)
---
crowdin/lang/nl-NL/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/nl-NL/messages.json b/crowdin/lang/nl-NL/messages.json
index 0b0ab273e5..94e7a52854 100644
--- a/crowdin/lang/nl-NL/messages.json
+++ b/crowdin/lang/nl-NL/messages.json
@@ -5,7 +5,8 @@
"translation-version": "ondersteunende versie: Reremake",
"translation-contributors": "Medewerkers",
"translation-country": "Taal Zone: Engels (nl_US)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing van een QuickShop vergrendeling!",
"that-is-locked": "&cDeze winkel is vergrendeld.",
- "how-many-buy": "&aEnter in de chat, hoeveel je wilt om &bBUY&a. Je kunt &e{0}&a kopen. Voer &ball&a in om ze allemaal te kopen.",
- "how-many-sell": "&aEnter in de chat, hoeveel je wilt met &dSELL&a. Je hebt &e{0}&a beschikbaar. Voer &ball&een in de chat in om alles te verkopen.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cU kunt hier geen winkel aanmaken.",
"blacklisted-item": "&cJe kunt dit item niet verkopen omdat het op de zwarte lijst staat",
"how-much-to-trade-for": "&aEnter in de chat, voor hoeveel u wilt handelen &e{1}x {0}&a.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cU kunt niet handelen met deze winkel omdat deze bevroren is.",
"shop-freezed-at-location": "&eUw winkel {0} om {1} is bevroren!",
"denied-put-in-item": "&cU kunt dit item niet in uw winkel plaatsen!",
- "how-many-buy-stack": "&eEnter in de chat, hoeveel bulks u wenst te &bBUY&a. Er zijn &{0}&een items in elk bulk en je kunt &e{1}&een aantal soorten kopen. Voer &ball&in de chat in om alles te kopen.",
- "how-many-sell-stack": "&aEnter in de chat, hoeveel bulk u wenst te &dSELL&a. Er zijn &e{0}&een items per bulk en je hebt &e{1}&een bulks beschikbaar. Voer &ball&een in de chat in om alles te verkopen.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNaam: &6{0}",
"code": "&eCode: &6{0}",
From 1395d7b88cd7023028a669749b0377e182efe329 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:02 +0800
Subject: [PATCH 069/725] New translations messages.json (Portuguese,
Brazilian)
---
crowdin/lang/pt-BR/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/pt-BR/messages.json b/crowdin/lang/pt-BR/messages.json
index dfb85bf924..b02c7138c7 100644
--- a/crowdin/lang/pt-BR/messages.json
+++ b/crowdin/lang/pt-BR/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cIgnorarando um bloqueio da loja!",
"that-is-locked": "&cEssa loja está bloqueada.",
- "how-many-buy": "&aEscreva quantos você deseja &bCOMPRAR&a no chat. Você pode comprar até &e{0}&a. Digite &ball&a para comprar tudo.",
- "how-many-sell": "&aEscreva quantos você deseja &bVENDER&a no chat. Você pode vender até &e{0}&a. Digite &ball&a para vender tudo.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cVocê não pode criar uma loja aqui.",
"blacklisted-item": "&cVocê não pode vender este item porque ele está na lista negra",
"how-much-to-trade-for": "&aDigite no chat, por quanto você deseja vender &e{1}x {0}&a.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cVocê não pode negociar com esta loja porque ela está congelada.",
"shop-freezed-at-location": "&eA sua loja {0} em {1} foi congelada!",
"denied-put-in-item": "&CVocê não pode colocar este item na sua loja!",
- "how-many-buy-stack": "&aDigite quantos pacotes você deseja &bCOMPRAR&a no chat. Há &e{0}&a itens em cada pacote e você pode comprar &e{1}&a pacote(s). Digite &ball&a para comprar todos.",
- "how-many-sell-stack": "&aDigite no chat, quantos pacotes você deseja &eVENDER&a. Há &e{0}&a itens em cada pacote e você tem &e{1}&a pacotes disponíveis. Digite &ball no chat para vender tudo.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNome: &6{0}",
"code": "&eCódigo: &6{0}",
From d34559356a4d3fe5ca8b78d29cfa8a4438aaab38 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:03 +0800
Subject: [PATCH 070/725] New translations messages.json (Vietnamese)
---
crowdin/lang/vi-VN/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/vi-VN/messages.json b/crowdin/lang/vi-VN/messages.json
index 80f8db7c36..855e9a339c 100644
--- a/crowdin/lang/vi-VN/messages.json
+++ b/crowdin/lang/vi-VN/messages.json
@@ -5,7 +5,8 @@
"translation-version": "Phiên bản hỗ trợ: Reremake",
"translation-contributors": "Người đóng góp: huyhhuy",
"translation-country": "Vùng ngôn ngữ: Tiếng Việt (vi_VN)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "&cKhông thể tìm ra QuickShop. Bạn cần phải nhìn vào nó trước.",
"no-anythings-in-your-hand": "&cChẳng có gì trong tay bạn cả.",
"no-permission": "&cBạn không có quyền làm thế.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aNhập vào chat số lượng bạn muốn &bMUA&a. Hiện tại có thể mua tổng cộng &e{0}&a. Nhập vào &ball&a để mua hết.",
- "how-many-sell": "&aNhập vào chat số lượng bạn muốn &dBÁN&a. Bạn có thể bán &e{0}&a. Nhập vào &ball&a để bán hết chúng.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From e8b83280affcffdaf92630e5e8b8bf0460e42af7 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:04 +0800
Subject: [PATCH 071/725] New translations messages.json (English)
---
crowdin/lang/en-US/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/en-US/messages.json b/crowdin/lang/en-US/messages.json
index 50de1bf7fb..06bd26e436 100644
--- a/crowdin/lang/en-US/messages.json
+++ b/crowdin/lang/en-US/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "&cCould not find a QuickShop. Make sure you look at one.",
"no-anythings-in-your-hand": "&cThere is nothing in your hand.",
"no-permission": "&cYou do not have permission to do that.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how many you wish to &dSELL&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From 6d036662726a2e2248d07fb59a83424b684a26f8 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:05 +0800
Subject: [PATCH 072/725] New translations messages.json (Chinese Traditional)
---
crowdin/lang/zh-TW/messages.json | 43 ++++++++++++++++----------------
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/crowdin/lang/zh-TW/messages.json b/crowdin/lang/zh-TW/messages.json
index 46c1c14553..113cac97a5 100644
--- a/crowdin/lang/zh-TW/messages.json
+++ b/crowdin/lang/zh-TW/messages.json
@@ -5,7 +5,8 @@
"translation-version": "支持版本 : Reremake (重製版)",
"translation-contributors": "貢獻人員 : Timtower、Netherfoam、KaiNoMood、Mgazul、JackTheChicken 和 Andre_601",
"translation-country": "語言 : &b&l繁體中文 Chinese Traditional (zh_TW)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "&c無法找到儲物箱商店,你需要注視著儲物箱。",
"no-anythings-in-your-hand": "&c手上沒有任何東西。",
"no-permission": "&4你沒有使用該指令的權限。",
@@ -68,7 +69,7 @@
"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。",
+ "warn-to-paste": "&e正在收集資料並上傳到 Pastebin ,這可能需要一點時間。&c&l警告 : &c資料上傳後,此連結會公開一星期 ! 可能會洩漏伺服器中的設定或其它資料。請確保傳送此連結的人是 &l伺服器員工或開發者&c。",
"price-too-high": "&c商店價格太高了 ! 請設定在 {0} 元以內。",
"you-cant-create-shop-in-there": "&c你沒有在這個地方建立商店的權限。",
"unknown-player": "&c找不到相對應的玩家,請檢查你輸入的玩家名稱是否正確。",
@@ -109,8 +110,8 @@
},
"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賣出全部。",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&c你無法在此建立商店。",
"blacklisted-item": "&c由於這是黑名單的物品,所以你不能賣。",
"how-much-to-trade-for": "&a請在聊天室中輸入你想買賣 &e{1} 個 {0} &a的價格。",
@@ -179,7 +180,7 @@
"lock": "&e切換商店上鎖狀態",
"taxaccount": "&e設定商店使用的稅金帳戶",
"toggledisplay": "&e切換商店顯示物品狀態",
- "purge": "&eStart the shop purge task in background"
+ "purge": "&e在背景啟動商店清理任務"
},
"disabled": "&c這個指令被停用 : &e{0}",
"feature-not-enabled": "該功能沒有在設定檔案中啟用。"
@@ -229,8 +230,8 @@
"lock-hover": "&e開啟/關閉商店鎖保護。",
"freeze": "&e凍結模式 : &b{0} &e[&d&l切換&e]",
"freeze-hover": "&e切換商店凍結狀態。",
- "toggledisplay": "&eDisplayItem: &b{0} &e[&d&lToggle&e]",
- "toggledisplay-hover": "&eToggle the shop's displayitem status"
+ "toggledisplay": "&e懸浮物顯示 : &b{0} &e[&d&l切換&e]",
+ "toggledisplay-hover": "&e切換商店是否顯示懸浮物"
},
"tableformat": {
"full_line": "+---------------------------------------------------+",
@@ -306,8 +307,8 @@
"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 來售出所有物品。",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&e名稱 : &6{0}",
"code": "&e代碼 : &6{0}",
@@ -324,7 +325,7 @@
"backup-success": "&a備份成功。",
"console-only": "&c該指令只能在控制台執行。",
"console-only-danger": "&c由於這個是一個有風險的指令,請你在控制台中執行。",
- "clean-warning": "&eThis command will purge &call &eshops if the shop is corrupted, 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.",
+ "clean-warning": "&e該指令將清理&c所有&e在不允許建立商店的世界的──出售/購買不允許的物品,以及&c&l所有在伺服器沒有載入世界的商店,請確保你的商店資料備份完整後繼續使用 &b/qs cleanghost confirm &e。",
"shop-creation-failed": "&c商店建立失敗,請與伺服器管理員聯繫。",
"shop-owner-self-trade": "&e你正在跟自己開的商店進行交易 , 所以你的存款不會改變。",
"chest-title": "QuickShop 商店",
@@ -333,19 +334,19 @@
"unlimited-shop-owner-keeped": "&e注意 : 該商店店主還是屬於無限商店店主類型,你需要自己重新設定新的商店店主。",
"server-crash-warning": "&c如果你更換或刪除 QuickShop 插件 Jar 檔案後,執行指令 /qs reload 可能導致伺服器崩潰。",
"reloading-status": {
- "success": "&aReload completed without any errors.",
- "require-restart": "&aReload completed. &e(Some changes require server restart to affect)",
- "failed": "&cReload failed, check the server console",
- "scheduled": "&aReload completed. &7(Some changes required a while to affect)"
+ "success": "&a重新載入且沒有發生任何錯誤。",
+ "require-restart": "&a重新載入完成。&e(一些更改需要重新啟動伺服器後作用)",
+ "failed": "&c無法重新載入,請檢查伺服器控制台",
+ "scheduled": "&a重新載入完成。&e(一些更改需要一段時間後作用)"
},
- "client-language-changed": "&aQuickShop detected your client language setting has been changed, we're now using {0} locale for you.",
- "client-language-unsupported": "&eQuickShop doesn't support your client language, we're fallback to {0} locale now.",
+ "client-language-changed": "&aQuickShop 偵測到你的客戶端語言已切換,我們現在為你切換為 {0}。",
+ "client-language-unsupported": "&eQuickShop 不支援你的客戶端語言,我們現在還原為 {0}。",
"taxaccount-set": "&a已經設定 &e{0} &a為該商店的稅金帳戶",
"taxaccount-unset": "&a該商店的稅金帳戶現在按照伺服器全域設定。",
"taxaccount-invalid": "&c無效的目標帳戶,請輸入有效的玩家名稱或 uuid(須加破折號)。",
- "display-turn-on": "&aSuccessfully turn on the shop display.",
- "display-turn-off": "&aSuccessfully turn off the shop display.",
- "shop-purged-start": "&aShop purge started, check the console for details.",
- "purchase-out-of-stock": "&cThis shop run out of the stock, Contact shop owner or staffs to refill the stock.",
- "purchase-out-of-space": "&cThis shop run out of the space, Contact shop owner or staffs to empty the shop."
+ "display-turn-on": "&a成功開啟商店懸浮物顯示",
+ "display-turn-off": "&a成功關閉商店懸浮物顯示",
+ "shop-purged-start": "&a已開始商店清理,請查看控制台以獲得詳細資訊。",
+ "purchase-out-of-stock": "&c該商店已缺貨,請聯繫商店商店店主或商店員工補充庫存。",
+ "purchase-out-of-space": "&c該商店空間不足,請聯繫商店商店店主或商店員工清空商店。"
}
From 0524dc4d86b375131d40a6821fbcdb318575bc09 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:06 +0800
Subject: [PATCH 073/725] New translations messages.json (Chinese Simplified)
---
crowdin/lang/zh-CN/messages.json | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/crowdin/lang/zh-CN/messages.json b/crowdin/lang/zh-CN/messages.json
index c44a3e629e..832a52161e 100644
--- a/crowdin/lang/zh-CN/messages.json
+++ b/crowdin/lang/zh-CN/messages.json
@@ -5,7 +5,8 @@
"translation-version": "支持版本:Reremake",
"translation-contributors": "开发贡献者:Timtower, Netherfoam, KaiNoMood JackTheChicken 和 Andre_601",
"translation-country": "本地化语言:简体中文 (zh_CN)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&c无法找到创建商店的方块,您需要注视着一个商店方块",
"not-looking-at-shop": "&c无法找到商店,您需要注视着你想要操作的商店。",
"no-anythings-in-your-hand": "&c你的手里没有任何物品。",
"no-permission": "&c你没有权限这样做。",
@@ -109,8 +110,8 @@
},
"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 来出售全部。",
+ "how-many-buy": "&a在聊天中输入您想要&b购买&a的数量。您可以购买&e{0}&a个,输入&b{1}&a以购买全部。",
+ "how-many-sell": "&a聊天栏中输入想 &d出售 &a的物品数量. 您的背包中拥有 &e{0} &a件物品。输入 &b{1}&a 来出售全部物品。",
"not-allowed-to-create": "&c你不能在这里创建商店",
"blacklisted-item": "&c这件物品已经被拉黑,你不能出售它",
"how-much-to-trade-for": "&a请在聊天中输入交易&e{1}个{0}&a所需的价格。",
@@ -306,8 +307,8 @@
"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在聊天栏中输入你想 &d卖&a 的份数. 每份中有 &e{0}&a 个该物品, 你目前拥有 &e{1}&a 份这样的物品可卖出,输入 &ball&a 以卖出所有此项物品。",
+ "how-many-buy-stack": "&a聊天栏中输入你想&b买&a的份数. 每份中有 &e{0}&a 个该物品, 你可以买 &e{1}&a 份. 输入 &b{2}&a 以买下所有该物品.",
+ "how-many-sell-stack": "&a在聊天栏中输入你想 &d卖&a 的份数. 每份中有 &e{0}&a 个该物品, 你目前拥有 &e{1}&a 份这样的物品可卖出,输入 &b{2}&a 以卖出所有此项物品。",
"language": {
"name": "&e名称: &6{0}",
"code": "&e代码: &6{0}",
@@ -326,7 +327,7 @@
"console-only-danger": "&c这是一个危险的命令,只有控制台才能执行它。",
"clean-warning": "&e这个命令将清理&c所有&e在不允许创建商店的世界的、出售/购买不允许的物品的,以及 &c&l所有在服务器没有加载的世界的商店, 请在确保您的商店数据备份完整后使用 &b/qs cleanghost confirm &e来继续。",
"shop-creation-failed": "&c商店创建失败,请与服务器管理员联系。",
- "shop-owner-self-trade": "&e你正在和自己的商店进行交易,你可能不会得到任何钱。",
+ "shop-owner-self-trade": "&e你正在和自己的商店进行交易,所以你的金钱可能并不会增长。",
"chest-title": "QuickShop商店",
"command-type-mismatch": "&c此命令只能由 &b{0} 执行。",
"unlimited-shop-owner-changed": "&e这个无限商店的店主已更改为 {0}。",
From 27a91525ff8cc2a82e3cce16c71102a513c4a062 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:07 +0800
Subject: [PATCH 074/725] New translations messages.json (Ukrainian)
---
crowdin/lang/uk-UA/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/uk-UA/messages.json b/crowdin/lang/uk-UA/messages.json
index e8f4a107ab..355f5c6138 100644
--- a/crowdin/lang/uk-UA/messages.json
+++ b/crowdin/lang/uk-UA/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &ball&a in chat, to sell all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From ec64063b8d596ff0baee3f2ea4bf9321de19717b Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:08 +0800
Subject: [PATCH 075/725] New translations messages.json (Turkish)
---
crowdin/lang/tr-TR/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/tr-TR/messages.json b/crowdin/lang/tr-TR/messages.json
index 2137576bd7..6dfa9ceca3 100644
--- a/crowdin/lang/tr-TR/messages.json
+++ b/crowdin/lang/tr-TR/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBir QuickShop kilidi atlanıyor!",
"that-is-locked": "&cBu market kilitli.",
- "how-many-buy": "&aNe kadar &bSATIN ALMAK&a istediğini sohbete yaz. &e{0}&a tane satın alabilirsiniz. Hepsini satın almak için &ball&a yaz.",
- "how-many-sell": "&aNe kadar &dSATMAK&a istediğini sohbete yaz. &e{0}&a tane satabilirsiniz. Hepsini satmak için &ball&a yaz.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cBurada bir market oluşturamazsın.",
"blacklisted-item": "&cBu öğeyi satamazsın çünkü kara listede",
"how-much-to-trade-for": "&e{1} &atane &e{0} &aiçin ne kadar ticaret yapmak istediğini sohbete yaz.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cBu markette ticaret yapamazsın çünkü donmuş.",
"shop-freezed-at-location": "{1} yerindeki {0} marketiniz donduruldu!",
"denied-put-in-item": "&cBu öğeyi marketine koyamazsın!",
- "how-many-buy-stack": "&aKaç yığın &bALMAK&a istediğini sohbete yaz. Her yığında &e{0}&a öğe var ve &e{1}&a yığın alabilirsin. Hepsini almak için &ball&a yaz.",
- "how-many-sell-stack": "&aKaç yığın &bSATMAK&a istediğini sohbete yaz. Her yığında &e{0}&a öğe var ve &e{1}&a yığın alabilirsin. Hepsini almak için &ball&a yaz.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eİsim: &6{0}",
"code": "&eKod: &6{0}",
From 3ebfeba8c3b32f47f99fa529a2118067946e883e Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:09 +0800
Subject: [PATCH 076/725] New translations messages.json (Swedish)
---
crowdin/lang/sv-SE/messages.json | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/crowdin/lang/sv-SE/messages.json b/crowdin/lang/sv-SE/messages.json
index 002d151ba0..dff733d05c 100644
--- a/crowdin/lang/sv-SE/messages.json
+++ b/crowdin/lang/sv-SE/messages.json
@@ -5,7 +5,8 @@
"translation-version": "Supportversion: Reremake",
"translation-contributors": "Medhjälpare: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken och Andre_601",
"translation-country": "Språkområde: Svenska (sv_SE)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cIgnorerar ett butikslås!",
"that-is-locked": "&cDenna butik är låst.",
- "how-many-buy": "&aAnge i chatten, hur många du vill &bKÖPA&a. Du kan köpa &e{0}&a. Ange &ball&a för att köpa alla.",
- "how-many-sell": "&aAnge i chatten, hur mycket du vill &dSÄLJA&a. Du har &{0}& tillgängliga. Ange &ball&a i chatten, för att sälja alla.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cDu får inte skapa en butik här.",
"blacklisted-item": "&cDu kan inte sälja detta föremål eftersom det finns på svartlistan",
"how-much-to-trade-for": "&aAnge i chatten, hur mycket du vill sälja &e{1}x {0}&a för.",
@@ -127,7 +128,7 @@
"no-owner-given": "&cIngen ägare angiven",
"new-owner": "&aNy ägare: &e{0}",
"now-buying": "&dBUYING&a numera&e{0}",
- "now-selling": "&bSELLING&a numera&e{0}",
+ "now-selling": "&bSÄLJER &anumera &e{0}",
"cleaning": "&aTar bort tomma butiker...",
"reloading": "&aKonfiguration laddad. &eVissa ändringar kan kräva omstart för att påverka. \n&7(Notis: Laddningsbeteende har ändrats efter 4.. 9.10, vi nu bara ladda om konfigurationen men inte hela plugin för att säkerställa att servern inte kraschar.)",
"cleaned": "&aTog bort &{0}&a butiker.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cDu kan inte handla med denna butik eftersom den är fryst.",
"shop-freezed-at-location": "&eDin butik {0} vid {1} blev frusen!",
"denied-put-in-item": "&cDu kan inte lägga in detta objekt i din butik!",
- "how-many-buy-stack": "&eAnge i chatten, hur många paket du vill &bKÖPA&a. Det finns &e{0}&a föremål i varje paket och du kan köpa &e{1}&a paket. Ange &ball&a i chatten för att köpa alla.",
- "how-many-sell-stack": "&aAnge i chatten, hur många paket du vill &dSÄLJA&a. Det finns &e{0}&a föremål per paket och du har &e{1}&a paket tillgängliga. Ange &ball&a i chatten för att sälja alla.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNamn: &6{0}",
"code": "&eKod: &6{0}",
From db4df239e2932caa23f355188dec9b44a226e5dc Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:10 +0800
Subject: [PATCH 077/725] New translations messages.json (Serbian (Cyrillic))
---
crowdin/lang/sr-SP/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/sr-SP/messages.json b/crowdin/lang/sr-SP/messages.json
index e8f4a107ab..355f5c6138 100644
--- a/crowdin/lang/sr-SP/messages.json
+++ b/crowdin/lang/sr-SP/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &ball&a in chat, to sell all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From 84d95227ade1c2c32f4e0edf0bc89781d996846e Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:11 +0800
Subject: [PATCH 078/725] New translations messages.json (Russian)
---
crowdin/lang/ru-RU/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/ru-RU/messages.json b/crowdin/lang/ru-RU/messages.json
index 13d686c998..a8d6a51692 100644
--- a/crowdin/lang/ru-RU/messages.json
+++ b/crowdin/lang/ru-RU/messages.json
@@ -5,7 +5,8 @@
"translation-version": "Поддерживаемая версия: Reremake",
"translation-contributors": "Участники: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken и Andre_601",
"translation-country": "Языковой регион: Русский (ru_RU)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cНе удалось найти блок для создания магазина. Вас нужно посмотреть.",
"not-looking-at-shop": "&cНе удалось найти магазин, возможно не зарегистрирован.",
"no-anythings-in-your-hand": "&cУ вас ничего нет в руках.",
"no-permission": "&cУ вас нет прав.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "Обход блокировки магазина!",
"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 чтобы продать все.",
+ "how-many-buy": "&aВведите в чат, сколько вы хотите &bКУПИТЬ&a. Вы можете купить &e{0}&a. Введите &b{1}&a чтобы купить их все.",
+ "how-many-sell": "&aВведите в чат, сколько вы хотите &dПРОДАТЬ&a. У вас есть &e{0}&a. Введите &b{1}&a в чате, чтобы продать все.",
"not-allowed-to-create": "&cВы не можете создать магазин здесь.",
"blacklisted-item": "&cВы не можете продать, оно находится в черном списке",
"how-much-to-trade-for": "&aВводите в чат, сколько вы хотите обменивать &e{1}x {0}&a.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cВы не можете торговать с этим магазином, потому что он заморожен.",
"shop-freezed-at-location": "&eВаш магазин {0} на {1} был заморожен!",
"denied-put-in-item": "&cВы не можете поместить этот товар в ваш магазин!",
- "how-many-buy-stack": "&eВведите в чат, сколько массу вы хотите &bКУПИТЬ&а. &e{0} товар в каждой массой и вы можете купить за &e{1}&a. Введите &ball&a в чате, чтобы купить все.",
- "how-many-sell-stack": "&eВведите в чат, сколько массу вы хотите &bПРОДАТЬ&а. &e{0} товар в каждой массой и вы можете продать за &e{1}&a. Введите &ball&a в чате, чтобы купить все.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eИмя: &6{0}",
"code": "&eКод: &6{0}",
From 061e014a2b1c7fcf66f5af77e0e8e8d30c53e207 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:12 +0800
Subject: [PATCH 079/725] New translations messages.json (Portuguese)
---
crowdin/lang/pt-PT/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/pt-PT/messages.json b/crowdin/lang/pt-PT/messages.json
index f6b3a929af..9f07f977c3 100644
--- a/crowdin/lang/pt-PT/messages.json
+++ b/crowdin/lang/pt-PT/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.",
"no-anythings-in-your-hand": "&Não tens nada na mão.",
"no-permission": "&cNão tens permissão para fazer isso.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &ball&a in chat, to sell all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From e7909408fb46928b56d2eaab78242dd53b6a2922 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:13 +0800
Subject: [PATCH 080/725] New translations messages.json (Polish)
---
crowdin/lang/pl-PL/messages.json | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/crowdin/lang/pl-PL/messages.json b/crowdin/lang/pl-PL/messages.json
index bf180a7311..59e99d605b 100644
--- a/crowdin/lang/pl-PL/messages.json
+++ b/crowdin/lang/pl-PL/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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ć.",
@@ -93,7 +94,7 @@
"stored-enchants": "&5Przechowywane Enchanty",
"shop-information": "&aInfo:",
"owner": "&aWłaściciel: {0}",
- "item": "&aItem: &e{0}",
+ "item": "&aPrzedmiot: &e{0}",
"item-holochat-error": "&c[Error]",
"preview": "&b[Podgląd przedmiotu]",
"space": "&aMiejsce: &e{0}",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cOmijanie blokady QuickShop!",
"that-is-locked": "&cTen sklep jest zablokowany.",
- "how-many-buy": "&aWpisz ilość jaką chcesz &bKUPIĆ&a na czacie. Możesz kupić &e{0}&a. Wpisz &ball&a, jeśli chcesz kupić wszystko.",
- "how-many-sell": "&aWpisz ilość jaką chcesz &dSPRZEDAĆ&a na chat. Posiadasz &e{0}&a przedmiotów. Wpisz &ball&a, jeśli chcesz sprzedać wszystko.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cTu nie zrobisz sklepu.",
"blacklisted-item": "&cNie możesz sprzedać tego przedmiotu, ponieważ znajduje się na czarnej liście",
"how-much-to-trade-for": "&aWpisz na czacie cenę za &e{1}x {0}&a.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cNie możesz handlować z tym sklepem, ponieważ jest zamrożony.",
"shop-freezed-at-location": "&eTwój sklep {0} w {1} został zamrożony!",
"denied-put-in-item": "&cNie możesz umieścić tego przedmiotu w swoim sklepie!",
- "how-many-buy-stack": "&eWejdź na czat, ile jednostek chcesz &bBUY&a. &Istnieją &{0} przedmioty w każdym zbiorze i możesz kupić &{1} luzek. Wprowadź &ball&na czacie, aby kupić wszystko.",
- "how-many-sell-stack": "&aWejdź na czat, ile chcesz do &dSELL&a. Istnieje &{0} przedmiotów &luzem i masz &{1} luzem. Wprowadź &ball&na czacie, aby sprzedać wszystkie.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNazwa: &6{0}",
"code": "&eKod: &6{0}",
From 88b8b6d731be33ba593abc90ded2c77d586581ab Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:14 +0800
Subject: [PATCH 081/725] New translations messages.json (Norwegian)
---
crowdin/lang/no-NO/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/no-NO/messages.json b/crowdin/lang/no-NO/messages.json
index dce6f3eb5a..5ea6911012 100644
--- a/crowdin/lang/no-NO/messages.json
+++ b/crowdin/lang/no-NO/messages.json
@@ -5,7 +5,8 @@
"translation-version": "Støttet versjon: Reremake",
"translation-contributors": "Bidragsytere: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
"translation-country": "Språksone: Norsk (no_NO)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "&cKunne ikke finne en QuickShop. Du må se på en butikk.",
"no-anythings-in-your-hand": "&cDet er ingenting i hånden din.",
"no-permission": "&cDu har ikke tillatelse til å gjøre det.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cIgnorerer en QuickShop lås!",
"that-is-locked": "&cDenne butikken er låst.",
- "how-many-buy": "&aSkriv i chat hvor mange du ønsker å &bKJØPE&a. Du kan kjøpe maks &e{0}&a. Skriv &ball&a om du vil kjøpe alle.",
- "how-many-sell": "&aSkriv i chat hvor mange du ønsker å &dSELGE&a. Du har &e{0}&a tilgjengelig. Skriv &ball&a for å selge alle.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cDu kan ikke opprette en butikk her.",
"blacklisted-item": "&cDu kan ikke selge denne gjenstanden fordi den er på svartelisten",
"how-much-to-trade-for": "&aSkriv i chat hvor mye du ønsker å selge &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cDu kan ikke handle med denne butikken fordi den er frosset.",
"shop-freezed-at-location": "&eDin butikk {0} på {1} ble frosset!",
"denied-put-in-item": "&cDu kan ikke legge denne varen i butikken din!",
- "how-many-buy-stack": "&eSkriv i chat hvor mange pakker du ønsker å &bKJØPE&a. Det er &e{0}&a varer i hver pakke og du kan kjøpe totalt &e{1}&a pakker. Skriv &ball&a om du vil kjøpe alle.",
- "how-many-sell-stack": "&eSkriv i chat hvor mange pakker du ønsker å &bSELGE&a. Det er &e{0}&a varer i hver pakke og du har &e{1}&a pakker tilgjengelig. Skriv &ball&a om du vil selge alle.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNavn: &6{0}",
"code": "&eKode: &6{0}",
From a599cfba2b0d4f4ed65d7a265e159ead84bafba5 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:14 +0800
Subject: [PATCH 082/725] New translations messages.json (Korean)
---
crowdin/lang/ko-KR/messages.json | 55 ++++++++++++++++----------------
1 file changed, 28 insertions(+), 27 deletions(-)
diff --git a/crowdin/lang/ko-KR/messages.json b/crowdin/lang/ko-KR/messages.json
index 7b6899e0c9..e4a95d75c3 100644
--- a/crowdin/lang/ko-KR/messages.json
+++ b/crowdin/lang/ko-KR/messages.json
@@ -1,11 +1,12 @@
{
"_comment": "안녕하세요 번역가님! 만약 당신이 깃헙이나 소스코드에서 번역 중이라면 다음 사이트를 가보시기 바래요! https://crowdin.com/project/quickshop-reremake",
"file-test": "이것은텍스트파일일까요? 한국어 일까yo? :)",
- "translation-author": "번역: Chicki_yeah(번역에 이상한 부분이 있다면 치키이예#0032로 연락해주시면 수정하겠습니다.), jho5245, Kim dong kwon, Ppag",
+ "translation-author": "번역: Chicki_yeah(번역에 이상한 부분이 있다면 치키이예#0032로 연락해주시면 수정하겠습니다.)",
"translation-version": "지원 버전: Reremake",
"translation-contributors": "기여자: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
"translation-country": "언어 지역: 한국어 (ko_KR)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&c상점을 만들수 잇는 블럭을 찾을수 없습니다. 상점으로 만들 블럭을 봐야합니다.",
"not-looking-at-shop": "&c상점을 찾을수 없습니다. 상점을 보고있어야만 합니다.",
"no-anythings-in-your-hand": "&c당신의 손에 아무것도 없습니다.",
"no-permission": "&c당신에게는 이것을 사용할 권한이 없습니다.",
@@ -15,32 +16,32 @@
"no-creative-break": "&c크리에이티브 모드 상태론 다른 플레이어의 상점을 파괴할 수 없습니다, 서바이벌 모드로 전환하거나 슈퍼툴 {0} 을(를) 사용해주세요.",
"trading-in-creative-mode-is-disabled": "&c크리에이티브 모드 상태에서는 상점에서 거래할 수 없습니다.",
"supertool-is-disabled": "&c슈퍼툴이 비활성화 되어있습니다. 어느 상점도 부술 수 없습니다.",
- "no-double-chests": "&c당신은 큰상자(일반 상자를 두개붙인)를 이용한 상점을 만들 수 없습니다.",
+ "no-double-chests": "&c당신은 큰상자(일반 상자를 두개붙인)를 이용한 상점을 만들 수 없습니다. (권한 부족입니다.)",
"not-managed-shop": "&c당신은 상점의 주인이나 관리자가 아닙니다",
"shop-already-owned": "&c이것은 이미 상점입니다.",
"chest-was-removed": "&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}원)",
+ "player-bought-from-your-store-tax": "&c{0} 님이 상점 에서 {2} 을(를) {1}개 구입했으며 {3} 원 을(를) 얻으셨습니다! (세금 : {4}원)",
"you-cant-afford-to-change-price": "&c상점 물품의 가격을 변경할때 {0} 원이 소모됩니다.",
"success-created-shop": "&c상점이 정상적으로 생성되었습니다.",
"success-removed-shop": "&a상점을 제거했습니다.",
"shops-arent-locked": "&c기억하세요, 상점은 도둑질로부터 보호되지 &4&l않습니다!!! &c도둑질로부터 보호하고 싶으면 잠금 플러그인을 이용하여 상자를 잠궈주세요!",
"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} 을 입력하였습니다.",
+ "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자바에서 허용하는 최대 값을 초과했습니다.",
- "not-a-integer": "&c당신은 숫자만을 입력해야하지만 {0} 을 입력하였습니다.",
+ "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} 의 공간 만 있습니다.",
- "you-dont-have-that-many-items": "&c유저님은 {0} {1} 밖에 없습니다.",
+ "shop-has-no-space": "&c{1} 의 공간은 {0} 칸만 있습니다.",
+ "you-dont-have-that-many-items": "&c{1} 개를 판매하기엔 갯수가 모자랍니다. 소유중 갯수 {0}",
"the-owner-cant-afford-to-buy-from-you": "&c비용은 {0} 이지만, 상점의 주인이 {1} 원을 가지고 있습니다. (상점 주인의 잔액이 부족합니다.)",
- "player-sold-to-your-store": "&a{0} 님이 {1} {2} 을 (를) 유저님의 상점에 판매했습니다.",
+ "player-sold-to-your-store": "&a{0} 님이 {2} {1} 개을 (를) 유저님의 상점에 판매했습니다.",
"shop-out-of-space": "&5유저님의 {0}, {1}, {2} 에 있는 상점이 가득 찼습니다. 더 이상 구매할 수 없습니다! 계속 구매를 원하신다면 상자를 비워주세요!",
"fee-charged-for-price-change": "&a가격 변경비&c{0} 원을 &a지불 하였습니다.",
"price-is-now": "&a새로운 상점의 가격은 &e{0}&a입니다.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&a QuickShop의 잠금을 무시합니다!",
"that-is-locked": "&c이 상점은 잠겨있습니다.",
- "how-many-buy": "&a채팅으로 원하는 &b구매&a 개수를 입력해주세요. 당신은 &e{0}&a개를 구매할 수 있습니다. &ball&a을 입력해 전부 구매 가능합니다.",
- "how-many-sell": "&a채팅으로 원하는 &b판매&a 개수를 입력해주세요. 당신은 &e{0}&a개를 판매할 수 있습니다. &ball&a을 입력해 전부 판매 할 수 있습니다.",
+ "how-many-buy": "&a채팅으로 원하는 &b구매&a 개수를 입력해주세요. 당신은 &e{0}&a개를 구매할 수 있습니다. &b{1}&a을 입력해 전부 구매 가능합니다.",
+ "how-many-sell": "&a채팅으로 원하는 &b판매&a 개수를 입력해주세요. 당신은 &e{0}&a개를 판매할 수 있습니다. &b{1}&a을 입력해 전부 판매 할 수 있습니다.",
"not-allowed-to-create": "&c 당신은 이곳에 상점을 만들수 없습니다.",
"blacklisted-item": "&c당신은 이아이템을 판매할수 없습니다. 블랙리스트에 등록되어있는 아이템입니다.",
"how-much-to-trade-for": "&a채팅에 {0}의 {1}개당 가격을 얼마로 할건지 입력해주세요.",
@@ -187,11 +188,11 @@
"signs": {
"selling": "&6판매 {0} 개",
"stack-selling": "&6판매중 {0} 개",
- "header": "{1}{0}",
+ "header": "{1}{0}의 상점",
"buying": "&b구매 {0} 개",
"stack-buying": "&b구매중 {0} 개",
- "item-left": "&f",
- "item-right": "&f",
+ "item-left": "",
+ "item-right": "",
"price": "개당 {0}",
"stack-price": "아이템 {2}, {1} 개당 {0}원",
"unlimited": "무제한",
@@ -243,9 +244,9 @@
"failed": "&c✘"
},
"tabcomplete": {
- "price": "[가격]",
- "range": "[범위]",
- "amount": "[수량]",
+ "price": "[price]",
+ "range": "[range]",
+ "amount": "[amount]",
"currency": "[통화명]",
"item": "[item]"
},
@@ -274,11 +275,11 @@
],
"remote-disable-warning": "이 버전의 QuickShop은 원격 서버에 의해 비활성화되어 있습니다. 이 버전에는 심각한 문제가 있을 수 있습니다. SpigotMC 페이지에서 자세한 내용을 확인하십시오 : {0}.이 경고는 당신이 안정된 버전을 사용할 때까지 뜰 것입니다. 서버 구동에는 영향을 주지 않습니다.",
"label": {
- "unstable": "[불안정함]",
- "stable": "[안정됨]",
- "lts": "[장기 지원 버전]",
- "qualityverifyed": "[품질]",
- "github": "[깃헙(GitHub)]",
+ "unstable": "[불안정함] [Unstable]",
+ "stable": "[안정됨] [Stable]\n",
+ "lts": "[장기 지원 버전] [LTS]",
+ "qualityverifyed": "[품질] [Quality]",
+ "github": "[깃헙(GitHub)] [GitHub]",
"spigotmc": "[SpigotMC]",
"bukkitdev": "[BukkitDev]",
"master": "[Master]"
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&c이 상점은 얼어있기때문에 거래할 수 없습니다.",
"shop-freezed-at-location": "&e당신의 상점 {1} 에 있는 {0} 이 얼었습니다!",
"denied-put-in-item": "&c당신은 이아이템을 당신에 상점에 넣을수 없습니다!!",
- "how-many-buy-stack": "&e채팅에 입력하세요, 묶음을 얼마나 &b구매&a할것인지 &e{0}&a 개의 아이템의 하나의 묶음마다 들어있으며 당신은 &e{1}&a개의 묶음을 구매할수 있습니다 &ball&a을 입력하여 모두 구매할수 있습니다",
- "how-many-sell-stack": "&e채팅에 입력하세요, 묶음을 얼마나 &d판매&a할것인지 &e{0}&a 개의 아이템의 하나의 묶음마다 들어있으며 당신은 &e{1}&a개의 묶음을 가지고 있습니다 &ball&a을 입력하여 모두 판매할수 있습니다",
+ "how-many-buy-stack": "&e채팅에 입력하세요, 묶음을 얼마나 &b구매&a할것인지 &e{0}&a 개의 아이템의 하나의 묶음마다 들어있으며 당신은 &e{1}&a개의 묶음을 구매할수 있습니다 &b{2}&a을 입력하여 모두 구매할수 있습니다",
+ "how-many-sell-stack": "&e채팅에 입력하세요, 묶음을 얼마나 &d판매&a할것인지 &e{0}&a 개의 아이템의 하나의 묶음마다 들어있으며 당신은 &e{1}&a개의 묶음을 가지고 있습니다 &b{2}&a을 입력하여 모두 판매할수 있습니다",
"language": {
"name": "&e이름: &6{0}",
"code": "&e코드: &6{0}",
From 19b206b23876f9c85f31bf24cb85e823e8efd043 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:16 +0800
Subject: [PATCH 083/725] New translations messages.json (French)
---
crowdin/lang/fr-FR/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/fr-FR/messages.json b/crowdin/lang/fr-FR/messages.json
index 31fc00db68..206e0ddd3e 100644
--- a/crowdin/lang/fr-FR/messages.json
+++ b/crowdin/lang/fr-FR/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cContournement d'un verrou de QuickShop!",
"that-is-locked": "&cCette boutique est verouillée.",
- "how-many-buy": "&aEntrez le nombre d'objets que vous souhaitez &bACHETER&a dans le chat. Vous en avez &e{0}&a dans votre inventaire. Entrez &ball&a pour tous les acheter.",
- "how-many-sell": "&aEntrez le nombre d'objets que vous souhaitez &bVENDRE&a dans le chat. Vous en avez &e{0}&a dans votre inventaire. Entrez &ball&a pour tous les vendre.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cVous ne pouvez pas créer un shop ici.",
"blacklisted-item": "&cVous ne pouvez pas vendre cet objet car il se trouve sur la liste noire",
"how-much-to-trade-for": "&aEntrez dans le chat, combien vous souhaitez échanger &e{1}x {0}&a.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cVous ne pouvez pas échanger avec cette boutique car elle est gelée.",
"shop-freezed-at-location": "&eVotre boutique {0} à {1} a été gelée!",
"denied-put-in-item": "&cVous ne pouvez pas mettre cet objet dans votre boutique!",
- "how-many-buy-stack": "&eEntrez dans le tchat, combien de blocs vous souhaitez &bACHETER&a. Il y a &e{0}&a articles dans chaque vrac et vous pouvez acheter &e{1}&a vrac. Entrez &ball&a dans le chat pour tout acheter.",
- "how-many-sell-stack": "&eEntrez dans le chat, combien de blocs vous souhaitez &bACHETER&a. Il y a &e{0}&a articles dans chaque vrac et vous pouvez acheter &e{1}&a vrac. Entrez &ball&a dans le chat pour tout acheter.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNom: &6{0}",
"code": "&eNom: &6{0}",
From 549592335c0fc69c2d2e2c81f49fd15bddfc8e67 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:17 +0800
Subject: [PATCH 084/725] New translations messages.json (Japanese)
---
crowdin/lang/ja-JP/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/ja-JP/messages.json b/crowdin/lang/ja-JP/messages.json
index f1401c89a9..3980d77329 100644
--- a/crowdin/lang/ja-JP/messages.json
+++ b/crowdin/lang/ja-JP/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "&cQuickShopが見つかりませんでした。確認する必要があります。",
"no-anythings-in-your-hand": "&cあなたは手に何も持っていません。",
"no-permission": "&cあなたは権限を持っていないため実行できません。",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cQuickShopロックをバイパスします!",
"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で全て売却",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cあなたはここでショップを作る事ができません",
"blacklisted-item": "&cブラックリストに載っているので、この商品を販売することはできません",
"how-much-to-trade-for": "&aチャットで&e{1}個の {0}&aをいくらで取引したいか入力してください。",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&c凍結されているため、このショップと取引できません。",
"shop-freezed-at-location": "&e {0} のショップ {1} が凍結されました!",
"denied-put-in-item": "&cショップにこのアイテムを入れることはできません!",
- "how-many-buy-stack": "&eチャットで&b購入&aしたい商品の数を入力して下さい。1つの商品に &e{0} 個&a のアイテムが含まれており、あなたは&e{1} つ&a の商品を購入することができます。すべて購入するにはチャットで &ball&a と入力して下さい。",
- "how-many-sell-stack": "&eチャットで&b売却&aしたい商品の数を入力して下さい。1つの商品に &e{0} 個&a のアイテムが含まれており、あなたは&e{1} つ&a の商品を売却することができます。すべて売却するにはチャットで &ball&a と入力して下さい。",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&e名前: &6{0}",
"code": "&eコード: &6{0}",
From df476d2cc92dda65e46d3c562b846b9addb20420 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:18 +0800
Subject: [PATCH 085/725] New translations messages.json (Italian)
---
crowdin/lang/it-IT/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/it-IT/messages.json b/crowdin/lang/it-IT/messages.json
index 3287d3a88c..b020cdc808 100644
--- a/crowdin/lang/it-IT/messages.json
+++ b/crowdin/lang/it-IT/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassa un blocco QuickShop!",
"that-is-locked": "&cQuesto negozio è bloccato.",
- "how-many-buy": "&aScrivi in chat, quanti vuoi &bCOMPRARE&a. Puoi comprare &e{0}&a. Scrivi &ball&a per comprarli tutti.",
- "how-many-sell": "&aScrivi in chat, quanti vuoi a &dVENDERE&. Hai &e{0}&a disponibile. Scrivi &ball&a in chat, per venderne tutti.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cNon puoi creare un negozio qui.",
"blacklisted-item": "&cNon puoi vendere questo oggetto perché è nella blacklist",
"how-much-to-trade-for": "&aScrivi in chat, per quanto desideri fare trading &e{1}x {0}&a.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cNon puoi operare con questo negozio perché è congelato.",
"shop-freezed-at-location": "&eIl tuo negozio {0} a {1} è stato congelato!",
"denied-put-in-item": "&cNon puoi mettere questo oggetto nel tuo negozio!",
- "how-many-buy-stack": "&eScrivi in chat, quale è la quantità di massa per &bACQUISTARE&a. Ci sono &e{0}&a oggetti in ogni massa e puoi comprare &e{1}&a masse. Inserisci &ball&a in chat per comprare tutto.",
- "how-many-sell-stack": "&eScrivi in chat, quale è la quantità di massa per &bVENDERE&a. Ci sono &e{0}&a oggetti in ogni massa e puoi comprare &e{1}&a masse. Inserisci &ball&a in chat per vendere tutto.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNome: &6{0}",
"code": "&eCodice: &6{0}",
From 8c1da4b39c04e8b1dbf3c891c76178a734fe20d3 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:19 +0800
Subject: [PATCH 086/725] New translations messages.json (Hungarian)
---
crowdin/lang/hu-HU/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/hu-HU/messages.json b/crowdin/lang/hu-HU/messages.json
index 6fac070b60..0f45240212 100644
--- a/crowdin/lang/hu-HU/messages.json
+++ b/crowdin/lang/hu-HU/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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!",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cA &agyorsbolt&c zárva van",
"that-is-locked": "&cEz a bolt le van zárva.",
- "how-many-buy": "&aÍrd be, hogy mennyit szeretnél &bvenni&a a chatre. Tudsz venni &e{0}t&a. Írd be azt, hogy &ball&a, ha meg szeretnéd venni az összeset.",
- "how-many-sell": "&aÍrd be, hogy mennyit szeretnél &deladni&a a chatre. Neked összesen van:&e{0}d&a. Írd be, hogy &ball&a, ha el szeretnéd adni az összeset.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cNem tudsz boltot létrehozni itt.",
"blacklisted-item": "&cEz a tárgy a feketelistán van! Nem tudod eladni!",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop cause it under freezing.",
"shop-freezed-at-location": "&eA te boltod: {0}, itt: {1}, le lett fagyasztva!",
"denied-put-in-item": "&cThis item cannot put in this shop!",
- "how-many-buy-stack": "&aEnter how many bulks you wish to &bBUY&a in chat. There have &e{0}&a items in each bulk and You can buy &e{1}&a bulks. Enter &ball&a to buy them all.",
- "how-many-sell-stack": "&aEnter how many bulks you wish to &dSELL&a in chat. There have &e{0}&a items in each bulk and You have &e{1}&a bulks available. Enter &ball&a to sell them all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&aNév: &6{0}",
"code": "&eKód: &6{0}",
From 41229daae54ada581450e08b73b2c004f7fcbab0 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:19 +0800
Subject: [PATCH 087/725] New translations messages.json (Hebrew)
---
crowdin/lang/he-IL/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/he-IL/messages.json b/crowdin/lang/he-IL/messages.json
index e8f4a107ab..355f5c6138 100644
--- a/crowdin/lang/he-IL/messages.json
+++ b/crowdin/lang/he-IL/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &ball&a in chat, to sell all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From 9e86aa7289ada9c973f29ad523440f220c0e9c7e Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:21 +0800
Subject: [PATCH 088/725] New translations messages.json (Finnish)
---
crowdin/lang/fi-FI/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/fi-FI/messages.json b/crowdin/lang/fi-FI/messages.json
index 7e6292f989..9f6f0834d7 100644
--- a/crowdin/lang/fi-FI/messages.json
+++ b/crowdin/lang/fi-FI/messages.json
@@ -5,7 +5,8 @@
"translation-version": "Tuettu versio: Reremake",
"translation-contributors": "Avustajat: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
"translation-country": "Kielialue: Suomi (fi_FI)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cOhitetaan QuickShop lukitus!",
"that-is-locked": "&cTämä kauppa on lukossa.",
- "how-many-buy": "&aKirjoita chattiin, kuinka monta haluat &bOSTAA&a. Voit ostaa &e{0}&a. Kirjoita &ball&a ostaaksesi kaiken.",
- "how-many-sell": "&aKirjoita chattiin, kuinka monta haluat &bMYYDÄ&a. Sinulla on &e{0}&a saatavilla. Kirjoita &ball&a myydäksesi kaiken.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cEt luultavasti voi luoda kauppaa tänne.",
"blacklisted-item": "&cEt voi myydä tätä tavaraa, koska se on mustalla listalla",
"how-much-to-trade-for": "&aKirjoita chattiin, mihin hintaan haluat vaihtaa &e{1}x {0}&a.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cEt voi vaihtaa tämän kaupan kanssa, koska se on jäässä.",
"shop-freezed-at-location": "&eKauppasi {0} {1} jäätyi!",
"denied-put-in-item": "&cEt voi laittaa tätä tavaraa kauppaasi!",
- "how-many-buy-stack": "&eKirjoita chattiin, kuinka monta bulkkitavaraa haluat &bOSTAA&a. Yhdessä bulkissa on &e{0}&a tavaraa ja voit ostaa &e{1}&a bulkkia. Kirjoita chattiin &ball&a ostaaksesi kaiken.",
- "how-many-sell-stack": "&eKirjoita chattiin, kuinka monta bulkkitavaraa haluat &bMYYDÄ&a. Yhdessä bulkissa on &e{0}&a tavaraa ja sinulla on &e{1}&a bulkkia käytössä. Kirjoita chattiin &ball&a myydäksesi kaiken.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNimi: &6{0}",
"code": "&eKoodi: &6{0}",
From abc4a1b02b8f58d04f8c722e88ae63220a20e03a Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:22 +0800
Subject: [PATCH 089/725] New translations messages.json (Greek)
---
crowdin/lang/el-GR/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/el-GR/messages.json b/crowdin/lang/el-GR/messages.json
index e8f4a107ab..355f5c6138 100644
--- a/crowdin/lang/el-GR/messages.json
+++ b/crowdin/lang/el-GR/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &ball&a in chat, to sell all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From d205c9a95b9dda3978642e086dba67452cc1a76d Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:22 +0800
Subject: [PATCH 090/725] New translations messages.json (German)
---
crowdin/lang/de-DE/messages.json | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/crowdin/lang/de-DE/messages.json b/crowdin/lang/de-DE/messages.json
index 458564ca3a..b6d32f97c6 100644
--- a/crowdin/lang/de-DE/messages.json
+++ b/crowdin/lang/de-DE/messages.json
@@ -5,7 +5,8 @@
"translation-version": "Unterstütze Version: Reremake",
"translation-contributors": "Mitwirkende: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken und Andre_601",
"translation-country": "Sprache: Deutsch (de_DE)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "&cKonnte keinen QuickShop finden. Du musst auf einen schauen.",
"no-anythings-in-your-hand": "&cEs befindet sich nichts in deiner Hand.",
"no-permission": "&cDu hast keine Berechtigung um das zu tun.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cUmgehe eine QuickShop Sicherung!",
"that-is-locked": "&cDieser Shop ist geschützt.",
- "how-many-buy": "&aSchreibe in den Chat, wieviele du &bKAUFEN&a möchtest. Du kannst &e{0}&a Stück kaufen. Gib &ball&a ein um alle zu kaufen.",
- "how-many-sell": "&aSchreibe in den Chat, wieviele du &dVERKAUFEN&a willst. Du hast &e{0}&a verfügbar. Gib &ball&a in den Chat ein um alles zu verkazfen.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cDu kannst hier keinen Shop erstellen.",
"blacklisted-item": "&cDu kannst dieses Item nicht verkaufen, da es auf der schwarzen Liste steht",
"how-much-to-trade-for": "&aGib im Chat ein, für wieviel du {1}x &e{0}&a handeln willst.",
@@ -162,7 +163,7 @@
"paste": "&eLädt Serverdaten zu Pastebin hoch",
"staff": "&eVerwalte deine Shopmitarbeiter",
"remove": "&eEntfernt den Shop, den du ansiehst",
- "amount": "&eZum Festlegen der Itenanzahl (Nützlich bei Chatproblemen)",
+ "amount": "&eZum Festlegen der Itemanzahl (Nützlich bei Chatproblemen)",
"about": "&eZeigt QuickShop Informationen",
"help": "&eZeigt QuickShop-Hilfe",
"item": "&eÄndert das Shopitem eines Shops",
@@ -194,7 +195,7 @@
"item-right": "",
"price": "{0} p. St.",
"stack-price": "{0} pro {1}x {2}",
- "unlimited": "Unlimitiert ",
+ "unlimited": "Unlimitiert",
"status-available": "&a",
"status-unavailable": "&c",
"out-of-stock": "Ausverkauft",
@@ -219,8 +220,8 @@
"empty-hover": "&eKlicke hier um den Shop zu leeren.",
"remove": "&c&l[Shop entfernen]",
"remove-hover": "&eKlicke um diesen Shop zu entfernen.",
- "stack": "&aPro Menge: &b{0} &e[&d&lChange&e]",
- "stack-hover": "&eKlicke um die Anzahl an Items pro Menge zu ändern. Setze es zu 1 für normales Verhalten.",
+ "stack": "&aMengeneinheit: &b{0} &e[&d&lÄndern&e]",
+ "stack-hover": "&eKlicke um die Anzahl an Items pro Mengeneinheit zu ändern. Setze es zu 1 für normales Verhalten.",
"item": "&aShopitem: {0} &e[&d&lÄndern&e]",
"item-hover": "&eKlicke, um das Shopitem zu ändern",
"currency": "&aWährung: &b{0} &e[&d&lÄndern&e]",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cDu kannst mit diesem Shop nicht handeln, da er eingefroren ist.",
"shop-freezed-at-location": "&eDein Shop {0} bei {1} wurde eingefroren!",
"denied-put-in-item": "&cDu kannst dieses Item nicht in deinen Shop setzen!",
- "how-many-buy-stack": "&aGib im Chat ein, wie viele Mengen du &bKAUFEN&a möchtest. Es gibt &e{0}&aItems pro Menge und du kannst &e{1}&a Mengen kaufen. Gib &ball&a ein um alle zu kaufen.",
- "how-many-sell-stack": "&aGib im Chat ein, wie viele Mengen du &bVERKAUFEN&a möchtest. Es gibt &e{0}&aItems pro Menge und du kannst &e{1}&a Mengen kaufen. Gib &ball&a ein um alle zu kaufen.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From 7c0dac8e77880bbb305a6d64fbac14d469a507bf Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:23 +0800
Subject: [PATCH 091/725] New translations messages.json (Danish)
---
crowdin/lang/da-DK/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/da-DK/messages.json b/crowdin/lang/da-DK/messages.json
index c75ee124a1..c01ed8a66a 100644
--- a/crowdin/lang/da-DK/messages.json
+++ b/crowdin/lang/da-DK/messages.json
@@ -5,7 +5,8 @@
"translation-version": "Supportversion: Reremake",
"translation-contributors": "Bidragydere: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken og Andre_601",
"translation-country": "Sprogzone: dansk (da_DA)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &ball&a in chat, to sell all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From e7c2bafe0fb3a8fb66aa9b6c6738ca80ec0d8a9d Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:24 +0800
Subject: [PATCH 092/725] New translations messages.json (Czech)
---
crowdin/lang/cs-CZ/messages.json | 401 ++++++++++++++++---------------
1 file changed, 201 insertions(+), 200 deletions(-)
diff --git a/crowdin/lang/cs-CZ/messages.json b/crowdin/lang/cs-CZ/messages.json
index c12b2d577b..24327006b2 100644
--- a/crowdin/lang/cs-CZ/messages.json
+++ b/crowdin/lang/cs-CZ/messages.json
@@ -1,11 +1,12 @@
{
- "_comment": "Ahoj překladateli! Pokud toto upravujeteš z Githubu nebo ze zdrojového kódu, měl bys mrknout na https://crowdin.com/project/quickshop-reremake",
- "file-test": "Toto je zkušební textový soubor. Používáme jej k testování, pokud jde o zprávy .json je rozbitý. Můžete jej vyplnit jakýmkoliv východním vejci, které se vám zde líbí :)",
- "translation-author": "Translator: Ghost_chu, Andre_601, LixCisCZ",
- "translation-version": "Verze: Reremake",
+ "_comment": "Ahoj překladateli! Pokud toto upravuješ z Githubu nebo ze zdrojového kódu, měl bys mrknout na https://crowdin.com/project/quickshop-reremake",
+ "file-test": "Toto je zkušební textový soubor. Používáme jej k testování, pokud jde o zprávy json je rozbitý. Můžete jej vyplnit jakýmkoliv východním vejci, které se vám zde líbí :)",
+ "translation-author": "Translator: Ghost_chu, Andre_601",
+ "translation-version": "Podpora verze: Reremake",
"translation-contributors": "Přispěli: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
"translation-country": "Jazyková Zóna: Czech (cs_CZ)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -34,162 +35,162 @@
"negative-amount": "&cDerp, nemůžeš obchodovat se zápornými částkami",
"not-a-number": "&cMůžete zadat pouze číslo, váš vstup byl {0}.",
"exceeded-maximum": "&cHodnota překročila maximální hodnotu v Javě.",
- "not-a-integer": "&cMužeš zadat pouze celé číslo, zadal jsi {0}.",
- "player-bought-from-your-store": "&c{0} zakoupen {1} {2} z tvého obchodu a ty jsi zaplatil {3} na daních.",
- "shop-out-of-stock": "&5Váš obchod v {0}, {1}, {2}, vyčerpal {3}!",
- "shop-has-no-space": "&cObchod má pouze místo pro {0} více {1}.",
- "you-dont-have-that-many-items": "&cMáš pouze {0} {1}.",
- "the-owner-cant-afford-to-buy-from-you": "&cTohle stojí {0}, ale vlastník má pouze {1}",
- "player-sold-to-your-store": "&a{0} prodala {1} {2} do tvého obchodu.",
- "shop-out-of-space": "&5Tvůj obchod v {0}, {1}, {2}, je nyní plný.",
- "fee-charged-for-price-change": "&aZaplatili jste &c{0}&a za změnu ceny.",
- "price-is-now": "&aNová cena obchodu je &e{0}",
- "thats-not-a-number": "&cNeplatné číslo",
- "forbidden-vanilla-behavior": "Operace je zakázána, protože není v souladu s chováním vanilla verze",
- "no-price-given": "Zadejte platnou cenu",
- "average-price-nearby": "&aBlízká průměrná cena: &e{0}",
- "shop-has-changed": "&cObchod, který jste se pokusili použít, se změnil od doby, kdy jste na něj klikli!",
- "shop-not-exist": "&cNení žádný obchod.",
- "nearby-shop-this-way": "&aShop je od vás {0} bloků.",
- "nearby-shop-header": "&aNejbližší obchod odpovídající &b{0}&a:",
- "nearby-shop-entry": "&a - Info: {0}&aCena:&b{1} &ax:&b{3} &az:&b{4} &avzdálenost: &b{5} &ablok(y)",
- "no-nearby-shop": "&cŽádný blízký obchod odpovídající {0}.",
+ "not-a-integer": "&b▪&8▏ &bSystem &8› &cMužeš zadat pouze celé číslo, zadal jsi {0}.",
+ "player-bought-from-your-store": "&b▪&8▏ &bSystem &8› &7{0} zakoupil {1} {2} z tvého obchodu a ty jsi zaplatil {3} na daních.",
+ "shop-out-of-stock": "&b▪&8▏ &bSystem &8› &7Váš obchod v {0}, {1}, {2}, vyčerpal {3}!",
+ "shop-has-no-space": "&b▪&8▏ &bSystem &8› &cObchod má pouze místo pro {0} více {1}.",
+ "you-dont-have-that-many-items": "&b▪&8▏ &bSystem &8› &cMáš pouze {0} {1}.",
+ "the-owner-cant-afford-to-buy-from-you": "&b▪&8▏ &bSystem &8› &cTohle stojí {0}, ale vlastník má pouze {1}",
+ "player-sold-to-your-store": "&b▪&8▏ &bSystem &8› &7Hráč {0} prodal {1} {2} do tvého obchodu.",
+ "shop-out-of-space": "&b▪&8▏ &bSystem &8› &7Tvůj obchod v {0}, {1}, {2}, je nyní plný.",
+ "fee-charged-for-price-change": "&b▪&8▏ &bSystem &8› &7Zaplatili jste &c{0}&7 za změnu ceny.",
+ "price-is-now": "&b▪&8▏ &bSystem &8› &7Nová cena obchodu je &b{0}",
+ "thats-not-a-number": "&b▪&8▏ &bSystem &8› &cNeplatné číslo",
+ "forbidden-vanilla-behavior": "&b▪&8▏ &bSystem &8› &7Operace je zakázána, protože není v souladu s chováním vanilla verze",
+ "no-price-given": "&b▪&8▏ &bSystem &8› &7Zadejte platnou cenu.",
+ "average-price-nearby": "&b▪&8▏ &bSystem &8› &7Blízká průměrná cena: &b{0}",
+ "shop-has-changed": "&b▪&8▏ &bSystem &8› &cObchod, který jste se pokusili použít, se změnil od doby, kdy jste na něj klikli!",
+ "shop-not-exist": "&b▪&8▏ &bSystem &8› &cNemáš žádný obchod.",
+ "nearby-shop-this-way": "&b▪&8▏ &bSystem &8› &7Shop je od vás {0} bloků.",
+ "nearby-shop-header": "&b▪&8▏ &bSystem &8› &7Nejbližší obchod odpovídající &b{0}&7:",
+ "nearby-shop-entry": "&b▪&8▏ &bInfo &8› {0}&fCena:&b{1} &fx:&b{2} &fy:&b{3} &fz:&b{4} &fvzdálenost: &b{5} &fblok(y)",
+ "no-nearby-shop": "&b▪&8▏ &bSystem &8› &cŽádný blízký obchod odpovídající {0}.",
"buying-more-than-selling": "&cVAROVÁNÍ: Kupujete předměty za více, než je prodáváte!",
- "not-enough-space": "&cObchod má pouze místo pro {0} více!",
+ "not-enough-space": "&b▪&8▏ &bSystem &8› &cObchod má pouze místo pro {0} více!",
"refill-success": "&aDoplnění úspěšně proběhlo.",
- "empty-success": "&aEmptying obchod byl úspěšný",
- "admin-shop": "ServerObchod",
- "unknown-owner": "Neznámé",
- "owner-bypass-check": "&eProšel všechny kontroly. Obchod byl úspěšný! (Nyní jste vlastníkem obchodu!)",
- "reached-maximum-can-create": "&cJiž jste vytvořili maximum {0}/{1} obchodů!",
- "restricted-prices": "&cOmezená cena za {0}: Min {1}, max {2}",
- "no-enough-money-to-keep-shops": "&cNemáte dostatek peněz na udržení svých obchodů! Všechny obchody byly odstraněny...",
- "nothing-to-flush": "&aNemáte žádné nové zprávy o obchodu.",
- "break-shop-use-supertool": "&eObchod můžete rozbít pomocí SuperTool.",
+ "empty-success": "&b▪&8▏ &bSystem &8› &7Emptying obchod byl úspěšný",
+ "admin-shop": "Server",
+ "unknown-owner": "Nezname",
+ "owner-bypass-check": "&b▪&8▏ &bSystem &8› &7Prošel všechny kontroly. Obchod byl úspěšný! (Nyní jste vlastníkem obchodu!)",
+ "reached-maximum-can-create": "&b▪&8▏ &bSystem &8› &cJiž jste vytvořili maximum {0}/{1} obchodů!",
+ "restricted-prices": "&b▪&8▏ &bSystem &8› &cOmezená cena za {0}: Min {1}, max {2}",
+ "no-enough-money-to-keep-shops": "&b▪&8▏ &bSystem &8› &cNemáte dostatek peněz na udržení svých obchodů! Všechny obchody byly odstraněny...",
+ "nothing-to-flush": "&b▪&8▏ &bSystem &8› &7Nemáte žádné nové zprávy o obchodu.",
+ "break-shop-use-supertool": "&b▪&8▏ &bSystem &8› &7Obchod můžete rozbít pomocí SuperTool.",
"failed-to-put-sign": "&cNení dostatek místa v okolí obchodu a umístit informační značku.",
- "failed-to-paste": "&cNepodařilo se nahrát data do Pastebinu. Zkontrolujte připojení k internetu a zkuste to znovu. (Podrobnosti naleznete v konzoli)",
- "warn-to-paste": "&eShromažďování dat a jejich nahrávání do Pastebinu, to může chvíli trvat. &c&lVarování:&c Data jsou po dobu jednoho týdne veřejně uchovávána! Může dojít k úniku konfigurace serveru a dalších citlivých informací. Ujistěte se, že jste jej poslali pouze &ldůvěryhodnému personálu/vývojářům.",
- "price-too-high": "&cCena obchodu je příliš vysoká! Nelze vytvořit s cenou vyšší než {0}.",
- "you-cant-create-shop-in-there": "Nemáte oprávnění vytvořit shop v tomto místě.",
- "unknown-player": "&cCílový hráč neexistuje, zkontrolujte prosím uživatelské jméno, které jste zadali.",
- "shop-staff-cleared": "&aÚspěšně byli odebráni všichni členi z tvého obchodu.",
- "shop-staff-added": "&aÚspěšně byli odebráni všichni členi z tvého obchodu.",
- "shop-staff-deleted": "&aÚspěšně byli odebráni {0} všichni členi z tvého obchodu.",
- "no-permission-build": "&cZde nelze postavit obchod.",
- "success-change-owner-to-server": "&aÚspěšně nastaveno vlastníka obchodu na Server.",
- "flush-finished": "&aÚspěšně smazány zprávy.",
- "purchase-failed": "&cNákup selhal: Vnitřní chyba. Obraťte se na správce serveru.",
- "no-pending-action": "&cNemáte žádné čekající akce",
- "permission-denied-3rd-party": "&cOprávnění odepřeno: Plugin třetí strany [{0}].",
- "shops-removed-in-world": "Celkem &b{0}&e obchodů bylo smazáno ve světě &b{1}&e.",
- "world-not-exists": "&cSvět &e{0}&c neexistuje",
+ "failed-to-paste": "&b▪&8▏ &bSystem &8› &cNepodařilo se nahrát data do Pastebinu. Zkontrolujte připojení k internetu a zkuste to znovu. (Podrobnosti naleznete v konzoli)",
+ "warn-to-paste": "&b▪&8▏ &bSystem &8› &7Shromažďování dat a jejich nahrávání do Pastebinu, to může chvíli trvat. &4Varování:&c&c Data jsou po dobu jednoho týdne veřejně uchovávána! Může dojít k úniku konfigurace serveru a dalších citlivých informací. Ujistěte se, že jste jej poslali pouze &ldůvěryhodnému personálu/vývojářům.",
+ "price-too-high": "&b▪&8▏ &bSystem &8› &cCena obchodu je příliš vysoká! Nelze vytvořit s cenou vyšší než {0}.",
+ "you-cant-create-shop-in-there": "&b▪&8▏ &bSystem &8› &7Nemáte oprávnění vytvořit shop v tomto místě.",
+ "unknown-player": "&b▪&8▏ &bSystem &8› &cCílový hráč neexistuje, zkontrolujte prosím uživatelské jméno, které jste zadali.",
+ "shop-staff-cleared": "&b▪&8▏ &bSystem &8› &7Úspěšně byli odebráni všichni členi z tvého obchodu.",
+ "shop-staff-added": "&b▪&8▏ &bSystem &8› &7Úspěšně byl přidán {0} jako člen tvého obchodu.",
+ "shop-staff-deleted": "&b▪&8▏ &bSystem &8› &7Úspěšně byl odebrán {0} jako člen z tvého obchodu.",
+ "no-permission-build": "&b▪&8▏ &bSystem &8› &cZde nelze postavit obchod.",
+ "success-change-owner-to-server": "&b▪&8▏ &bSystem &8› &7Úspěšně nastaveno vlastníka obchodu na Server.",
+ "flush-finished": "&b▪&8▏ &bSystem &8› &7Úspěšně smazány zprávy.",
+ "purchase-failed": "&b▪&8▏ &bSystem &8› &cNákup selhal: Vnitřní chyba. Obraťte se na správce serveru.",
+ "no-pending-action": "&b▪&8▏ &bSystem &8› &cNemáte žádné čekající akce",
+ "permission-denied-3rd-party": "&b▪&8▏ &bSystem &8› &cOprávnění odepřeno: Plugin třetí strany [{0}].",
+ "shops-removed-in-world": "&b▪&8▏ &bSystem &8› &7Celkem &b{0}&7 obchodů bylo smazáno ve světě &b{1}&7.",
+ "world-not-exists": "&b▪&8▏ &bSystem &8› &cSvět &b{0}&c neexistuje",
"menu": {
- "successful-purchase": "&aÚspěšně zakoupeno:",
- "successfully-sold": "&aÚspěšně prodáno:",
+ "successful-purchase": "&b▪&8▏ &bSystem &8› &7Úspěšně zakoupeno:",
+ "successfully-sold": "&b▪&8▏ &bSystem &8› &7Úspěšně prodáno:",
"item-name-and-price": "&e{0} {1} &aza &e{2}",
- "sell-tax": "&aZaplatil jste &e{0} &ana daních.",
- "sell-tax-self": "&aNeplatil jste daně, protože vlastníte tento obchod.",
- "enchants": "&5Enchanty",
- "stored-enchants": "&5Uložené enchanty",
- "shop-information": "&aInformace o obchodě:",
- "owner": "&aVlastník: {0}",
- "item": "&aItem: &e{0}\n",
- "item-holochat-error": "&c[Error]\n",
- "preview": "&b[Náhled itemu]",
- "space": "&aMezera: &e{0}",
- "stock": "&aSkladem &e{0}",
- "price-per": "&aCena za &e{0} &a- &e{1}",
- "price-per-stack": "&aCena za &e{2}x {0} - {1}",
- "total-value-of-chest": "&aCelková hodnota chesty: &e{0}",
- "damage-percent-remaining": "&e{0}% &azbývá.",
- "this-shop-is-buying": "&aTento obchod &dNAKUPUJE &aitemy.",
- "this-shop-is-selling": "&aTento obchod &dPRODÁVÁ &aitemy.",
- "shop-stack": "&aPočet stacků: &e{0}",
- "effects": "&aEfekty"
+ "sell-tax": "&b▪&8▏ &bSystem &8› &7Zaplatil jste &b{0} &7na daních.",
+ "sell-tax-self": "&b▪&8▏ &bSystem &8› &7Neplatil jste daně, protože vlastníte tento obchod.",
+ "enchants": "&bEnchanty",
+ "stored-enchants": "&bUložené enchanty",
+ "shop-information": "&bInformace o obchodě:",
+ "owner": "&r &fVlastník: &b{0}",
+ "item": "&r &fItem: &b{0}",
+ "item-holochat-error": "&r &c[Error]",
+ "preview": "&r &b[Náhled itemu]",
+ "space": "&r &fMezera: &b{0}",
+ "stock": "&r &fSkladem: &b{0}",
+ "price-per": "&r &fCena za &b{0} &7- &b{1}",
+ "price-per-stack": "&r &fCena za &b{2}x {0} - {1}",
+ "total-value-of-chest": "&r &fCelková hodnota chesty: &b{0}",
+ "damage-percent-remaining": "&b{0}% &fzbývá.",
+ "this-shop-is-buying": "&7Tento obchod &bNakupuje &7itemy.",
+ "this-shop-is-selling": "&7Tento obchod &bProdává &7itemy.",
+ "shop-stack": "&7Počet stacků: &b{0}",
+ "effects": "&fEfekty"
},
- "bypassing-lock": "&cBypassujete zámek QuickShopu!",
+ "bypassing-lock": "&cObcházíte zámek QuickShopu!",
"that-is-locked": "&cTento obchod je uzamčen.",
- "how-many-buy": "&aNapište do chatu, kolik si přejete &bKOUPIT&a. Můžete si koupit &e{0}&a. Zadejte &ball&a pro zakoupení všech.",
- "how-many-sell": "&aZadejte do chatu, kolik si přejete &dPRODAT&a. Máte k dispozici &e{0}&a. Zadejte &ball&a do chatu, k prodeji všeho.",
- "not-allowed-to-create": "&cZde nemůžete vytvořit obchod.",
- "blacklisted-item": "&cNemůžete prodat tento item, protože je na černé listině",
- "how-much-to-trade-for": "&aZadejte do chatu: Cenu za kolik chcete prodávat &e{1}x {0}&a.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "not-allowed-to-create": "&b▪&8▏ &bSystem &8› &cZde nemůžete vytvořit obchod.",
+ "blacklisted-item": "&b▪&8▏ &bSystem &8› &cNemůžete prodat tento item, protože je na černé listině",
+ "how-much-to-trade-for": "&7Zadejte do chatu: Cenu za kolik chcete prodávat &b{1}x {0}&7.",
"command": {
- "format": "&a/{0} {1} &e- {2}",
- "format-disabled": "&c/{0} {1} &7- {2}",
+ "format": "&8| &f/{0} {1} &7- &f{2}",
+ "format-disabled": "&8| &c/{0} {1} &7- &f{2}",
"toggle-unlimited": {
- "unlimited": "&aObchod je nyní neomezený",
- "limited": "&aObchod je nyní omezený"
+ "unlimited": "&7Obchod je nyní neomezený",
+ "limited": "&7Obchod je nyní omezený"
},
- "transfer-success": "&aPřeneseno &e{0} &aobchodů &e{1}",
- "transfer-success-other": "&aPřeneseno &e{0} &aobchodů &e{1}",
- "some-shops-removed": "&e{0} &aobchod(ů) odstraněno",
+ "transfer-success": "&7Přeneseno &b{0} &7obchodů &b{1}",
+ "transfer-success-other": "&7Přeneseno &b{0} &7obchodů &b{1}",
+ "some-shops-removed": "&b{0} &7obchod(ů) odstraněno",
"no-owner-given": "&cŽádný vlastník",
- "new-owner": "&aNový majitel: &e{0}",
- "now-buying": "&aNyní &dKUPUJETE &e{0}",
- "now-selling": "&aNyní &bPRODÁVÁTE &e{0}",
- "cleaning": "&aOdstraňuji obchody bez skladu...",
- "reloading": "&aConfiguration reloaded. &eSome changes may require reboot to affect. \n&7(Notice: Reloading behavior has been changed after 4.0.9.10, we now only reload configuration but not whole plugin to ensure the server won't crashed.)",
- "cleaned": "&aOdstraněno &e{0}&a obchodů.",
- "no-type-given": "&cPoužití: /qs find - ",
+ "new-owner": "&fNový majitel: &b{0}",
+ "now-buying": "&7Nyní &bKupujete &f{0}",
+ "now-selling": "&7Nyní &bProdáváte &f{0}",
+ "cleaning": "&7Odstraňuji obchody bez skladu...",
+ "reloading": "&bKonfigurace a soubory znovu načteny. Některé změny budou znatelné až po restartu serveru. &7(Pozor: Znovunačítání bylo změněno u verze 4.0.9.10, nově se znovu načítá jen konfigurace, ne vše.)",
+ "cleaned": "&7Odstraněno &b{0}&7 obchodů.",
+ "no-type-given": "&cPoužití: &7/qs find
- ",
"no-world-given": "&cZadejte název světa",
- "bulk-size-not-set": "&cPoužití: /qs size ",
- "bulk-size-now": "&aNyní tradujete &e{0}x {1}",
+ "bulk-size-not-set": "&cPoužití: &7/qs size ",
+ "bulk-size-now": "&7Nyní tradujete &b{0}x {1}",
"invalid-bulk-amount": "&cZadaná hodnota {0} je větší než maximální velikost stacku nebo menší než jedna",
- "no-trade-item": "&aPodržte prosím item obchodu, který chcete změnit v hlavní ruce",
- "trade-item-now": "&aNyní tradujete &e{0}x {1}",
- "no-amount-given": "&cNebyla poskytnuta žádná hodnota. Použijte &a/qs refill &c",
- "now-debuging": "&aÚspěšně povolen vývojářský režim. Reloaduji QuickShop...",
- "now-nolonger-debuging": "&aÚspěšně zakázán vývojářský režim. Reloaduji QuickShop...",
+ "no-trade-item": "&7Podržte prosím item obchodu, který chcete změnit v hlavní ruce",
+ "trade-item-now": "&7Nyní tradujete &b{0}x {1}",
+ "no-amount-given": "&cNebyla poskytnuta žádná hodnota. Použijte &b/qs refill &c",
+ "now-debuging": "&7Úspěšně povolen vývojářský režim. Reloaduji QuickShop...",
+ "now-nolonger-debuging": "&7Úspěšně zakázán vývojářský režim. Reloaduji QuickShop...",
"wrong-args": "&cNeplatné argumenty. Použij &l/qs help &cpro zobrazení seznamu příkazů.",
"description": {
- "title": "&aNápověda pro QuickShop",
- "unlimited": "&eDá obchodu neomezený sklad.",
- "setowner": "&eZmění vlastnictví obchodu.",
- "owner": "&eZmění vlastnictví obchodu.",
- "buy": "&eZmění obchod na režim &dBUY&e",
- "sell": "&eZmění obchod na režim &dBUY&e",
- "price": "&eZmění kupní cenu obchodu",
- "clean": "&eOdstraní všechny (načtené) obchody bez skladu",
- "find": "&eNajde nejbližší obchod konkrétního typu.",
- "reload": "&eZnovu načte config.yml QuickShopu",
- "refill": "&ePřidá zadaný počet položek do obchodu",
- "empty": "&eOdstraní všechny položky z obchodu",
- "debug": "&eZapnut Vývojářský mód",
- "create": "&eVytvoří nový obchod z cílené truhly",
- "fetchmessage": "&eZobrazit zprávy o nepřečtených obchodech",
- "info": "&eZobrazit statistiky v QuickShopu",
- "paste": "&eNahrává data serveru do Pastebinu",
- "staff": "&eSpravovat zaměstnance obchodu",
- "remove": "&eOdstraní obchod, na kterém se díváte",
- "amount": "&eMožnost nastavit částku položky (Useful když máte problémy s chatem)",
- "about": "&eZobrazí informace o QuickShopu",
- "help": "&eZobrazí informace o QuickShopu",
- "item": "&eZměnit položku v obchodě",
- "size": "&eZměna na hromadné množství obchodu",
- "supercreate": "&eVytvořit obchod při obcházení všech ochranných kontrol",
- "language": "Změní aktuální jazyk bota na serveru",
- "removeall": "&eOdebrat VŠECHNY obchody zadaného hráče",
- "transfer": "&ePřeneste všechny obchody do jiného",
- "removeworld": "&eOdebrat VŠECHNY obchody zadaného hráče",
- "currency": "&eNastavte nebo odeberte nastavení měny obchodu",
- "ban": "&eZabanování hráče z obchodu",
- "unban": "&eOdbanování hráče z obchodu",
- "freeze": "&eZakázat nebo povolit obchodování obchodu",
- "lock": "&ePřepnout stav zámku obchodu",
- "taxaccount": "&eSet the tax account that shop using",
- "toggledisplay": "&eToggle the shop display item status",
- "purge": "&eStart the shop purge task in background"
+ "title": "&bNápověda pro QuickShop",
+ "unlimited": "&fDá obchodu neomezený sklad.",
+ "setowner": "&fZmění vlastnictví obchodu.",
+ "owner": "&fZmění vlastnictví obchodu.",
+ "buy": "&fZmění obchod na režim &dBUY&e",
+ "sell": "&fZmění obchod na režim &dBUY&e",
+ "price": "&fZmění kupní cenu obchodu",
+ "clean": "&fOdstraní všechny (načtené) obchody bez skladu",
+ "find": "&fNajde nejbližší obchod konkrétního typu.",
+ "reload": "&fZnovu načte config.yml QuickShopu",
+ "refill": "&fPřidá zadaný počet položek do obchodu",
+ "empty": "&fOdstraní všechny položky z obchodu",
+ "debug": "&fZapne Vývojářský mód",
+ "create": "&fVytvoří nový obchod z cílené truhly",
+ "fetchmessage": "&fZobrazit zprávy o nepřečtených obchodech",
+ "info": "&fZobrazit statistiky v QuickShopu",
+ "paste": "&fNahrává data serveru do Pastebinu",
+ "staff": "&fSpravovat zaměstnance obchodu",
+ "remove": "&fOdstraní obchod, na kterém se díváte",
+ "amount": "&fMožnost nastavit částku položky (Useful když máte problémy s chatem)",
+ "about": "&fZobrazí informace o QuickShopu",
+ "help": "&fZobrazí informace o QuickShopu",
+ "item": "&fZměnit položku v obchodě",
+ "size": "&fZměna na hromadné množství obchodu",
+ "supercreate": "&fVytvořit obchod při obcházení všech ochranných kontrol",
+ "language": "&fZmění aktuální jazyk bota na serveru",
+ "removeall": "&fOdebrat VŠECHNY obchody zadaného hráče",
+ "transfer": "&fPřeneste všechny obchody do jiného",
+ "removeworld": "&fOdebrat VŠECHNY obchody zadaného hráče",
+ "currency": "&fNastavte nebo odeberte nastavení měny obchodu",
+ "ban": "&fZabanování hráče z obchodu",
+ "unban": "&fOdbanování hráče z obchodu",
+ "freeze": "&fZakázat nebo povolit obchodování obchodu",
+ "lock": "&fPřepnout stav zámku obchodu",
+ "taxaccount": "&fNastaví daně, které obchod zaplatí",
+ "toggledisplay": "&fPřepne obchodu status ukazovaného předmětu",
+ "purge": "&fZačne promazávání obchodů na pozadí"
},
- "disabled": "&cTento příkaz je zakázán: &e{0}",
+ "disabled": "&cTento příkaz je zakázán: &b{0}",
"feature-not-enabled": "Funkce není v konfiguraci povolena."
},
"signs": {
"selling": "Prodej {0}",
"stack-selling": "Prodej {0}",
"header": "{1}{0}",
- "buying": "Koupit {0}",
- "stack-buying": "Buy {0}",
+ "buying": "Koupě {0}",
+ "stack-buying": "Koupě {0}",
"item-left": "",
"item-right": "",
"price": "{0} každý",
@@ -202,55 +203,55 @@
"freeze": "Obchod je zakázán"
},
"controlpanel": {
- "setowner": "&aVlastník: &b{0} &e[&d&lZměna&e]",
- "infomation": "Ovládací panel &aShop:",
- "setowner-hover": "&eKlikni pro přepnutí vlastníka.",
- "unlimited": "&aNeomezeno: {0} &e[&d&lZměna&e]",
- "unlimited-hover": "&eKliknutím přepnete pokud obchod není omezený.",
- "mode-selling": "&aRežim obchodu: &bSelling &e[&d&lChange&e]",
- "mode-selling-hover": "&eKliknutím změníte obchod na režim BUY.",
- "mode-buying": "&aRežim obchodu: &bSelling &e[&d&lChange&e]",
- "mode-buying-hover": "&eKliknutím změníte obchod na SELL režim.",
- "price": "&aVlastník: &b{0} &e[&d&lZměna&e]",
- "price-hover": "&eKliknutím nastavíte novou cenu itemu.",
- "refill": "&aRefill: Doplnit itemy&e[&d&lOK&e]",
- "refill-hover": "&eKlikněte pro doplnění obchodu.",
- "empty": "&aEmpty: Odstranit všechny itemy &e[&d&lOK&e]",
- "empty-hover": "&eKlikněte pro vymazání inventáře obchodu.",
- "remove": "&c&l[Odstranit obchod]",
- "remove-hover": "&eKlikněte pro odstranění tohoto obchodu.",
- "stack": "&aCena za stack: &b{0} &e[&d&lZměnit&e]",
- "stack-hover": "&eKliknutím nastavíte množství položky za každý bulk. Nastavte na 1 pro normální chování.",
- "item": "&aItem obchodu: {0} &e[&d&lZměnit&e]",
- "item-hover": "&eKlikněte pro změnu itemu obchodu",
- "currency": "&aMěna: &b{0} &e[&d&lNastavit&e]",
- "currency-hover": "&eKlikněte pro nastavení nebo odebrání měny, kterou tento obchod používá",
- "lock": "&eZámek obchodu: &b{0} &e[&d&lPřepnout&e]",
- "lock-hover": "&ePovolit/Zakázat ochranu zámku obchodu.",
- "freeze": "&eRežim zmražení: &b{0} &e[&d&lPřepnout&e]",
- "freeze-hover": "&ePřepnout stav zmrazení obchodu.",
- "toggledisplay": "&eDisplayItem: &b{0} &e[&d&lToggle&e]",
- "toggledisplay-hover": "&eToggle the shop's displayitem status"
+ "setowner": "&fVlastník: &b{0} &7[&d&3Změna&7]",
+ "infomation": "Ovládací panel &bShop:",
+ "setowner-hover": "&bKlikni pro přepnutí vlastníka.",
+ "unlimited": "&fNeomezeno: &b{0} &7[&d&3Změna&7]",
+ "unlimited-hover": "&bKliknutím přepnete pokud obchod není omezený.",
+ "mode-selling": "&7Režim obchodu: &bSelling &7[&d&3Change&7]",
+ "mode-selling-hover": "&bKliknutím změníte obchod na režim BUY.",
+ "mode-buying": "&fRežim obchodu: &bSelling &7[&d&3Change&7]",
+ "mode-buying-hover": "&bKliknutím změníte obchod na SELL režim.",
+ "price": "&fVlastník: &b{0} &7[&d&3Změna&7]",
+ "price-hover": "&bKliknutím nastavíte novou cenu itemu.",
+ "refill": "&fRefill: Doplnit itemy&7[&d&3OK&7]",
+ "refill-hover": "&bKlikněte pro doplnění obchodu.",
+ "empty": "&fEmpty: Odstranit všechny itemy &7[&d&3OK&7]",
+ "empty-hover": "&bKlikněte pro vymazání inventáře obchodu.",
+ "remove": "&4[&cOdstranit obchod&4]",
+ "remove-hover": "&bKlikněte pro odstranění tohoto obchodu.",
+ "stack": "&fCena za stack: &b{0} &7[&d&3Změnit&7]",
+ "stack-hover": "&bKliknutím nastavíte množství položky za každý bulk. Nastavte na 1 pro normální chování.",
+ "item": "&fItem obchodu: &b{0} &7[&d&3Změnit&7]",
+ "item-hover": "&bKlikněte pro změnu itemu obchodu",
+ "currency": "&fMěna: &b{0} &7[&d&3Nastavit&7]",
+ "currency-hover": "&bKlikněte pro nastavení nebo odebrání měny, kterou tento obchod používá",
+ "lock": "&fZámek obchodu: &b{0} &7[&d&3Přepnout&7]",
+ "lock-hover": "&bPovolit/Zakázat ochranu zámku obchodu.",
+ "freeze": "&fRežim zmražení: &b{0} &7[&d&3Přepnout&7]",
+ "freeze-hover": "&bPřepnout stav zmrazení obchodu.",
+ "toggledisplay": "&fPředmět: &b{0} &7[&d&3Přepni&7]",
+ "toggledisplay-hover": "&fPřepne obchodu status ukazovaného předmětu"
},
"tableformat": {
- "full_line": "+---------------------------------------------------+",
- "left_half_line": "+--------------------",
- "right_half_line": "--------------------+",
- "left_begin": "| "
+ "full_line": "&r",
+ "left_half_line": "&r",
+ "right_half_line": "&r",
+ "left_begin": "&8| &7» "
},
"booleanformat": {
"success": "&a✔",
"failed": "&c✘"
},
"tabcomplete": {
- "price": "[cena]",
- "range": "[rozsah]",
- "amount": "[množství]",
- "currency": "[název měny]",
+ "price": "[price]",
+ "range": "[range]",
+ "amount": "[amount]",
+ "currency": "[currency name]",
"item": "[item]"
},
"updatenotify": {
- "buttontitle": "[Aktualizovat teď]",
+ "buttontitle": "[Update Now]",
"onekeybuttontitle": "[OneKey Update]",
"list": [
"{0} byla vydána. Stále používáte {1}!",
@@ -301,42 +302,42 @@
"help": "Pomozte nám",
"translate-on-crowdin": "Přeložit na Crowdin"
},
- "shop-now-freezed": "&aZmrazili jste obchod. Nikdo nemůže obchodovat s tímto obchodem!",
- "shop-nolonger-freezed": "&aOdzmrazil jsi obchod. Nyní je to zpět do normální!",
+ "shop-now-freezed": "&bZmrazili jste obchod. Nikdo nemůže obchodovat s tímto obchodem!",
+ "shop-nolonger-freezed": "&bOdzmrazil jsi obchod. Nyní je to zpět do normální!",
"shop-cannot-trade-when-freezing": "&cNemůžete obchodovat s tímto obchodem, protože je zmražený.",
- "shop-freezed-at-location": "&eVáš obchod {0} v {1} byl zmražen!",
+ "shop-freezed-at-location": "&bVáš obchod {0} v {1} byl zmražen!",
"denied-put-in-item": "&cTuto položku nelze vložit do vašeho obchodu!",
- "how-many-buy-stack": "&eEnter in chat, kolik bulků si přejete &bBUY&a. Existuje &e{0}&a položek v každém balíku a můžete koupit &e{1}&a bulks. Vložte &ball&do chatu pro nákup všech.",
- "how-many-sell-stack": "&eEnter in chat, kolik bulků si přejete &bBUY&a. Existuje &e{0}&a položek v každém balíku a můžete koupit &e{1}&a bulks. Vložte &ball&do chatu pro nákup všech.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
- "name": "&eJméno: &6{0}",
- "code": "&eJméno: &6{0}",
- "translate-progress": "&ePrůběh překladu: &b{0}%",
- "approval-progress": "&ePostup schválení: &b{0}%",
- "qa-issues": "&eOtázky zabezpečení kvality: &b{0}%",
- "help-us": "&a[Pomozte nám zlepšit kvalitu překladu]"
+ "name": "&fJméno: &b{0}",
+ "code": "&fKod: &b{0}",
+ "translate-progress": "&fPrůběh překladu: &b{0}%",
+ "approval-progress": "&fPostup schválení: &b{0}%",
+ "qa-issues": "&fOtázky zabezpečení kvality: &b{0}%",
+ "help-us": "&f[Pomozte nám zlepšit kvalitu překladu]"
},
"currency-not-exists": "&cNelze najít měnu, kterou chcete nastavit. Možná je pravopis špatný nebo není měna v tomto světě k dispozici.",
- "currency-set": "Měna &aShopu byla úspěšně nastavena na {0}.",
- "currency-unset": "Měna &aShopu byla úspěšně odstraněna. Nyní se používá výchozí nastavení.",
+ "currency-set": "Měna Shopu byla úspěšně nastavena na {0}.",
+ "currency-unset": "Měna Shopu byla úspěšně odstraněna. Nyní se používá výchozí nastavení.",
"currency-not-support": "&cDoplněk pro ekonomiku nepodporuje funkci více ekonomik.",
- "item-not-exist": "&cPoložka &e{0} neexistuje, prosím zkontrolujte pravopis.",
- "backup-success": "&aZáloha byla úspěšně provedena.",
+ "item-not-exist": "&cPoložka &b{0} &cneexistuje, prosím zkontrolujte pravopis.",
+ "backup-success": "&bZáloha byla úspěšně provedena.",
"console-only": "&cTento příkaz může být použit pouze z konzole.",
"console-only-danger": "&cTento příkaz není bezpečný, můžete ho použít pouze v konzoly.",
- "clean-warning": "&eThis command will purge &call &eshops if the shop is corrupted, 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.",
+ "clean-warning": "&7Tento příkaz promaže &c&cvšechny &7obchody, pokud jsou jakýmkoliv způsobem poškozeny, byly vytvořeny ve světě, který už neexistuje a podobné problémy.",
"shop-creation-failed": "&cVytvoření ochodu se nezdařilo, kontaktujte prosím správce serveru.",
- "shop-owner-self-trade": "&eObchodujete se svým obchodem, takže nebudete moci získat žádné peníze.",
+ "shop-owner-self-trade": "&7Obchodujete se svým obchodem, takže nebudete moci získat žádné peníze.",
"chest-title": "Obchod QuickShop",
"command-type-mismatch": "&cTento příkaz může být spuštěn pouze v &b{0}.",
- "unlimited-shop-owner-changed": "&eMajitel tohoto neomezeného obchodu byl změněn na {0}.",
- "unlimited-shop-owner-keeped": "&eUpozornění: Vlastník obchodu je stále neomezený vlastník obchodu, musíte si nastavit nového vlastníka obchodu sami.",
+ "unlimited-shop-owner-changed": "&7Majitel tohoto neomezeného obchodu byl změněn na {0}.",
+ "unlimited-shop-owner-keeped": "&cUpozornění: &7Vlastník obchodu je stále neomezený vlastník obchodu, musíte si nastavit nového vlastníka obchodu sami.",
"server-crash-warning": "&cServer může spadnout po spustění příkazu /qs reload pokud nahradíš/smažeš jar soubor QuickShop pluginu při spuštěném serveru.",
"reloading-status": {
- "success": "&aReload completed without any errors.",
- "require-restart": "&aReload completed. &e(Some changes require server restart to affect)",
- "failed": "&cReload failed, check the server console",
- "scheduled": "&aReload completed. &7(Some changes required a while to affect)"
+ "success": "&bZnovunačtení konfigurace proběhlo bez problému.",
+ "require-restart": "&bZnovunačtení dokončeno. Některé změny budou mít efekt po restartu",
+ "failed": "&cZnovunačtení selhalo, zkontroluj konzoli",
+ "scheduled": "&bZnovunačtení dokončeno. Některé změny budou mít efekt za chvíli"
},
"client-language-changed": "&aQuickShop detected your client language setting has been changed, we're now using {0} locale for you.",
"client-language-unsupported": "&eQuickShop doesn't support your client language, we're fallback to {0} locale now.",
From 8a417bd48e7451fa779cc494972041477ffade65 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:25 +0800
Subject: [PATCH 093/725] New translations messages.json (Catalan)
---
crowdin/lang/ca-ES/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/ca-ES/messages.json b/crowdin/lang/ca-ES/messages.json
index c3f7c2b7b7..808aab5088 100644
--- a/crowdin/lang/ca-ES/messages.json
+++ b/crowdin/lang/ca-ES/messages.json
@@ -5,7 +5,8 @@
"translation-version": "Versió suportada: Reremake",
"translation-contributors": "Contributors: Hoswolf, Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
"translation-country": "Zona de l'idioma: Català (ca_ES)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "No s'ha trobat cap QuickShop. N'has d'estar mirant una.",
"no-anythings-in-your-hand": "No tens res a la mà.",
"no-permission": "No tens permisos per fer això.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cSobrepassant un bloqueig de QuickShop!",
"that-is-locked": "&cAquesta botiga està bloquejada.",
- "how-many-buy": "&aIntrodueix al xat quants ítems vols &bCOMPRAR&a. Pots comprar-ne &e{0}&a. Introdueix '&ball&a' per comprar-los tots.",
- "how-many-sell": "&aIntrodueix al xat quants ítems vols &dVENDRE&a. En tens &e{0}&a de disponibles. Introdueix &ball&a al xat per a vendre'ls tots.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cNo pots crear una botiga aquí.",
"blacklisted-item": "&cNo pots vendre aquest objecte perquè està a la llista negra.",
"how-much-to-trade-for": "&aIntrodueix al xat per quant vols intercambiar &e{1}x {0}&a.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cNo pots interectuar amb aquesta botiga perquè està congelada.",
"shop-freezed-at-location": "&eLa teva botiga {0} a {1} s'ha congelat!",
"denied-put-in-item": "&cNo pots posar aquest ítem a la botiga!",
- "how-many-buy-stack": "&eEscriu al xat quants grups vols &bCOMPRAR&a. Hi ha &e{0}&a ítems a cada grup i pots comprar &e{1}&a grups. Escriu &ball&a al xat per comprar-los tots.",
- "how-many-sell-stack": "&aEscriu al xat quants grups vols &dVENDRE&a. Hi ha &e{0}&a ítems a cada grup i tens &e{1}&a grups disponibles. Escriu &ball&a al xat per vendre'ls tots.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNom: &6{0}",
"code": "&eCodi: &6{0}",
From 66bb8e7fd5976034f84b1ca14650034f86b3b983 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:26 +0800
Subject: [PATCH 094/725] New translations messages.json (Arabic)
---
crowdin/lang/ar-SA/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/ar-SA/messages.json b/crowdin/lang/ar-SA/messages.json
index 07dcd92186..56433ae192 100644
--- a/crowdin/lang/ar-SA/messages.json
+++ b/crowdin/lang/ar-SA/messages.json
@@ -5,7 +5,8 @@
"translation-version": "إصدار الدعم: إعادة التشكيل",
"translation-contributors": "المساهمون: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken و Andre_601",
"translation-country": "منطقة اللغة: العربية (ar_AR)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "&cلا يمكن العثور على QuickShop. تحتاج إلى النظر إلى واحد.",
"no-anythings-in-your-hand": "&cلا يوجد شيء في يديك.",
"no-permission": "لا تملك الصلاحيّات للقيام بذلك.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &ball&a in chat, to sell all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From 55b331b697c1fe0d876c5ee5d20e49bf1d4fd5be Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:27 +0800
Subject: [PATCH 095/725] New translations messages.json (Afrikaans)
---
crowdin/lang/af-ZA/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/af-ZA/messages.json b/crowdin/lang/af-ZA/messages.json
index e8f4a107ab..355f5c6138 100644
--- a/crowdin/lang/af-ZA/messages.json
+++ b/crowdin/lang/af-ZA/messages.json
@@ -5,7 +5,8 @@
"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": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"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.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &ball&a in chat, to sell all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From f244da8ae50e5d95855f34895445ecc65beeb9ca Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:28 +0800
Subject: [PATCH 096/725] New translations messages.json (Spanish)
---
crowdin/lang/es-ES/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/es-ES/messages.json b/crowdin/lang/es-ES/messages.json
index 574bfe049a..9662c0a8d6 100644
--- a/crowdin/lang/es-ES/messages.json
+++ b/crowdin/lang/es-ES/messages.json
@@ -5,7 +5,8 @@
"translation-version": "&c&lVersión Soportada: &b&lReremake",
"translation-contributors": "Contribuidores: Randall_Rut, Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken y Andre_601",
"translation-country": "&c&lZona de idioma: &b&lEspañol (es_ES)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "&cNo se pudo encontrar ninguna tienda. Tienes que mirar hacia una.",
"no-anythings-in-your-hand": "&cNo hay nada en tu mano.",
"no-permission": "&cNo tienes permiso para hacer eso.",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&c¡Omitiendo el bloqueo de una QuickShop!",
"that-is-locked": "&cEsta tienda está bloqueada.",
- "how-many-buy": "&aIntroduce en el chat cuántos quieres &bCOMPRAR&a. Puedes comprar &e{0}&a. Introduce &ball&a para comprarlos todos.",
- "how-many-sell": "&aIngresa en el chat cuántos quieres &dVENDER&a. Dispones de &e{0}&a. Introduce &ball&a para venderlos todos.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cNo puedes crear una tienda aquí.",
"blacklisted-item": "&cNo puedes vender esto porque está en la lista negra",
"how-much-to-trade-for": "&aIngresa en el chat, por cuánto deseas intercambiar &e{1}x {0}&a.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cNo puedes comerciar con esta tienda porque se encuentra congelada.",
"shop-freezed-at-location": "&eTú tienda {0} en {1} se ha congelado!",
"denied-put-in-item": "&c¡No puedes poner este ítem en tu tienda!",
- "how-many-buy-stack": "&eIntroduce en el chat cuántos stacks quieres &bCOMPRAR&a. Hay &e{0}&a ítems en cada stack y puedes comprar &e{1}&a stacks. Introduce &ball&a en el chat para comprarlos todos.",
- "how-many-sell-stack": "&eIntroduce en el chat cuántos stacks quieres &bVENDER&a. Hay &e{0}&a ítems en cada stack y dispones de &e{1}&a stacks. Introduce &ball&a en el chat para venderlos todos.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNombre: &6{0}",
"code": "&eCódigo: &6{0}",
From 9879552e893e076c886fb3df841b69e11d4544a5 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:49:29 +0800
Subject: [PATCH 097/725] New translations messages.json (Chinese Traditional,
Hong Kong)
---
crowdin/lang/zh-HK/messages.json | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/crowdin/lang/zh-HK/messages.json b/crowdin/lang/zh-HK/messages.json
index 98a2f71dd5..b38137146e 100644
--- a/crowdin/lang/zh-HK/messages.json
+++ b/crowdin/lang/zh-HK/messages.json
@@ -5,7 +5,8 @@
"translation-version": "支援版本: Reremake",
"translation-contributors": "貢獻者: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken 同埋 Andre_601",
"translation-country": "語言區域: 中文(zh_HK)",
- "language-version": "62",
+ "language-version": "63",
+ "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
"not-looking-at-shop": "&c我搵唔到一個箱子商店, 唔該望住個箱, 如果唔係我辨認唔到",
"no-anythings-in-your-hand": "&c 你隻手都冇嘢",
"no-permission": "&c你冇權啊",
@@ -109,8 +110,8 @@
},
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &ball&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &ball&a in chat, to sell all.",
+ "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -306,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cYou cannot trade with this shop because it is frozen.",
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &ball&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &ball&a in chat to sell all.",
+ "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From f2a3b3a2114fceb78fbee326201e09371a997f11 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 18:14:54 +0800
Subject: [PATCH 098/725] Only apply right language-version for client
---
.../quickshop/localization/text/SimpleTextManager.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index 250ab0c382..1f9c2611e2 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -246,7 +246,11 @@ public void load() {
languageFilesManager.deployBundled(crowdinFile, loadBundled(crowdinFile));
// Loading bundled file (for no internet connection or failed loading)
JsonConfiguration configuration = loadBundled(crowdinFile.replace("%locale%", crowdinCode));
- applyOverrideConfiguration(configuration, getDistributionConfiguration(crowdinFile, crowdinCode));
+ JsonConfiguration remoteConfiguration = getDistributionConfiguration(crowdinFile, crowdinCode);
+ // Only apply right language-version for client
+ if (configuration.isSet("language-version") && configuration.getString("language-version", "0").equals(remoteConfiguration.getString("language-version", "0"))) {
+ applyOverrideConfiguration(configuration, remoteConfiguration);
+ }
// Loading override text (allow user modification the translation)
JsonConfiguration override = getOverrideConfiguration(crowdinFile, minecraftCode);
applyOverrideConfiguration(configuration, override);
From 316c8b10b6c723fda29ea31ba3da6a04993e666f Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 18:53:16 +0800
Subject: [PATCH 099/725] Fix local file not loading and language not matching
---
.../localization/text/SimpleTextManager.java | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index 1f9c2611e2..e774c6406a 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -51,6 +51,7 @@
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
+import java.nio.file.Path;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;
@@ -104,7 +105,8 @@ private File getOverrideFilesFolder(@NotNull String path) {
private JsonConfiguration loadBundled(String file) {
JsonConfiguration bundledLang = new JsonConfiguration();
File fileObject = new File(file);
- String parentStr = fileObject.getParent();
+ Path parentPath = fileObject.toPath().getParent();
+ String parentStr = parentPath != null ? parentPath.toFile().getName() : "";
String fileName = fileObject.getName();
try {
InputStream stream = null;
@@ -240,22 +242,25 @@ public void load() {
Util.debugLog("Locale: " + minecraftCode + " not enabled in configuration.");
return;
}
- availableLanguages.add(crowdinCode);
+ //Offline default file
+ JsonConfiguration defaultFile = loadBundled(crowdinFile);
+ //Add available language (minecraftCode)
+ availableLanguages.add(minecraftCode);
Util.debugLog("Loading translation for locale: " + crowdinCode + " (" + minecraftCode + ")");
// Deploy bundled to mapper
- languageFilesManager.deployBundled(crowdinFile, loadBundled(crowdinFile));
+ languageFilesManager.deployBundled(crowdinFile, defaultFile);
// Loading bundled file (for no internet connection or failed loading)
JsonConfiguration configuration = loadBundled(crowdinFile.replace("%locale%", crowdinCode));
JsonConfiguration remoteConfiguration = getDistributionConfiguration(crowdinFile, crowdinCode);
// Only apply right language-version for client
- if (configuration.isSet("language-version") && configuration.getString("language-version", "0").equals(remoteConfiguration.getString("language-version", "0"))) {
+ if (defaultFile.isSet("language-version") && defaultFile.getString("language-version", "0").equals(remoteConfiguration.getString("language-version", "0"))) {
applyOverrideConfiguration(configuration, remoteConfiguration);
}
// Loading override text (allow user modification the translation)
JsonConfiguration override = getOverrideConfiguration(crowdinFile, minecraftCode);
applyOverrideConfiguration(configuration, override);
// Deploy distribution to mapper
- languageFilesManager.deploy(crowdinFile, minecraftCode, configuration, loadBundled(crowdinFile));
+ languageFilesManager.deploy(crowdinFile, minecraftCode, configuration, defaultFile);
Util.debugLog("Locale " + crowdinFile.replace("%locale%", crowdinCode) + " has been successfully loaded");
} // Key founds in available locales but not in custom mapping on crowdin platform
catch (IOException e) {
From adc730efa482d2148f75f91d64c961c3e9eeeb04 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 18:54:46 +0800
Subject: [PATCH 100/725] Update README.md
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index eaa27db1b5..e83f6c54ca 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@
# QuickShop-Reremake
-[](https://www.codacy.com/gh/Ghost-chu/QuickShop-Reremake/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Ghost-chu/QuickShop-Reremake&utm_campaign=Badge_Grade)
-[](https://www.codefactor.io/repository/github/ghost-chu/quickshop-reremake)
+[](https://www.codacy.com/gh/PotatoCraft-Studio/QuickShop-Reremake/dashboard?utm_source=github.com&utm_medium=referral&utm_content=PotatoCraft-Studio/QuickShop-Reremake&utm_campaign=Badge_Grade)
+[](https://www.codefactor.io/repository/github/PotatoCraft-Studio/quickshop-reremake)



-[](https://app.fossa.com/projects/git%2Bgithub.com%2FGhost-chu%2FQuickShop-Reremake?ref=badge_shield)
+[](https://app.fossa.com/projects/git%2Bgithub.com%2FGhost-chu%2FQuickShop-Reremake?ref=badge_shield)
---
-orange)
@@ -99,4 +99,4 @@ if(plugin != null){
QuickShopAPI api = (QuickShopAPI)plugin;
api.xxxx;
}
-```
\ No newline at end of file
+```
From f422876184847b8e7a2b8bbfced57bed3490c201 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 19:01:03 +0800
Subject: [PATCH 101/725] Fix local file UTF-8 issue
---
.../maxgamer/quickshop/localization/text/SimpleTextManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index e774c6406a..b5a74e7c89 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -119,7 +119,7 @@ private JsonConfiguration loadBundled(String file) {
stream = plugin.getResource("lang/" + fileName);
}
if (stream != null) {
- bundledLang.loadFromString(new String(IOUtils.toByteArray(new InputStreamReader(stream, StandardCharsets.UTF_8), StandardCharsets.UTF_8)));
+ bundledLang.loadFromString(new String(IOUtils.toByteArray(new InputStreamReader(stream, StandardCharsets.UTF_8), StandardCharsets.UTF_8), StandardCharsets.UTF_8));
} else {
plugin.getLogger().log(Level.WARNING, "Cannot load bundled language file from jar, bundled language files " + (parentStr == null ? "" : parentStr) + "/" + fileName + " not found.");
bundledLang = new JsonConfiguration();
From 0ba79ea0b52fd7eb8eb7eaacd86ecb66cd40b5e8 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 19:19:14 +0800
Subject: [PATCH 102/725] Fix broken potion effect
---
src/main/java/org/maxgamer/quickshop/util/MsgUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
index 58ba8f0b61..d3a5ba3f21 100644
--- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
@@ -337,7 +337,7 @@ public static void loadPotioni18n() {
continue;
}
String potionI18n = potioni18n.getString("potioni18n." + potion.getName());
- if (StringUtils.isEmpty(potionI18n)) {
+ if (potionI18n != null && StringUtils.isEmpty(potionI18n)) {
continue;
}
String potionName = gameLanguage.getPotion(potion);
From 02129691616f77ef248a675df02f71e09e13a9f7 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 20:02:58 +0800
Subject: [PATCH 103/725] New Crowdin updates (#28)
* Update source file messages.json
* New translations messages.json (Chinese Simplified)
* New translations messages.json (Swedish)
* New translations messages.json (Romanian)
* New translations messages.json (Dutch)
* New translations messages.json (Portuguese, Brazilian)
* New translations messages.json (Vietnamese)
* New translations messages.json (English)
* 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 (Russian)
* New translations messages.json (Portuguese)
* New translations messages.json (Polish)
* New translations messages.json (Norwegian)
* New translations messages.json (Korean)
* New translations messages.json (French)
* New translations messages.json (Japanese)
* New translations messages.json (Italian)
* 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 (Chinese Traditional, Hong Kong)
---
crowdin/lang/af-ZA/messages.json | 4 ++--
crowdin/lang/ar-SA/messages.json | 4 ++--
crowdin/lang/ca-ES/messages.json | 4 ++--
crowdin/lang/cs-CZ/messages.json | 4 ++--
crowdin/lang/da-DK/messages.json | 4 ++--
crowdin/lang/de-DE/messages.json | 4 ++--
crowdin/lang/el-GR/messages.json | 4 ++--
crowdin/lang/en-US/messages.json | 4 ++--
crowdin/lang/es-ES/messages.json | 4 ++--
crowdin/lang/fi-FI/messages.json | 4 ++--
crowdin/lang/fr-FR/messages.json | 4 ++--
crowdin/lang/he-IL/messages.json | 4 ++--
crowdin/lang/hu-HU/messages.json | 4 ++--
crowdin/lang/it-IT/messages.json | 4 ++--
crowdin/lang/ja-JP/messages.json | 4 ++--
crowdin/lang/ko-KR/messages.json | 4 ++--
crowdin/lang/nl-NL/messages.json | 4 ++--
crowdin/lang/no-NO/messages.json | 4 ++--
crowdin/lang/pl-PL/messages.json | 4 ++--
crowdin/lang/pt-BR/messages.json | 4 ++--
crowdin/lang/pt-PT/messages.json | 4 ++--
crowdin/lang/ro-RO/messages.json | 4 ++--
crowdin/lang/ru-RU/messages.json | 4 ++--
crowdin/lang/sr-SP/messages.json | 4 ++--
crowdin/lang/sv-SE/messages.json | 10 +++++-----
crowdin/lang/tr-TR/messages.json | 4 ++--
crowdin/lang/uk-UA/messages.json | 4 ++--
crowdin/lang/vi-VN/messages.json | 4 ++--
crowdin/lang/zh-CN/messages.json | 4 ++--
crowdin/lang/zh-HK/messages.json | 4 ++--
crowdin/lang/zh-TW/messages.json | 4 ++--
src/main/resources/lang/messages.json | 4 ++--
32 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/crowdin/lang/af-ZA/messages.json b/crowdin/lang/af-ZA/messages.json
index 355f5c6138..6944ca2125 100644
--- a/crowdin/lang/af-ZA/messages.json
+++ b/crowdin/lang/af-ZA/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/ar-SA/messages.json b/crowdin/lang/ar-SA/messages.json
index 56433ae192..e91cf35e1a 100644
--- a/crowdin/lang/ar-SA/messages.json
+++ b/crowdin/lang/ar-SA/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/ca-ES/messages.json b/crowdin/lang/ca-ES/messages.json
index 808aab5088..617cadec7a 100644
--- a/crowdin/lang/ca-ES/messages.json
+++ b/crowdin/lang/ca-ES/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cSobrepassant un bloqueig de QuickShop!",
"that-is-locked": "&cAquesta botiga està bloquejada.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cNo pots crear una botiga aquí.",
"blacklisted-item": "&cNo pots vendre aquest objecte perquè està a la llista negra.",
"how-much-to-trade-for": "&aIntrodueix al xat per quant vols intercambiar &e{1}x {0}&a.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eLa teva botiga {0} a {1} s'ha congelat!",
"denied-put-in-item": "&cNo pots posar aquest ítem a la botiga!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNom: &6{0}",
"code": "&eCodi: &6{0}",
diff --git a/crowdin/lang/cs-CZ/messages.json b/crowdin/lang/cs-CZ/messages.json
index 24327006b2..06a6016897 100644
--- a/crowdin/lang/cs-CZ/messages.json
+++ b/crowdin/lang/cs-CZ/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cObcházíte zámek QuickShopu!",
"that-is-locked": "&cTento obchod je uzamčen.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&b▪&8▏ &bSystem &8› &cZde nemůžete vytvořit obchod.",
"blacklisted-item": "&b▪&8▏ &bSystem &8› &cNemůžete prodat tento item, protože je na černé listině",
"how-much-to-trade-for": "&7Zadejte do chatu: Cenu za kolik chcete prodávat &b{1}x {0}&7.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&bVáš obchod {0} v {1} byl zmražen!",
"denied-put-in-item": "&cTuto položku nelze vložit do vašeho obchodu!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&fJméno: &b{0}",
"code": "&fKod: &b{0}",
diff --git a/crowdin/lang/da-DK/messages.json b/crowdin/lang/da-DK/messages.json
index c01ed8a66a..00bcb13fa2 100644
--- a/crowdin/lang/da-DK/messages.json
+++ b/crowdin/lang/da-DK/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/de-DE/messages.json b/crowdin/lang/de-DE/messages.json
index b6d32f97c6..0a3c4588d4 100644
--- a/crowdin/lang/de-DE/messages.json
+++ b/crowdin/lang/de-DE/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cUmgehe eine QuickShop Sicherung!",
"that-is-locked": "&cDieser Shop ist geschützt.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cDu kannst hier keinen Shop erstellen.",
"blacklisted-item": "&cDu kannst dieses Item nicht verkaufen, da es auf der schwarzen Liste steht",
"how-much-to-trade-for": "&aGib im Chat ein, für wieviel du {1}x &e{0}&a handeln willst.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eDein Shop {0} bei {1} wurde eingefroren!",
"denied-put-in-item": "&cDu kannst dieses Item nicht in deinen Shop setzen!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/el-GR/messages.json b/crowdin/lang/el-GR/messages.json
index 355f5c6138..6944ca2125 100644
--- a/crowdin/lang/el-GR/messages.json
+++ b/crowdin/lang/el-GR/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/en-US/messages.json b/crowdin/lang/en-US/messages.json
index 06bd26e436..78177798b3 100644
--- a/crowdin/lang/en-US/messages.json
+++ b/crowdin/lang/en-US/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/es-ES/messages.json b/crowdin/lang/es-ES/messages.json
index 9662c0a8d6..053e0875dd 100644
--- a/crowdin/lang/es-ES/messages.json
+++ b/crowdin/lang/es-ES/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&c¡Omitiendo el bloqueo de una QuickShop!",
"that-is-locked": "&cEsta tienda está bloqueada.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cNo puedes crear una tienda aquí.",
"blacklisted-item": "&cNo puedes vender esto porque está en la lista negra",
"how-much-to-trade-for": "&aIngresa en el chat, por cuánto deseas intercambiar &e{1}x {0}&a.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eTú tienda {0} en {1} se ha congelado!",
"denied-put-in-item": "&c¡No puedes poner este ítem en tu tienda!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNombre: &6{0}",
"code": "&eCódigo: &6{0}",
diff --git a/crowdin/lang/fi-FI/messages.json b/crowdin/lang/fi-FI/messages.json
index 9f6f0834d7..88ae58575c 100644
--- a/crowdin/lang/fi-FI/messages.json
+++ b/crowdin/lang/fi-FI/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cOhitetaan QuickShop lukitus!",
"that-is-locked": "&cTämä kauppa on lukossa.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cEt luultavasti voi luoda kauppaa tänne.",
"blacklisted-item": "&cEt voi myydä tätä tavaraa, koska se on mustalla listalla",
"how-much-to-trade-for": "&aKirjoita chattiin, mihin hintaan haluat vaihtaa &e{1}x {0}&a.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eKauppasi {0} {1} jäätyi!",
"denied-put-in-item": "&cEt voi laittaa tätä tavaraa kauppaasi!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNimi: &6{0}",
"code": "&eKoodi: &6{0}",
diff --git a/crowdin/lang/fr-FR/messages.json b/crowdin/lang/fr-FR/messages.json
index 206e0ddd3e..528f414639 100644
--- a/crowdin/lang/fr-FR/messages.json
+++ b/crowdin/lang/fr-FR/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cContournement d'un verrou de QuickShop!",
"that-is-locked": "&cCette boutique est verouillée.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cVous ne pouvez pas créer un shop ici.",
"blacklisted-item": "&cVous ne pouvez pas vendre cet objet car il se trouve sur la liste noire",
"how-much-to-trade-for": "&aEntrez dans le chat, combien vous souhaitez échanger &e{1}x {0}&a.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eVotre boutique {0} à {1} a été gelée!",
"denied-put-in-item": "&cVous ne pouvez pas mettre cet objet dans votre boutique!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNom: &6{0}",
"code": "&eNom: &6{0}",
diff --git a/crowdin/lang/he-IL/messages.json b/crowdin/lang/he-IL/messages.json
index 355f5c6138..6944ca2125 100644
--- a/crowdin/lang/he-IL/messages.json
+++ b/crowdin/lang/he-IL/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/hu-HU/messages.json b/crowdin/lang/hu-HU/messages.json
index 0f45240212..4a02403e02 100644
--- a/crowdin/lang/hu-HU/messages.json
+++ b/crowdin/lang/hu-HU/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cA &agyorsbolt&c zárva van",
"that-is-locked": "&cEz a bolt le van zárva.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cNem tudsz boltot létrehozni itt.",
"blacklisted-item": "&cEz a tárgy a feketelistán van! Nem tudod eladni!",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eA te boltod: {0}, itt: {1}, le lett fagyasztva!",
"denied-put-in-item": "&cThis item cannot put in this shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&aNév: &6{0}",
"code": "&eKód: &6{0}",
diff --git a/crowdin/lang/it-IT/messages.json b/crowdin/lang/it-IT/messages.json
index b020cdc808..2da01c5abb 100644
--- a/crowdin/lang/it-IT/messages.json
+++ b/crowdin/lang/it-IT/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassa un blocco QuickShop!",
"that-is-locked": "&cQuesto negozio è bloccato.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cNon puoi creare un negozio qui.",
"blacklisted-item": "&cNon puoi vendere questo oggetto perché è nella blacklist",
"how-much-to-trade-for": "&aScrivi in chat, per quanto desideri fare trading &e{1}x {0}&a.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eIl tuo negozio {0} a {1} è stato congelato!",
"denied-put-in-item": "&cNon puoi mettere questo oggetto nel tuo negozio!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNome: &6{0}",
"code": "&eCodice: &6{0}",
diff --git a/crowdin/lang/ja-JP/messages.json b/crowdin/lang/ja-JP/messages.json
index 3980d77329..772a1d27f2 100644
--- a/crowdin/lang/ja-JP/messages.json
+++ b/crowdin/lang/ja-JP/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cQuickShopロックをバイパスします!",
"that-is-locked": "&cこのショップはロックされています。",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cあなたはここでショップを作る事ができません",
"blacklisted-item": "&cブラックリストに載っているので、この商品を販売することはできません",
"how-much-to-trade-for": "&aチャットで&e{1}個の {0}&aをいくらで取引したいか入力してください。",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&e {0} のショップ {1} が凍結されました!",
"denied-put-in-item": "&cショップにこのアイテムを入れることはできません!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&e名前: &6{0}",
"code": "&eコード: &6{0}",
diff --git a/crowdin/lang/ko-KR/messages.json b/crowdin/lang/ko-KR/messages.json
index e4a95d75c3..1f8e882669 100644
--- a/crowdin/lang/ko-KR/messages.json
+++ b/crowdin/lang/ko-KR/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&a QuickShop의 잠금을 무시합니다!",
"that-is-locked": "&c이 상점은 잠겨있습니다.",
"how-many-buy": "&a채팅으로 원하는 &b구매&a 개수를 입력해주세요. 당신은 &e{0}&a개를 구매할 수 있습니다. &b{1}&a을 입력해 전부 구매 가능합니다.",
- "how-many-sell": "&a채팅으로 원하는 &b판매&a 개수를 입력해주세요. 당신은 &e{0}&a개를 판매할 수 있습니다. &b{1}&a을 입력해 전부 판매 할 수 있습니다.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&c 당신은 이곳에 상점을 만들수 없습니다.",
"blacklisted-item": "&c당신은 이아이템을 판매할수 없습니다. 블랙리스트에 등록되어있는 아이템입니다.",
"how-much-to-trade-for": "&a채팅에 {0}의 {1}개당 가격을 얼마로 할건지 입력해주세요.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&e당신의 상점 {1} 에 있는 {0} 이 얼었습니다!",
"denied-put-in-item": "&c당신은 이아이템을 당신에 상점에 넣을수 없습니다!!",
"how-many-buy-stack": "&e채팅에 입력하세요, 묶음을 얼마나 &b구매&a할것인지 &e{0}&a 개의 아이템의 하나의 묶음마다 들어있으며 당신은 &e{1}&a개의 묶음을 구매할수 있습니다 &b{2}&a을 입력하여 모두 구매할수 있습니다",
- "how-many-sell-stack": "&e채팅에 입력하세요, 묶음을 얼마나 &d판매&a할것인지 &e{0}&a 개의 아이템의 하나의 묶음마다 들어있으며 당신은 &e{1}&a개의 묶음을 가지고 있습니다 &b{2}&a을 입력하여 모두 판매할수 있습니다",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&e이름: &6{0}",
"code": "&e코드: &6{0}",
diff --git a/crowdin/lang/nl-NL/messages.json b/crowdin/lang/nl-NL/messages.json
index 94e7a52854..3c14cc9b67 100644
--- a/crowdin/lang/nl-NL/messages.json
+++ b/crowdin/lang/nl-NL/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing van een QuickShop vergrendeling!",
"that-is-locked": "&cDeze winkel is vergrendeld.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cU kunt hier geen winkel aanmaken.",
"blacklisted-item": "&cJe kunt dit item niet verkopen omdat het op de zwarte lijst staat",
"how-much-to-trade-for": "&aEnter in de chat, voor hoeveel u wilt handelen &e{1}x {0}&a.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eUw winkel {0} om {1} is bevroren!",
"denied-put-in-item": "&cU kunt dit item niet in uw winkel plaatsen!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNaam: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/no-NO/messages.json b/crowdin/lang/no-NO/messages.json
index 5ea6911012..ced5203e9c 100644
--- a/crowdin/lang/no-NO/messages.json
+++ b/crowdin/lang/no-NO/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cIgnorerer en QuickShop lås!",
"that-is-locked": "&cDenne butikken er låst.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cDu kan ikke opprette en butikk her.",
"blacklisted-item": "&cDu kan ikke selge denne gjenstanden fordi den er på svartelisten",
"how-much-to-trade-for": "&aSkriv i chat hvor mye du ønsker å selge &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eDin butikk {0} på {1} ble frosset!",
"denied-put-in-item": "&cDu kan ikke legge denne varen i butikken din!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNavn: &6{0}",
"code": "&eKode: &6{0}",
diff --git a/crowdin/lang/pl-PL/messages.json b/crowdin/lang/pl-PL/messages.json
index 59e99d605b..4a537f61d7 100644
--- a/crowdin/lang/pl-PL/messages.json
+++ b/crowdin/lang/pl-PL/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cOmijanie blokady QuickShop!",
"that-is-locked": "&cTen sklep jest zablokowany.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cTu nie zrobisz sklepu.",
"blacklisted-item": "&cNie możesz sprzedać tego przedmiotu, ponieważ znajduje się na czarnej liście",
"how-much-to-trade-for": "&aWpisz na czacie cenę za &e{1}x {0}&a.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eTwój sklep {0} w {1} został zamrożony!",
"denied-put-in-item": "&cNie możesz umieścić tego przedmiotu w swoim sklepie!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNazwa: &6{0}",
"code": "&eKod: &6{0}",
diff --git a/crowdin/lang/pt-BR/messages.json b/crowdin/lang/pt-BR/messages.json
index b02c7138c7..b86e21ae81 100644
--- a/crowdin/lang/pt-BR/messages.json
+++ b/crowdin/lang/pt-BR/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cIgnorarando um bloqueio da loja!",
"that-is-locked": "&cEssa loja está bloqueada.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cVocê não pode criar uma loja aqui.",
"blacklisted-item": "&cVocê não pode vender este item porque ele está na lista negra",
"how-much-to-trade-for": "&aDigite no chat, por quanto você deseja vender &e{1}x {0}&a.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eA sua loja {0} em {1} foi congelada!",
"denied-put-in-item": "&CVocê não pode colocar este item na sua loja!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNome: &6{0}",
"code": "&eCódigo: &6{0}",
diff --git a/crowdin/lang/pt-PT/messages.json b/crowdin/lang/pt-PT/messages.json
index 9f07f977c3..2fc6bf6077 100644
--- a/crowdin/lang/pt-PT/messages.json
+++ b/crowdin/lang/pt-PT/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/ro-RO/messages.json b/crowdin/lang/ro-RO/messages.json
index 063641d296..d41f2fb6f7 100644
--- a/crowdin/lang/ro-RO/messages.json
+++ b/crowdin/lang/ro-RO/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cNu poti crea un magazin aici.",
"blacklisted-item": "&cNu poti vinde acest obiect pentru ca este pe lista neagra",
"how-much-to-trade-for": "&aIntra in chat, cat de mult doresti sa tranzacționezi &{1}x {0}&a.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/ru-RU/messages.json b/crowdin/lang/ru-RU/messages.json
index a8d6a51692..e91c796122 100644
--- a/crowdin/lang/ru-RU/messages.json
+++ b/crowdin/lang/ru-RU/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "Обход блокировки магазина!",
"that-is-locked": "&cЭтот магазин заперт.",
"how-many-buy": "&aВведите в чат, сколько вы хотите &bКУПИТЬ&a. Вы можете купить &e{0}&a. Введите &b{1}&a чтобы купить их все.",
- "how-many-sell": "&aВведите в чат, сколько вы хотите &dПРОДАТЬ&a. У вас есть &e{0}&a. Введите &b{1}&a в чате, чтобы продать все.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cВы не можете создать магазин здесь.",
"blacklisted-item": "&cВы не можете продать, оно находится в черном списке",
"how-much-to-trade-for": "&aВводите в чат, сколько вы хотите обменивать &e{1}x {0}&a.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eВаш магазин {0} на {1} был заморожен!",
"denied-put-in-item": "&cВы не можете поместить этот товар в ваш магазин!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eИмя: &6{0}",
"code": "&eКод: &6{0}",
diff --git a/crowdin/lang/sr-SP/messages.json b/crowdin/lang/sr-SP/messages.json
index 355f5c6138..6944ca2125 100644
--- a/crowdin/lang/sr-SP/messages.json
+++ b/crowdin/lang/sr-SP/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/sv-SE/messages.json b/crowdin/lang/sv-SE/messages.json
index dff733d05c..8be0d755a5 100644
--- a/crowdin/lang/sv-SE/messages.json
+++ b/crowdin/lang/sv-SE/messages.json
@@ -6,7 +6,7 @@
"translation-contributors": "Medhjälpare: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken och Andre_601",
"translation-country": "Språkområde: Svenska (sv_SE)",
"language-version": "63",
- "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
+ "not-looking-at-valid-shop-block": "&cKunde inte hitta ett block för att skapa butik. Du måste titta på ett.",
"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.",
@@ -110,8 +110,8 @@
},
"bypassing-lock": "&cIgnorerar ett butikslås!",
"that-is-locked": "&cDenna butik är låst.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-buy": "&aAnge i chatten, hur många du vill &bKÖPA&a. Du kan köpa &e{0}&a. Ange &b{1}&a för att köpa alla.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cDu får inte skapa en butik här.",
"blacklisted-item": "&cDu kan inte sälja detta föremål eftersom det finns på svartlistan",
"how-much-to-trade-for": "&aAnge i chatten, hur mycket du vill sälja &e{1}x {0}&a för.",
@@ -307,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cDu kan inte handla med denna butik eftersom den är fryst.",
"shop-freezed-at-location": "&eDin butik {0} vid {1} blev frusen!",
"denied-put-in-item": "&cDu kan inte lägga in detta objekt i din butik!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-buy-stack": "&eAnge i chatten, hur många paket du vill &bKÖPA&a. Det finns &e{0}&a föremål i varje paket och du kan köpa &e{1}&a paket. Ange &b{2}&a i chatten för att köpa alla.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eNamn: &6{0}",
"code": "&eKod: &6{0}",
diff --git a/crowdin/lang/tr-TR/messages.json b/crowdin/lang/tr-TR/messages.json
index 6dfa9ceca3..fa4a1ca098 100644
--- a/crowdin/lang/tr-TR/messages.json
+++ b/crowdin/lang/tr-TR/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBir QuickShop kilidi atlanıyor!",
"that-is-locked": "&cBu market kilitli.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cBurada bir market oluşturamazsın.",
"blacklisted-item": "&cBu öğeyi satamazsın çünkü kara listede",
"how-much-to-trade-for": "&e{1} &atane &e{0} &aiçin ne kadar ticaret yapmak istediğini sohbete yaz.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "{1} yerindeki {0} marketiniz donduruldu!",
"denied-put-in-item": "&cBu öğeyi marketine koyamazsın!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eİsim: &6{0}",
"code": "&eKod: &6{0}",
diff --git a/crowdin/lang/uk-UA/messages.json b/crowdin/lang/uk-UA/messages.json
index 355f5c6138..6944ca2125 100644
--- a/crowdin/lang/uk-UA/messages.json
+++ b/crowdin/lang/uk-UA/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/vi-VN/messages.json b/crowdin/lang/vi-VN/messages.json
index 855e9a339c..4dbfd86554 100644
--- a/crowdin/lang/vi-VN/messages.json
+++ b/crowdin/lang/vi-VN/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/zh-CN/messages.json b/crowdin/lang/zh-CN/messages.json
index 832a52161e..27d95112de 100644
--- a/crowdin/lang/zh-CN/messages.json
+++ b/crowdin/lang/zh-CN/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&c你绕过了QuickShop的锁!",
"that-is-locked": "&c这个商店已上锁。",
"how-many-buy": "&a在聊天中输入您想要&b购买&a的数量。您可以购买&e{0}&a个,输入&b{1}&a以购买全部。",
- "how-many-sell": "&a聊天栏中输入想 &d出售 &a的物品数量. 您的背包中拥有 &e{0} &a件物品。输入 &b{1}&a 来出售全部物品。",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&c你不能在这里创建商店",
"blacklisted-item": "&c这件物品已经被拉黑,你不能出售它",
"how-much-to-trade-for": "&a请在聊天中输入交易&e{1}个{0}&a所需的价格。",
@@ -308,7 +308,7 @@
"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 份. 输入 &b{2}&a 以买下所有该物品.",
- "how-many-sell-stack": "&a在聊天栏中输入你想 &d卖&a 的份数. 每份中有 &e{0}&a 个该物品, 你目前拥有 &e{1}&a 份这样的物品可卖出,输入 &b{2}&a 以卖出所有此项物品。",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&e名称: &6{0}",
"code": "&e代码: &6{0}",
diff --git a/crowdin/lang/zh-HK/messages.json b/crowdin/lang/zh-HK/messages.json
index b38137146e..41fc908d37 100644
--- a/crowdin/lang/zh-HK/messages.json
+++ b/crowdin/lang/zh-HK/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/zh-TW/messages.json b/crowdin/lang/zh-TW/messages.json
index 113cac97a5..0d7237a941 100644
--- a/crowdin/lang/zh-TW/messages.json
+++ b/crowdin/lang/zh-TW/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&c你繞過了 Quickshop 鎖 !",
"that-is-locked": "&c此商店已上鎖。",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&c你無法在此建立商店。",
"blacklisted-item": "&c由於這是黑名單的物品,所以你不能賣。",
"how-much-to-trade-for": "&a請在聊天室中輸入你想買賣 &e{1} 個 {0} &a的價格。",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&e你在 {1} 的商店 {0} 被凍結了 !",
"denied-put-in-item": "&c你不能將此物品放入你的商店 !",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&e名稱 : &6{0}",
"code": "&e代碼 : &6{0}",
diff --git a/src/main/resources/lang/messages.json b/src/main/resources/lang/messages.json
index 6944ca2125..355f5c6138 100644
--- a/src/main/resources/lang/messages.json
+++ b/src/main/resources/lang/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From a8b7ec93347643ebe295539cf14d87fb342c58d7 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 19:54:35 +0800
Subject: [PATCH 104/725] Fix broken potion effect again
---
.../localization/game/game/MojangGameLanguageImpl.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java b/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java
index da909c4b3e..ef9cc8a725 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/game/game/MojangGameLanguageImpl.java
@@ -163,12 +163,18 @@ public String getBlock(@NotNull Material material) {
return jsonElement.getAsString();
}
+ private static final boolean isPotionSupportMinecraftKey = Util.isMethodAvailable("org.bukkit.potion.PotionEffectType", "getKey");
@Override
public @NotNull String getPotion(@NotNull PotionEffectType potionEffectType) {
if (lang == null) {
return super.getPotion(potionEffectType);
}
- JsonElement jsonElement = lang.get("effect.minecraft." + potionEffectType.getName().toLowerCase());
+ JsonElement jsonElement;
+ if (isPotionSupportMinecraftKey) {
+ jsonElement = lang.get("effect.minecraft." + potionEffectType.getKey().getKey().toLowerCase());
+ } else {
+ jsonElement = lang.get("effect.minecraft." + potionEffectType.getName().toLowerCase());
+ }
if (jsonElement == null) {
return super.getPotion(potionEffectType);
}
From be352fda21e1a324df7d9d0276b27c46b1b99549 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 19:54:58 +0800
Subject: [PATCH 105/725] Add missed findRelativeLanguages
---
.../maxgamer/quickshop/localization/text/SimpleTextManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index b5a74e7c89..8891ddfac0 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -599,7 +599,7 @@ private String postProcess(@NotNull String text) {
@Override
@NotNull
public String forLocale(@NotNull String locale) {
- JsonConfiguration index = mapping.get(locale);
+ JsonConfiguration index = mapping.get(manager.findRelativeLanguages(locale));
if (index == null) {
Util.debugLog("Fallback " + locale + " to default game-language locale caused by QuickShop doesn't support this locale");
if (MsgUtil.getDefaultGameLanguageCode().equals(locale)) {
From 3a2f4b436686b60a43265bbaa2b3cce247897835 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 19:55:31 +0800
Subject: [PATCH 106/725] Deleted getContributors which not supported by 1.15
---
.../quickshop/util/collector/adapter/CollectorAdapter.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/util/collector/adapter/CollectorAdapter.java b/src/main/java/org/maxgamer/quickshop/util/collector/adapter/CollectorAdapter.java
index fe2a26a3c7..e94e34c6bf 100644
--- a/src/main/java/org/maxgamer/quickshop/util/collector/adapter/CollectorAdapter.java
+++ b/src/main/java/org/maxgamer/quickshop/util/collector/adapter/CollectorAdapter.java
@@ -166,7 +166,6 @@ public class CollectorAdapter {
perPlugin.put("data_folder", pl.getDataFolder());
perPlugin.put("api_version", pl.getDescription().getAPIVersion());
perPlugin.put("authors", Util.list2String(pl.getDescription().getAuthors()));
- perPlugin.put("contributors", Util.list2String(pl.getDescription().getContributors()));
perPlugin.put("depend", Util.list2String(pl.getDescription().getDepend()));
perPlugin.put("soft_depend", Util.list2String(pl.getDescription().getSoftDepend()));
perPlugin.put("is_addon", pl.getDescription().getDepend().contains("QuickShop") || pl.getDescription().getSoftDepend().contains("QuickShop"));
From 3c99c5a905cedb0233970f692961e5f1821293e6 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 12 Dec 2021 20:04:27 +0800
Subject: [PATCH 107/725] Bump to 5.1.0.0
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 503bc5e2ad..9716e0b1b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
QuickShop
- 5.0.0.17
+ 5.1.0.0
org.maxgamer.quickshop
Ghost-chu
UTF-8
From 4550c5a54c9fd75e0d0a09e420128c5b550248a0 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Sun, 12 Dec 2021 20:34:40 +0800
Subject: [PATCH 108/725] 5.1.0.0 (#29) (#30)
* Allow addon to hook the Inventory getting
* bump ver
* New translations messages.json (Dutch)
* Update config.yml
* Bump sqlite-jdbc from 3.34.0 to 3.36.0.3
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.34.0 to 3.36.0.3.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.34.0...3.36.0.3)
---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
* Bump okhttp from 4.9.2 to 4.9.3
Bumps [okhttp](https://github.com/square/okhttp) from 4.9.2 to 4.9.3.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.9.2...parent-4.9.3)
---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
* Fix broken readme
* Fix broken readme again
* [FactionUUID] Drop support for 0.5.x and support 0.6.x
* New translations messages.json (English)
* New translations messages.json (Korean)
* Bump paperlib from 1.0.6 to 1.0.7
Bumps [paperlib](https://github.com/PaperMC/PaperLib) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/PaperMC/PaperLib/releases)
- [Changelog](https://github.com/PaperMC/PaperLib/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PaperMC/PaperLib/compare/1.0.6...v1.0.7)
---
updated-dependencies:
- dependency-name: io.papermc:paperlib
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
* [WorldGuardIntegration] Fix global region issue
* New translations messages.json (Korean)
* Try to fix sync issue
* Fix shade issue
* Change to common-lang3, adapt to spigot 1.18 lib changes
* Revert wrong changes
* Volatile the dev-mode, prevent some issues
* Target to 1.18-rc3
* Remove lombok.NonNull and javax.annotation.Nonnull usage
* Fix auto despawn watcher
* Deprecated DisplayWatcher
* Re-add "Enchantment name shows on enchanted books" feature
* Fix ShopPurger
* Update crowdin.yml
* Fixed a bug in which the Find command would display the result multiple times.
* Fix case-sensitive and underscore issue in enabled languages
* Fix NoClassDefFoundError not handled by catch statement
* Bump junit-jupiter-api from 5.8.1 to 5.8.2
Bumps [junit-jupiter-api](https://github.com/junit-team/junit5) from 5.8.1 to 5.8.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.8.1...r5.8.2)
---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
* Adapt to 1.18
* Fix item namespace method finding issue, also fix fallback
* Fix caching issue, invalidate cache when getting
* Fix case-sensitive issue in enabled languages
* Switch access token to new one
* Bump IridiumSkyblock from 3.1.2 to 3.2.2
Bumps IridiumSkyblock from 3.1.2 to 3.2.2.
---
updated-dependencies:
- dependency-name: com.iridium:IridiumSkyblock
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
* #16 Try to fix cache method issue
* Delete incorrect reloaction
* Fix mistaken on update message
* Fix price command bypassing the integer only option.
* Bump advanced-region-market from 3.3.5 to 3.3.6
Bumps advanced-region-market from 3.3.5 to 3.3.6.
---
updated-dependencies:
- dependency-name: com.github.alex9849:advanced-region-market
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
* Bump SongodaCore from 2.5.14 to 2.6.3
Bumps SongodaCore from 2.5.14 to 2.6.3.
---
updated-dependencies:
- dependency-name: com.songoda:SongodaCore
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
* Fix #20, correct the event using
* Fix #17
* Change misleading configuration description
* Backport for NPE fix
* Don't use SimplixStorage
* Refactor new language system [1/3]
preparing local language files
* Fix color issue with certain input
* Fix testing and bump spigot-api to 1.18.1-R0.1-SNAPSHOT
* Fix test
* Fix comment missing issue, implement itself comment updater
* Delete backup when update successful
* Handle local files loading
* Fix plugin loading stuck on i18n loading
* Printing errors when cannot create column
* Fix misleading message and apply tradeAllWord to trade message
* Fix NoSuchFileException
* Loading bundled file for not internet connection
* Language System improvement
Let cachedGameLanguageCode only caching default one
Fix stuck loading issue for textManager
Add related languages code matching, Fix #1
* Update languagesCache only when no cache
* Fix misleading sell messages
* Fix misleading sell messages
* Try to fix crowdin issue
* Update Crowdin configuration file
* Try to fix crowdin issue again
* New translations messages.json (Romanian)
* New translations messages.json (Dutch)
* New translations messages.json (Portuguese, Brazilian)
* New translations messages.json (Vietnamese)
* New translations messages.json (English)
* 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 (Russian)
* New translations messages.json (Portuguese)
* New translations messages.json (Polish)
* New translations messages.json (Norwegian)
* New translations messages.json (Korean)
* New translations messages.json (French)
* New translations messages.json (Japanese)
* New translations messages.json (Italian)
* 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 (Chinese Traditional, Hong Kong)
* Only apply right language-version for client
* Fix local file not loading and language not matching
* Update README.md
* Fix local file UTF-8 issue
* Fix broken potion effect
* New Crowdin updates (#28)
* Update source file messages.json
* New translations messages.json (Chinese Simplified)
* New translations messages.json (Swedish)
* New translations messages.json (Romanian)
* New translations messages.json (Dutch)
* New translations messages.json (Portuguese, Brazilian)
* New translations messages.json (Vietnamese)
* New translations messages.json (English)
* 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 (Russian)
* New translations messages.json (Portuguese)
* New translations messages.json (Polish)
* New translations messages.json (Norwegian)
* New translations messages.json (Korean)
* New translations messages.json (French)
* New translations messages.json (Japanese)
* New translations messages.json (Italian)
* 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 (Chinese Traditional, Hong Kong)
* Fix broken potion effect again
* Add missed findRelativeLanguages
* Deleted getContributors which not supported by 1.15
* Bump to 5.1.0.0
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: nikomaru <76208219+nlkomaru@users.noreply.github.com>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
Co-authored-by: Ghost_chu <30802565+Ghost-chu@users.noreply.github.com>
Co-authored-by: Ghost_chu <2908803755@qq.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: nikomaru <76208219+nlkomaru@users.noreply.github.com>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
From acb174df5cb6b9261dc3acf3850a6b25915fd468 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Mon, 13 Dec 2021 00:46:03 +0800
Subject: [PATCH 109/725] Fix purging wrong shop issue How can this code was
write?????
---
src/main/java/org/maxgamer/quickshop/util/Util.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java
index 72ef8980f5..05266c4c8d 100644
--- a/src/main/java/org/maxgamer/quickshop/util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/util/Util.java
@@ -1302,7 +1302,7 @@ public static LocalDateTime getDateTimeFromTimestamp(long timestamp) {
if (timestamp == 0) {
return null;
}
- return LocalDateTime.ofInstant(Instant.ofEpochSecond(timestamp), TimeZone
+ return LocalDateTime.ofInstant(Instant.ofEpochMilli(timestamp), TimeZone
.getDefault().toZoneId());
}
From b644f56600210e9313727bd80f1ec653c0b13913 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Mon, 13 Dec 2021 00:52:59 +0800
Subject: [PATCH 110/725] Make a backup before purging
---
src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java b/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java
index 12f4289e1c..e505571b80 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ShopPurger.java
@@ -29,6 +29,7 @@
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
public class ShopPurger implements Runnable {
@@ -56,7 +57,10 @@ public void purge() {
public void run() {
Util.ensureThread(true);
executing = true;
- Util.debugLog("[Shop Purger] Scanning and removing shops");
+
+ String backupFileName = "shop-purge-backup-" + UUID.randomUUID() + ".txt";
+ Util.makeExportBackup(backupFileName);
+ plugin.getLogger().info("[Shop Purger] Scanning and removing shops, we have backup shop data as" + backupFileName + ", if you ran into any trouble, please rename it to recovery.txt then use /qs recovery in console to rollback");
List pendingRemovalShops = new ArrayList<>();
int days = plugin.getConfig().getInt("purge.days", 360);
boolean deleteBanned = plugin.getConfig().getBoolean("purge.banned");
From 1078d45a6f585fbfd4300f102e6461ffe54a36fa Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Mon, 13 Dec 2021 00:55:14 +0800
Subject: [PATCH 111/725] 5.1.0.1
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 9716e0b1b6..3038972539 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
QuickShop
- 5.1.0.0
+ 5.1.0.1
org.maxgamer.quickshop
Ghost-chu
UTF-8
From 737d9f1cdb8228d442f631aa447a1d2eaf5d34f7 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Mon, 13 Dec 2021 13:19:56 +0800
Subject: [PATCH 112/725] Fix silent command throwing exception when input is
invalid
---
.../command/subcommand/SubCommand_SilentBuy.java | 11 +++++++++--
.../command/subcommand/SubCommand_SilentEmpty.java | 12 ++++++++++--
.../command/subcommand/SubCommand_SilentPreview.java | 12 ++++++++++--
.../command/subcommand/SubCommand_SilentRemove.java | 12 ++++++++++--
.../command/subcommand/SubCommand_SilentSell.java | 12 ++++++++++--
.../subcommand/SubCommand_SilentUnlimited.java | 12 ++++++++++--
6 files changed, 59 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentBuy.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentBuy.java
index c5fee44b37..fc77131560 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentBuy.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentBuy.java
@@ -38,12 +38,19 @@ public class SubCommand_SilentBuy implements CommandHandler {
@Override
public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
- if (cmdArg.length < 1) {
+ if (cmdArg.length != 1) {
Util.debugLog("Exception on command! Canceling!");
return;
}
+ UUID uuid;
+ try {
+ uuid = UUID.fromString(cmdArg[0]);
+ } catch (IllegalArgumentException e) {
+ //Not valid, return for doing nothing
+ return;
+ }
- Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(UUID.fromString(cmdArg[0]));
+ Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(uuid);
if (shop == null || !shop.getModerator().isModerator(sender.getUniqueId())) {
plugin.text().of(sender, "not-looking-at-shop").send();
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentEmpty.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentEmpty.java
index 98f8eea7a5..5ef928a5dd 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentEmpty.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentEmpty.java
@@ -39,12 +39,20 @@ public class SubCommand_SilentEmpty implements CommandHandler {
@Override
public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
- if (cmdArg.length < 1) {
+ if (cmdArg.length != 1) {
Util.debugLog("Exception on command! Canceling!");
return;
}
- Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(UUID.fromString(cmdArg[0]));
+ UUID uuid;
+ try {
+ uuid = UUID.fromString(cmdArg[0]);
+ } catch (IllegalArgumentException e) {
+ //Not valid, return for doing nothing
+ return;
+ }
+
+ Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(uuid);
if (!(shop instanceof ContainerShop)) {
plugin.text().of(sender, "not-looking-at-shop").send();
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentPreview.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentPreview.java
index 03ed0f3744..91867abfe8 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentPreview.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentPreview.java
@@ -37,12 +37,20 @@ public class SubCommand_SilentPreview implements CommandHandler {
@Override
public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
- if (cmdArg.length < 1) {
+ if (cmdArg.length != 1) {
Util.debugLog("Exception on command! Canceling!");
return;
}
- Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(UUID.fromString(cmdArg[0]));
+ UUID uuid;
+ try {
+ uuid = UUID.fromString(cmdArg[0]);
+ } catch (IllegalArgumentException e) {
+ //Not valid, return for doing nothing
+ return;
+ }
+
+ Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(uuid);
if (!(shop instanceof ContainerShop)) {
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentRemove.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentRemove.java
index ea6723a6ed..cdf0d0132f 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentRemove.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentRemove.java
@@ -37,12 +37,20 @@ public class SubCommand_SilentRemove implements CommandHandler {
@Override
public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
- if (cmdArg.length < 1) {
+ if (cmdArg.length != 1) {
Util.debugLog("Exception on command! Canceling!");
return;
}
- Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(UUID.fromString(cmdArg[0]));
+ UUID uuid;
+ try {
+ uuid = UUID.fromString(cmdArg[0]);
+ } catch (IllegalArgumentException e) {
+ //Not valid, return for doing nothing
+ return;
+ }
+
+ Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(uuid);
if (shop == null) {
plugin.text().of(sender, "not-looking-at-shop").send();
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentSell.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentSell.java
index 2769e29d0d..d6835bc658 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentSell.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentSell.java
@@ -38,12 +38,20 @@ public class SubCommand_SilentSell implements CommandHandler {
@Override
public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
- if (cmdArg.length < 1) {
+ if (cmdArg.length != 1) {
Util.debugLog("Exception on command! Canceling!");
return;
}
- Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(UUID.fromString(cmdArg[0]));
+ UUID uuid;
+ try {
+ uuid = UUID.fromString(cmdArg[0]);
+ } catch (IllegalArgumentException e) {
+ //Not valid, return for doing nothing
+ return;
+ }
+
+ Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(uuid);
if (shop == null || !shop.getModerator().isModerator(sender.getUniqueId())) {
plugin.text().of(sender, "not-looking-at-shop").send();
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentUnlimited.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentUnlimited.java
index 0cd2c20873..1d20ae087a 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentUnlimited.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_SilentUnlimited.java
@@ -37,12 +37,20 @@ public class SubCommand_SilentUnlimited implements CommandHandler {
@Override
public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
- if (cmdArg.length < 1) {
+ if (cmdArg.length != 1) {
Util.debugLog("Exception on command! Canceling!");
return;
}
- Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(UUID.fromString(cmdArg[0]));
+ UUID uuid;
+ try {
+ uuid = UUID.fromString(cmdArg[0]);
+ } catch (IllegalArgumentException e) {
+ //Not valid, return for doing nothing
+ return;
+ }
+
+ Shop shop = plugin.getShopManager().getShopFromRuntimeRandomUniqueId(uuid);
if (shop == null) {
plugin.text().of(sender, "not-looking-at-shop").send();
From 28def09c1ccea6d7be773eda6d7e76eb8002af9d Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Mon, 13 Dec 2021 13:20:16 +0800
Subject: [PATCH 113/725] Bump to 5.1.0.2
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 3038972539..9d6cf03326 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
QuickShop
- 5.1.0.1
+ 5.1.0.2
org.maxgamer.quickshop
Ghost-chu
UTF-8
From 1bf758b9cc6e9f8432bc5366eb6a26487ccb5f21 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Mon, 13 Dec 2021 13:59:12 +0800
Subject: [PATCH 114/725] =?UTF-8?q?Fix=20"=C2=A7r"=20is=20not=20working?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main/java/org/maxgamer/quickshop/util/Util.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java
index 05266c4c8d..bc6cb81e84 100644
--- a/src/main/java/org/maxgamer/quickshop/util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/util/Util.java
@@ -975,7 +975,8 @@ public static String parseColours(@Nullable String text) {
MineDownParser parser = MINEDOWN.get().parser();
parser.reset();
StringBuilder builder = new StringBuilder();
- BaseComponent[] components = parser.enable(MineDownParser.Option.LEGACY_COLORS).parse(text).create();
+ BaseComponent[] components = parser.enable(MineDownParser.Option.LEGACY_COLORS).backwardsCompatibility(true).parse(text).create();
+ BaseComponent lastComponent = null;
for (BaseComponent component : components) {
ChatColor color = component.getColorRaw();
String legacyText = component.toLegacyText();
@@ -983,7 +984,17 @@ public static String parseColours(@Nullable String text) {
//Remove redundant §f added by toLegacyText
legacyText = legacyText.substring(2);
}
+ if (lastComponent != null && (
+ lastComponent.isBold() != component.isBold() ||
+ lastComponent.isItalic() != component.isItalic() ||
+ lastComponent.isObfuscated() != component.isObfuscated() ||
+ lastComponent.isStrikethrough() != component.isStrikethrough() ||
+ lastComponent.isUnderlined() != lastComponent.isUnderlined()
+ )) {
+ builder.append("§r");
+ }
builder.append(legacyText);
+ lastComponent = component;
}
return builder.toString();
}
From 0d0c41e53e516b897af0fc6f53808b8d9eae9e0b Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Mon, 13 Dec 2021 18:44:46 +0800
Subject: [PATCH 115/725] Fix coloring issue
---
.../platform/minedown/BungeeQuickChat.java | 124 +++++++++++++++---
.../command/subcommand/SubCommand_Find.java | 6 +-
.../quickshop/shop/ContainerShop.java | 41 +++---
.../org/maxgamer/quickshop/util/MsgUtil.java | 6 +-
.../org/maxgamer/quickshop/util/Util.java | 33 +----
5 files changed, 140 insertions(+), 70 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java b/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
index 4139a47e14..cfa2952904 100644
--- a/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
+++ b/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
@@ -51,12 +51,8 @@
public class BungeeQuickChat implements QuickChat {
private final QuickShop plugin;
- @Override
- public void send(@NotNull CommandSender receiver, @Nullable String message) {
- if (StringUtils.isEmpty(message)) {
- return;
- }
- receiver.spigot().sendMessage(TextComponent.fromLegacyText(message));
+ public static BaseComponent[] fromLegacyText(String text) {
+ return TextComponent.fromLegacyText(text, null);
}
@Override
@@ -76,22 +72,54 @@ public void send(@NotNull CommandSender receiver, @Nullable QuickComponent compo
}
+ public static String toLegacyText(BaseComponent[] components) {
+ StringBuilder builder = new StringBuilder();
+ BaseComponent lastComponent = null;
+ for (BaseComponent component : components) {
+ net.md_5.bungee.api.ChatColor color = component.getColorRaw();
+ String legacyText = component.toLegacyText();
+ if (color == null && legacyText.startsWith("§f")) {
+ //Remove redundant §f added by toLegacyText
+ legacyText = legacyText.substring(2);
+ }
+ if (lastComponent != null && (
+ lastComponent.isBold() != component.isBold() ||
+ lastComponent.isItalic() != component.isItalic() ||
+ lastComponent.isObfuscated() != component.isObfuscated() ||
+ lastComponent.isStrikethrough() != component.isStrikethrough() ||
+ lastComponent.isUnderlined() != lastComponent.isUnderlined()
+ )) {
+ builder.append("§r");
+ }
+ builder.append(legacyText);
+ lastComponent = component;
+ }
+ return builder.toString();
+ }
+
+ @Override
+ public void send(@NotNull CommandSender receiver, @Nullable String message) {
+ if (StringUtils.isEmpty(message)) {
+ return;
+ }
+ receiver.spigot().sendMessage(fromLegacyText(message));
+ }
+
@Override
public void sendItemHologramChat(@NotNull Player player, @NotNull String text, @NotNull ItemStack itemStack) {
TextComponent errorComponent = new TextComponent(plugin.text().of(player, "menu.item-holochat-error").forLocale());
try {
String json = ReflectFactory.convertBukkitItemStackToJson(itemStack);
- ComponentBuilder builder = new ComponentBuilder("");
+ BungeeComponentBuilder builder = new BungeeComponentBuilder();
builder.event(new HoverEvent(HoverEvent.Action.SHOW_ITEM, new ComponentBuilder(json).create()));
TextSplitter.SpilledString spilledString = TextSplitter.deBakeItem(text);
if (spilledString == null) {
Util.debugLog("Spilled string is null");
builder.appendLegacy(text);
} else {
- builder.appendLegacy(spilledString.getLeft());
- net.md_5.bungee.api.ChatColor color = builder.getCurrentComponent().getColorRaw();
- builder.append(spilledString.getComponents()).color(color);
- builder.appendLegacy(spilledString.getRight()).color(color);
+ builder.appendLegacy(spilledString.getLeft())
+ .append(spilledString.getComponents())
+ .appendLegacy(spilledString.getRight());
}
BaseComponent[] components = builder.create();
Util.debugLog("Sending debug: " + ComponentSerializer.toString(components));
@@ -110,19 +138,18 @@ public void sendItemHologramChat(@NotNull Player player, @NotNull String text, @
if (json == null) {
return new QuickComponentImpl(errorComponent);
}
- ComponentBuilder builder = new ComponentBuilder("");
+ BungeeComponentBuilder builder = new BungeeComponentBuilder();
builder.event(new HoverEvent(HoverEvent.Action.SHOW_ITEM, new ComponentBuilder(json).create()));
TextSplitter.SpilledString spilledString = TextSplitter.deBakeItem(message);
if (spilledString == null) {
builder.appendLegacy(message);
} else {
- builder.appendLegacy(spilledString.getLeft());
- net.md_5.bungee.api.ChatColor color = builder.getCurrentComponent().getColorRaw();
- builder.append(spilledString.getComponents()).color(color);
- builder.reset().appendLegacy(spilledString.getRight()).color(color);
+ builder.appendLegacy(spilledString.getLeft())
+ .append(spilledString.getComponents())
+ .appendLegacy(spilledString.getRight());
}
- builder.appendLegacy(" ").appendLegacy(plugin.text().of(player, "menu.preview").forLocale());
+ builder.append(" ").appendLegacy(plugin.text().of(player, "menu.preview").forLocale());
if (QuickShop.getPermissionManager().hasPermission(player, "quickshop.preview")) {
builder.event(new ClickEvent(
ClickEvent.Action.RUN_COMMAND,
@@ -137,6 +164,69 @@ public void sendItemHologramChat(@NotNull Player player, @NotNull String text, @
}
}
+ public static class BungeeComponentBuilder {
+ private final ComponentBuilder builder;
+
+ public BungeeComponentBuilder() {
+ builder = new ComponentBuilder("");
+ builder.removeComponent(0);
+ }
+
+ public BungeeComponentBuilder append(BaseComponent component) {
+ if (builder.getCursor() == -1) {
+ builder.append(component, ComponentBuilder.FormatRetention.NONE);
+ } else {
+ builder.append(component);
+ }
+ return this;
+ }
+
+ public BungeeComponentBuilder append(BaseComponent[] components) {
+ if (builder.getCursor() == -1) {
+ builder.append(components, ComponentBuilder.FormatRetention.NONE);
+ } else {
+ builder.append(components);
+ }
+ return this;
+ }
+
+ public BungeeComponentBuilder append(String text) {
+ if (builder.getCursor() == -1) {
+ builder.append(text, ComponentBuilder.FormatRetention.NONE);
+ } else {
+ builder.append(text);
+ }
+ return this;
+ }
+
+ public BungeeComponentBuilder appendLegacy(String text) {
+ return append(fromLegacyText(text));
+ }
+
+ public BungeeComponentBuilder event(ClickEvent clickEvent) {
+ builder.event(clickEvent);
+ return this;
+ }
+
+ public BungeeComponentBuilder event(HoverEvent hoverEvent) {
+ builder.event(hoverEvent);
+ return this;
+ }
+
+ public BungeeComponentBuilder reset() {
+ builder.reset();
+ return this;
+ }
+
+ public BaseComponent[] create() {
+ return builder.create();
+ }
+
+ public ComponentBuilder color(net.md_5.bungee.api.ChatColor color) {
+ return builder.color(color);
+ }
+ }
+
@Override
public @NotNull QuickComponent getItemTextComponent(@NotNull Player player, @NotNull ItemStack itemStack, @NotNull String normalText) {
TextComponent errorComponent = new TextComponent(plugin.text().of(player, "menu.item-holochat-error").forLocale());
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
index f36556d2bf..333ae8f096 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
@@ -36,6 +36,8 @@
import java.util.*;
import java.util.stream.Collectors;
+import static org.maxgamer.quickshop.chat.platform.minedown.BungeeQuickChat.toLegacyText;
+
@AllArgsConstructor
public class SubCommand_Find implements CommandHandler {
@@ -127,8 +129,8 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
Location location = shop.getLocation();
// "nearby-shop-entry": "&a- Info:{0} &aPrice:&b{1} &ax:&b{2} &ay:&b{3} &az:&b{4} &adistance: &b{5} &ablock(s)"
stringBuilder.append(plugin.text().of(sender, "nearby-shop-entry",
- new TextComponent(shop.getSignText(sender.getLocale()).get(1).getComponents()).toLegacyText(),
- new TextComponent(shop.getSignText(sender.getLocale()).get(3).getComponents()).toLegacyText(),
+ new TextComponent(toLegacyText(shop.getSignText(sender.getLocale()).get(1).getComponents())),
+ new TextComponent(toLegacyText(shop.getSignText(sender.getLocale()).get(3).getComponents())),
String.valueOf(location.getBlockX()),
String.valueOf(location.getBlockY()),
String.valueOf(location.getBlockZ()),
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index 83bb41e480..5254e17b7e 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -24,10 +24,7 @@
import io.papermc.lib.PaperLib;
import lombok.EqualsAndHashCode;
import me.lucko.helper.serialize.BlockPosition;
-import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.BaseComponent;
-import net.md_5.bungee.api.chat.ComponentBuilder;
-import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.DyeColor;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -53,6 +50,7 @@
import org.maxgamer.quickshop.api.chat.ComponentPackage;
import org.maxgamer.quickshop.api.event.*;
import org.maxgamer.quickshop.api.shop.*;
+import org.maxgamer.quickshop.chat.platform.minedown.BungeeQuickChat;
import org.maxgamer.quickshop.util.MsgUtil;
import org.maxgamer.quickshop.util.Util;
import org.maxgamer.quickshop.util.logging.container.ShopRemoveLog;
@@ -60,6 +58,9 @@
import java.util.*;
import java.util.logging.Level;
+import static org.maxgamer.quickshop.chat.platform.minedown.BungeeQuickChat.fromLegacyText;
+import static org.maxgamer.quickshop.chat.platform.minedown.BungeeQuickChat.toLegacyText;
+
/**
* ChestShop core
*/
@@ -696,7 +697,7 @@ public List getSignText(@NotNull String locale) {
List lines = new ArrayList<>();
//Line 1
String statusStringKey = inventoryAvailable() ? "signs.status-available" : "signs.status-unavailable";
- lines.add(new ComponentPackage(TextComponent.fromLegacyText(plugin.text().of("signs.header", this.ownerName(false), plugin.text().of(statusStringKey).forLocale(locale)).forLocale(locale))));
+ lines.add(new ComponentPackage(fromLegacyText(plugin.text().of("signs.header", this.ownerName(false), plugin.text().of(statusStringKey).forLocale(locale)).forLocale(locale))));
//Line 2
String tradingStringKey;
@@ -735,34 +736,32 @@ public List getSignText(@NotNull String locale) {
}
// TODO No-longer use SHOP_SIGN_PREFIX since we use modern storage method. Pending for deletion.
- lines.add(new ComponentPackage(new ComponentBuilder("").appendLegacy(SHOP_SIGN_PREFIX).reset().color(ChatColor.RESET).appendLegacy(line2).create()));
+ lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder().appendLegacy(SHOP_SIGN_PREFIX).appendLegacy(line2).create()));
//line 3
if (plugin.getConfig().getBoolean("shop.force-use-item-original-name") || !this.getItem().hasItemMeta() || !this.getItem().getItemMeta().hasDisplayName()) {
- BaseComponent[] left = TextComponent.fromLegacyText(plugin.text().of("signs.item-left").forLocale());
- BaseComponent[] right = TextComponent.fromLegacyText(plugin.text().of("signs.item-right").forLocale());
+ String left = plugin.text().of("signs.item-left").forLocale();
+ String right = plugin.text().of("signs.item-right").forLocale();
if (plugin.getNbtapi() == null) {
// NBTAPI not installed
- lines.add(new ComponentPackage(new ComponentBuilder("")
- .color(ChatColor.RESET)
- .append(left)
- .append(TextComponent.fromLegacyText(Util.getItemStackName(getItem())))
- .append(right)
+ lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder()
+ .appendLegacy(left)
+ .appendLegacy(Util.getItemStackName(getItem()))
+ .appendLegacy(right)
.create()));
} else {
// NBTAPI installed
String itemName = Util.getItemCustomName(getItem());
- BaseComponent[] itemComponents = itemName == null ? Util.getTranslateComponentForItem(getItem()) : TextComponent.fromLegacyText(itemName);
- lines.add(new ComponentPackage(new ComponentBuilder("")
- .color(ChatColor.RESET)
- .append(left)
+ BaseComponent[] itemComponents = itemName == null ? Util.getTranslateComponentForItem(getItem()) : fromLegacyText(itemName);
+ lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder()
+ .appendLegacy(left)
.append(itemComponents)
- .append(right)
+ .appendLegacy(right)
.create()));
}
} else {
- lines.add(new ComponentPackage(new ComponentBuilder("").color(ChatColor.RESET).appendLegacy(plugin.text().of("signs.item-left").forLocale())
- .append(TextComponent.fromLegacyText(Util.getItemStackName(getItem())))
+ lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder().appendLegacy(plugin.text().of("signs.item-left").forLocale())
+ .appendLegacy(Util.getItemStackName(getItem()))
.appendLegacy(plugin.text().of("signs.item-right").forLocale()).create()));
}
@@ -775,7 +774,7 @@ public List getSignText(@NotNull String locale) {
} else {
line4 = plugin.text().of("signs.price", plugin.getShopManager().format(this.getPrice(), this)).forLocale();
}
- lines.add(new ComponentPackage(new ComponentBuilder("").color(ChatColor.RESET).appendLegacy(line4).create()));
+ lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder().appendLegacy(line4).create()));
return lines;
}
@@ -798,7 +797,7 @@ public void setSignText(@NotNull List lines) {
if (tileSign != null) {
tileSign.setString("Text" + (i + 1), Util.componentsToJson(lines.get(i).getComponents()));
} else {
- sign.setLine(i, new TextComponent(lines.get(i).getComponents()).toLegacyText());
+ sign.setLine(i, toLegacyText(lines.get(i).getComponents()));
}
}
if (plugin.getGameVersion().isSignTextDyeSupport()) {
diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
index d3a5ba3f21..51d2cc6cd1 100644
--- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
@@ -26,7 +26,6 @@
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
-import net.md_5.bungee.api.chat.ComponentBuilder;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@@ -50,6 +49,7 @@
import org.maxgamer.quickshop.api.event.ShopControlPanelOpenEvent;
import org.maxgamer.quickshop.api.shop.Shop;
import org.maxgamer.quickshop.chat.QuickComponentImpl;
+import org.maxgamer.quickshop.chat.platform.minedown.BungeeQuickChat;
import org.maxgamer.quickshop.localization.game.game.GameLanguage;
import org.maxgamer.quickshop.localization.game.game.MojangGameLanguageImpl;
import org.maxgamer.quickshop.util.logging.container.PluginGlobalAlertLog;
@@ -228,7 +228,7 @@ public static String getTranslateText(ItemStack stack) {
}
public static String convertItemStackToTranslateText(Material mat) {
- return TextSplitter.bakeComponent(new ComponentBuilder("").append(Util.getTranslateComponentForMaterial(mat)).create());
+ return TextSplitter.bakeComponent(new BungeeQuickChat.BungeeComponentBuilder().append(Util.getTranslateComponentForMaterial(mat)).create());
}
@Unstable
@@ -739,7 +739,7 @@ public static void sendDirectMessage(@Nullable CommandSender sender, @Nullable S
if (spilledString == null) {
plugin.getQuickChat().send(sender, msg);
} else {
- ComponentBuilder builder = new ComponentBuilder("");
+ BungeeQuickChat.BungeeComponentBuilder builder = new BungeeQuickChat.BungeeComponentBuilder();
builder.appendLegacy(spilledString.getLeft());
builder.append(spilledString.getComponents());
builder.appendLegacy(spilledString.getRight());
diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java
index bc6cb81e84..96484f95f0 100644
--- a/src/main/java/org/maxgamer/quickshop/util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/util/Util.java
@@ -26,9 +26,7 @@
import lombok.Getter;
import lombok.Setter;
import lombok.SneakyThrows;
-import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.BaseComponent;
-import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.chat.TranslatableComponent;
import net.md_5.bungee.chat.ComponentSerializer;
import org.apache.commons.lang3.StringUtils;
@@ -77,6 +75,9 @@
import java.util.logging.Level;
import java.util.stream.Collectors;
+import static org.maxgamer.quickshop.chat.platform.minedown.BungeeQuickChat.fromLegacyText;
+import static org.maxgamer.quickshop.chat.platform.minedown.BungeeQuickChat.toLegacyText;
+
public class Util {
private static final EnumSet BLACKLIST = EnumSet.noneOf(Material.class);
private static final EnumMap> RESTRICTED_PRICES = new EnumMap<>(Material.class);
@@ -416,13 +417,13 @@ public static boolean useEnchantmentForEnchantedBook() {
@NotNull
public static BaseComponent[] getTranslateComponentForItem(ItemStack stack) {
String result = ReflectFactory.getMaterialMinecraftNamespacedKey(stack.getType());
- return result == null ? TextComponent.fromLegacyText(getItemStackName(stack)) : new BaseComponent[]{new TranslatableComponent(result)};
+ return result == null ? fromLegacyText(getItemStackName(stack)) : new BaseComponent[]{new TranslatableComponent(result)};
}
@NotNull
public static BaseComponent[] getTranslateComponentForMaterial(Material material) {
String result = ReflectFactory.getMaterialMinecraftNamespacedKey(material);
- return result == null ? TextComponent.fromLegacyText(MsgUtil.getItemi18n(material.name())) : new BaseComponent[]{new TranslatableComponent(result)};
+ return result == null ? fromLegacyText(MsgUtil.getItemi18n(material.name())) : new BaseComponent[]{new TranslatableComponent(result)};
}
@Nullable
@@ -974,29 +975,7 @@ public static String parseColours(@Nullable String text) {
}
MineDownParser parser = MINEDOWN.get().parser();
parser.reset();
- StringBuilder builder = new StringBuilder();
- BaseComponent[] components = parser.enable(MineDownParser.Option.LEGACY_COLORS).backwardsCompatibility(true).parse(text).create();
- BaseComponent lastComponent = null;
- for (BaseComponent component : components) {
- ChatColor color = component.getColorRaw();
- String legacyText = component.toLegacyText();
- if (color == null && legacyText.startsWith("§f")) {
- //Remove redundant §f added by toLegacyText
- legacyText = legacyText.substring(2);
- }
- if (lastComponent != null && (
- lastComponent.isBold() != component.isBold() ||
- lastComponent.isItalic() != component.isItalic() ||
- lastComponent.isObfuscated() != component.isObfuscated() ||
- lastComponent.isStrikethrough() != component.isStrikethrough() ||
- lastComponent.isUnderlined() != lastComponent.isUnderlined()
- )) {
- builder.append("§r");
- }
- builder.append(legacyText);
- lastComponent = component;
- }
- return builder.toString();
+ return toLegacyText(parser.enable(MineDownParser.Option.LEGACY_COLORS).backwardsCompatibility(true).parse(text).create());
}
/**
From 2f0ebc920a9b222c6778ffa77ea883269e244fdc Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 14 Dec 2021 00:58:28 +0800
Subject: [PATCH 116/725] Add comment for code and fix pending comment bug
---
.../util/config/ConfigCommentUpdater.java | 92 ++++++++++++++++---
1 file changed, 78 insertions(+), 14 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java b/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
index 671a701353..fc5bf514d9 100644
--- a/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
+++ b/src/main/java/org/maxgamer/quickshop/util/config/ConfigCommentUpdater.java
@@ -53,10 +53,13 @@ public ConfigCommentUpdater(QuickShop plugin, InputStream builtInConfig, File ex
public void updateComment() {
boolean hasBackup = false;
boolean hasWrite = false;
+ final Set EMPTY_SET = Collections.emptySet();
+ //Make a backup first
Path backupFile = externalConfig.toPath().getParent().resolve("config-" + UUID.randomUUID() + "-bak.yml");
try {
Files.copy(externalConfig.toPath(), backupFile, StandardCopyOption.REPLACE_EXISTING);
hasBackup = true;
+ //Read the built-in files
BufferedReader reader = new BufferedReader(new InputStreamReader(builtInConfig, StandardCharsets.UTF_8));
List builtInContent = new ArrayList<>();
while (true) {
@@ -66,59 +69,91 @@ public void updateComment() {
}
builtInContent.add(result);
}
-
+ //Start reading built-in config file comment
PathMarker pathMarker = new PathMarker();
- Map> key2NonKeyContentMap = new LinkedHashMap<>();
+ Map> key2CommentsMap = new LinkedHashMap<>();
Set pendingComment = new LinkedHashSet<>();
for (String s : builtInContent) {
+ //Trimmed for easy identify
String trimmedStr = s.trim();
+ //Just keep the only one empty line for per comment
if (trimmedStr.isEmpty()) {
pendingComment.add("");
continue;
}
+ //Detecting comment
if (trimmedStr.startsWith("#")) {
+ //Add comment
pendingComment.add(s);
} else
- //First node is header, so just use current
+ //Detecting key and parsing to path
if (pathMarker.parseRawInput(s)) {
String pathNow = pathMarker.getPath();
- key2NonKeyContentMap.merge(pathNow, new LinkedHashSet<>(pendingComment), (oldList, newList) -> {
+ //Merge or add comment in map
+ key2CommentsMap.merge(pathNow, new LinkedHashSet<>(pendingComment), (oldList, newList) -> {
oldList.addAll(newList);
return oldList;
});
+ //Also clean it
pendingComment.clear();
}
}
+ //Add footer comment
if (!pendingComment.isEmpty()) {
- key2NonKeyContentMap.put(FOOTER, pendingComment);
+ key2CommentsMap.put(FOOTER, pendingComment);
+ pendingComment.clear();
}
+ //Reading file need to be updated
List externalContent = Files.readAllLines(externalConfig.toPath());
List output = new ArrayList<>(externalContent.size());
+ //Offset for adding comment
int offset = 0;
for (int i = 0; i < externalContent.size(); i++) {
String s = externalContent.get(i);
+ //Parsing comment for file need to be updated
if (s.isEmpty() || s.trim().startsWith("#")) {
pendingComment.add(s);
offset--;
continue;
}
+ //Add content for keys or configuration value
output.add(s);
+ //Got a valid key
if (pathMarker.parseRawInput(s)) {
String pathNow = pathMarker.getPath();
- Set comments = key2NonKeyContentMap.getOrDefault(pathNow, Collections.emptySet());
+ //Get the comments in build-in path with the same node (empty if not existed)
+ Set comments = key2CommentsMap.getOrDefault(pathNow, EMPTY_SET);
+ //Merge that
pendingComment.addAll(comments);
for (String comment : pendingComment) {
+ //Add comment just in the key was inserted
+ //Base on offset:
+ // Index Value
+ // 0 foo: value
+ // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
+ //====================
+ // Index Value
+ // 0 # comment
+ // 1 foo: value
output.add(i + offset, comment);
offset++;
}
+ //clear after added
pendingComment.clear();
}
}
- output.addAll(key2NonKeyContentMap.getOrDefault(FOOTER, Collections.emptySet()));
+ //Add footer comment
+ Set footerComments = key2CommentsMap.getOrDefault(FOOTER, EMPTY_SET);
+ pendingComment.addAll(footerComments);
+ output.addAll(footerComments);
+ pendingComment.clear();
+
+ //Write updated file
hasWrite = true;
Files.write(externalConfig.toPath(), output, StandardCharsets.UTF_8);
+ //Delete backup
backupFile.toFile().delete();
} catch (Throwable e) {
if (hasBackup && hasWrite) {
@@ -138,11 +173,17 @@ private static class PathMarker {
private final List path = new ArrayList<>(Collections.singletonList(HEADER));
private int pathDepth = 0;
- public void addNode(String s) {
- path.add(s);
+ /**
+ * Add node for path
+ *
+ * @param nodeStr nodeStr to add
+ */
+ public void addNode(String nodeStr) {
+ path.add(nodeStr);
}
- private int countSpace(String s) {
+
+ private int countPrefixSpace(String s) {
int i = 0;
for (char c : s.toCharArray()) {
if (c == ' ') {
@@ -154,12 +195,18 @@ private int countSpace(String s) {
return i;
}
+ /**
+ * Parse the raw yaml line input
+ *
+ * @param str the raw yaml line input
+ * @return if a path parsed
+ */
public boolean parseRawInput(String str) {
String trimmedStr = str.trim();
if (trimmedStr.startsWith("#") || !(trimmedStr.contains(": ") || trimmedStr.endsWith(":"))) {
return false;
}
- int pathDepthNow = countSpace(str);
+ int pathDepthNow = countPrefixSpace(str);
String nodeStr = trimmedStr.split(":", 2)[0];
if (!nodeStr.isEmpty()) {
if (pathDepthNow > pathDepth) {
@@ -179,18 +226,30 @@ public boolean parseRawInput(String str) {
}
}
- public void replaceNode(String s) {
+ /**
+ * Replace current node
+ *
+ * @param nodeStr node to replace
+ */
+ public void replaceNode(String nodeStr) {
if (!path.isEmpty()) {
- path.set(path.size() - 1, s);
+ path.set(path.size() - 1, nodeStr);
} else {
- path.add(s);
+ // "" node
+ path.add(nodeStr);
}
}
+ /**
+ * Reset current path
+ */
public void reset() {
path.clear();
}
+ /**
+ * Remove current node
+ */
public void removeNode() {
if (!path.isEmpty()) {
path.remove(path.size() - 1);
@@ -198,6 +257,11 @@ public void removeNode() {
}
+ /**
+ * Get current path (Like foo.bar)
+ *
+ * @return Current path
+ */
public String getPath() {
StringJoiner stringJoiner = new StringJoiner(".");
for (String s : path) {
From f1e4cdaef361a13bfce46f72a57e18369d1b58cd Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 14 Dec 2021 10:44:23 +0800
Subject: [PATCH 117/725] Fix unlimited and free shop counting issue
---
.../org/maxgamer/quickshop/listener/PlayerListener.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java b/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
index 509f324a6f..793c7485fe 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java
@@ -293,9 +293,9 @@ else if (e.useInteractedBlock() == Event.Result.ALLOW
private int getPlayerCanBuy(Shop shop, double traderBalance, double price, Inventory playerInventory) {
if (shop.isFreeShop()) { // Free shop
- return Math.min(shop.getRemainingStock(), Util.countSpace(playerInventory, shop.getItem()));
+ return shop.isUnlimited() ? Util.countSpace(playerInventory, shop.getItem()) : Math.min(shop.getRemainingStock(), Util.countSpace(playerInventory, shop.getItem()));
}
- int itemAmount = Math.min(shop.getRemainingStock(), (int) Math.floor(traderBalance / price));
+ int itemAmount = Math.min(Util.countSpace(playerInventory, shop.getItem()), (int) Math.floor(traderBalance / price));
if (!shop.isUnlimited()) {
itemAmount = Math.min(itemAmount, shop.getRemainingStock());
}
@@ -307,7 +307,7 @@ private int getPlayerCanBuy(Shop shop, double traderBalance, double price, Inven
private int getPlayerCanSell(Shop shop, double ownerBalance, double price, Inventory playerInventory) {
if (shop.isFreeShop()) {
- return Math.min(shop.getRemainingSpace(), Util.countItems(playerInventory, shop.getItem()));
+ return shop.isUnlimited() ? Util.countItems(playerInventory, shop.getItem()) : Math.min(shop.getRemainingSpace(), Util.countItems(playerInventory, shop.getItem()));
}
int items = Util.countItems(playerInventory, shop.getItem());
From 8c4844804b0bf89bfd0deb071cb766f2433cac22 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 14 Dec 2021 10:44:55 +0800
Subject: [PATCH 118/725] Fix coloring issue again
---
.../platform/minedown/BungeeQuickChat.java | 63 +++++++++++++++----
.../text/LanguageFilesManager.java | 6 --
.../localization/text/SimpleTextManager.java | 4 +-
.../quickshop/shop/ContainerShop.java | 16 ++---
.../org/maxgamer/quickshop/util/MsgUtil.java | 5 +-
.../org/maxgamer/quickshop/util/Util.java | 2 +
6 files changed, 62 insertions(+), 34 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java b/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
index cfa2952904..b5d1b16841 100644
--- a/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
+++ b/src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java
@@ -40,6 +40,7 @@
import org.maxgamer.quickshop.util.Util;
import java.lang.reflect.InvocationTargetException;
+import java.util.UUID;
import java.util.logging.Level;
/**
@@ -52,7 +53,7 @@ public class BungeeQuickChat implements QuickChat {
private final QuickShop plugin;
public static BaseComponent[] fromLegacyText(String text) {
- return TextComponent.fromLegacyText(text, null);
+ return TextComponent.fromLegacyText(text, net.md_5.bungee.api.ChatColor.RESET);
}
@Override
@@ -117,9 +118,7 @@ public void sendItemHologramChat(@NotNull Player player, @NotNull String text, @
Util.debugLog("Spilled string is null");
builder.appendLegacy(text);
} else {
- builder.appendLegacy(spilledString.getLeft())
- .append(spilledString.getComponents())
- .appendLegacy(spilledString.getRight());
+ builder.appendLegacyAndItem(spilledString.getLeft(), spilledString.getComponents(), spilledString.getRight());
}
BaseComponent[] components = builder.create();
Util.debugLog("Sending debug: " + ComponentSerializer.toString(components));
@@ -144,12 +143,12 @@ public void sendItemHologramChat(@NotNull Player player, @NotNull String text, @
if (spilledString == null) {
builder.appendLegacy(message);
} else {
- builder.appendLegacy(spilledString.getLeft())
- .append(spilledString.getComponents())
- .appendLegacy(spilledString.getRight());
+ builder.appendLegacyAndItem(spilledString.getLeft()
+ , spilledString.getComponents()
+ , spilledString.getRight());
}
- builder.append(" ").appendLegacy(plugin.text().of(player, "menu.preview").forLocale());
+ builder.appendLegacy(" ", plugin.text().of(player, "menu.preview").forLocale());
if (QuickShop.getPermissionManager().hasPermission(player, "quickshop.preview")) {
builder.event(new ClickEvent(
ClickEvent.Action.RUN_COMMAND,
@@ -181,11 +180,10 @@ public BungeeComponentBuilder append(BaseComponent component) {
return this;
}
+
public BungeeComponentBuilder append(BaseComponent[] components) {
- if (builder.getCursor() == -1) {
- builder.append(components, ComponentBuilder.FormatRetention.NONE);
- } else {
- builder.append(components);
+ for (BaseComponent component : components) {
+ append(component);
}
return this;
}
@@ -199,8 +197,47 @@ public BungeeComponentBuilder append(String text) {
return this;
}
+ public BungeeComponentBuilder appendLegacy(String... text) {
+ if (text == null || text.length == 0) {
+ return this;
+ }
+ StringBuilder stringBuilder = new StringBuilder(text[0]);
+ for (int i = 1; i < text.length; i++) {
+ stringBuilder.append(text[i]);
+ }
+ builder.append(fromLegacyText(stringBuilder.toString()), ComponentBuilder.FormatRetention.EVENTS);
+ return this;
+ }
+
+ public BungeeComponentBuilder appendLegacyAndItem(String left, BaseComponent[] itemsComponent, String right) {
+ ;
+ String uuidStr = UUID.randomUUID().toString();
+ BaseComponent[] components = fromLegacyText(left + uuidStr + right);
+ boolean centerFound = false;
+ for (BaseComponent component : components) {
+ //Find center value
+ if (!centerFound && component.toPlainText().contains(uuidStr)) {
+ centerFound = true;
+ String[] text = ((TextComponent) component).getText().split(uuidStr, 2);
+ TextComponent leftComponent = new TextComponent(text[0]);
+ leftComponent.copyFormatting(component);
+ TextComponent rightComponent = new TextComponent(text[1]);
+ rightComponent.copyFormatting(component);
+ for (BaseComponent baseComponent : itemsComponent) {
+ leftComponent.addExtra(baseComponent);
+ }
+ builder.append(leftComponent, ComponentBuilder.FormatRetention.EVENTS);
+ builder.append(rightComponent, ComponentBuilder.FormatRetention.EVENTS);
+ } else {
+ builder.append(component);
+ }
+ }
+ return this;
+ }
+
public BungeeComponentBuilder appendLegacy(String text) {
- return append(fromLegacyText(text));
+ builder.append(fromLegacyText(text), ComponentBuilder.FormatRetention.EVENTS);
+ return this;
}
public BungeeComponentBuilder event(ClickEvent clickEvent) {
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java
index 47724d1073..448f2cdf43 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/LanguageFilesManager.java
@@ -22,7 +22,6 @@
import com.dumptruckman.bukkit.configuration.json.JsonConfiguration;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import org.maxgamer.quickshop.util.Util;
import java.util.Collections;
import java.util.HashMap;
@@ -53,9 +52,6 @@ public void reset() {
* @param bundled The values from bundled file
*/
public void deploy(@NotNull String distributionPath, @NotNull String locale, @NotNull JsonConfiguration distribution, @NotNull JsonConfiguration bundled) {
- //Parsed color
- Util.parseColours(bundled);
- Util.parseColours(distribution);
this.bundledFile2ContentMapping.put(distributionPath, bundled);
this.locale2ContentMapping.computeIfAbsent(distributionPath, e -> new HashMap<>());
this.locale2ContentMapping.get(distributionPath).put(locale, distribution);
@@ -68,8 +64,6 @@ public void deploy(@NotNull String distributionPath, @NotNull String locale, @No
* @param bundled The values from bundled file
*/
public void deployBundled(@NotNull String distributionPath, @NotNull JsonConfiguration bundled) {
- //Parsed color
- Util.parseColours(bundled);
this.bundledFile2ContentMapping.put(distributionPath, bundled);
}
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index 8891ddfac0..e3240b6d66 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -37,6 +37,7 @@
import org.maxgamer.quickshop.api.localization.text.postprocessor.PostProcessor;
import org.maxgamer.quickshop.localization.text.distributions.Distribution;
import org.maxgamer.quickshop.localization.text.distributions.crowdin.CrowdinOTA;
+import org.maxgamer.quickshop.localization.text.postprocessing.impl.ColorProcessor;
import org.maxgamer.quickshop.localization.text.postprocessing.impl.FillerProcessor;
import org.maxgamer.quickshop.localization.text.postprocessing.impl.PlaceHolderApiProcessor;
import org.maxgamer.quickshop.util.MsgUtil;
@@ -273,10 +274,9 @@ public void load() {
}));
// Register post processor
+ postProcessors.add(new ColorProcessor());
postProcessors.add(new FillerProcessor());
postProcessors.add(new PlaceHolderApiProcessor());
- //We done this when deploys language
- //postProcessors.add(new ColorProcessor());
}
private String findRelativeLanguages(String langCode) {
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index 5254e17b7e..ab9011354b 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -736,7 +736,7 @@ public List getSignText(@NotNull String locale) {
}
// TODO No-longer use SHOP_SIGN_PREFIX since we use modern storage method. Pending for deletion.
- lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder().appendLegacy(SHOP_SIGN_PREFIX).appendLegacy(line2).create()));
+ lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder().appendLegacy(SHOP_SIGN_PREFIX, line2).create()));
//line 3
if (plugin.getConfig().getBoolean("shop.force-use-item-original-name") || !this.getItem().hasItemMeta() || !this.getItem().getItemMeta().hasDisplayName()) {
@@ -745,24 +745,20 @@ public List getSignText(@NotNull String locale) {
if (plugin.getNbtapi() == null) {
// NBTAPI not installed
lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder()
- .appendLegacy(left)
- .appendLegacy(Util.getItemStackName(getItem()))
- .appendLegacy(right)
+ .appendLegacy(left, Util.getItemStackName(getItem()), right)
.create()));
} else {
// NBTAPI installed
String itemName = Util.getItemCustomName(getItem());
BaseComponent[] itemComponents = itemName == null ? Util.getTranslateComponentForItem(getItem()) : fromLegacyText(itemName);
lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder()
- .appendLegacy(left)
- .append(itemComponents)
- .appendLegacy(right)
+ .appendLegacyAndItem(left,
+ itemComponents, right)
.create()));
}
} else {
- lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder().appendLegacy(plugin.text().of("signs.item-left").forLocale())
- .appendLegacy(Util.getItemStackName(getItem()))
- .appendLegacy(plugin.text().of("signs.item-right").forLocale()).create()));
+ lines.add(new ComponentPackage(new BungeeQuickChat.BungeeComponentBuilder().appendLegacy(plugin.text().of("signs.item-left").forLocale()
+ , Util.getItemStackName(getItem()), plugin.text().of("signs.item-right").forLocale()).create()));
}
//line 4
diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
index 51d2cc6cd1..7526ff1f7f 100644
--- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java
@@ -740,9 +740,8 @@ public static void sendDirectMessage(@Nullable CommandSender sender, @Nullable S
plugin.getQuickChat().send(sender, msg);
} else {
BungeeQuickChat.BungeeComponentBuilder builder = new BungeeQuickChat.BungeeComponentBuilder();
- builder.appendLegacy(spilledString.getLeft());
- builder.append(spilledString.getComponents());
- builder.appendLegacy(spilledString.getRight());
+ builder.appendLegacyAndItem(spilledString.getLeft()
+ , spilledString.getComponents(), spilledString.getRight());
plugin.getQuickChat().send(sender, new QuickComponentImpl(builder.create()));
}
} catch (Throwable throwable) {
diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java
index 96484f95f0..d3b770d93f 100644
--- a/src/main/java/org/maxgamer/quickshop/util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/util/Util.java
@@ -975,6 +975,8 @@ public static String parseColours(@Nullable String text) {
}
MineDownParser parser = MINEDOWN.get().parser();
parser.reset();
+ //A hack for saving reset character
+ text = text.replace("&r", "&l&r").replace("§r", "§l§r");
return toLegacyText(parser.enable(MineDownParser.Option.LEGACY_COLORS).backwardsCompatibility(true).parse(text).create());
}
From e4cfa829bc3ff6a114f00b19df793031107daaa4 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 14 Dec 2021 10:50:14 +0800
Subject: [PATCH 119/725] Fix sign-dye-color is missing in config.yml
---
src/main/java/org/maxgamer/quickshop/QuickShop.java | 7 +++++++
src/main/resources/config.yml | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index edf1090cf3..bb5d6f38a6 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -1990,6 +1990,13 @@ private void updateConfig(int selectedVersion) throws IOException {
getConfig().set("integration.worldguard.respect-global-region", false);
getConfig().set("config-version", ++selectedVersion);
}
+ if (selectedVersion == 149) {
+ //Fix sign-dye-color setting is missing
+ if (!getConfig().isSet("shop.sign-dye-color")) {
+ getConfig().set("shop.sign-dye-color", "");
+ }
+ 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");
}
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index fbda3c51ab..22a410c7ce 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -225,8 +225,8 @@ shop:
sign-glowing: false
#Sign use dye color https://hub.spigotmc.org/javadocs/spigot/org/bukkit/DyeColor.html
- sign-dye-color: null
#sign-dye-color: WHITE
+ sign-dye-color: ""
#Should we pay/take money to/from unlimited shops owners?
pay-unlimited-shop-owners: false
From c87a9860e6e76ef8e210c369eca56eceb530445a Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 14 Dec 2021 12:48:55 +0800
Subject: [PATCH 120/725] Fix broken find command
---
.../quickshop/command/subcommand/SubCommand_Find.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
index 333ae8f096..461958e7ae 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Find.java
@@ -21,7 +21,6 @@
import io.papermc.lib.PaperLib;
import lombok.AllArgsConstructor;
-import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent;
@@ -129,8 +128,8 @@ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @Not
Location location = shop.getLocation();
// "nearby-shop-entry": "&a- Info:{0} &aPrice:&b{1} &ax:&b{2} &ay:&b{3} &az:&b{4} &adistance: &b{5} &ablock(s)"
stringBuilder.append(plugin.text().of(sender, "nearby-shop-entry",
- new TextComponent(toLegacyText(shop.getSignText(sender.getLocale()).get(1).getComponents())),
- new TextComponent(toLegacyText(shop.getSignText(sender.getLocale()).get(3).getComponents())),
+ toLegacyText(shop.getSignText(sender.getLocale()).get(1).getComponents()),
+ toLegacyText(shop.getSignText(sender.getLocale()).get(3).getComponents()),
String.valueOf(location.getBlockX()),
String.valueOf(location.getBlockY()),
String.valueOf(location.getBlockZ()),
From afe8dbe323e86fb290fb01df48758e5c00158df9 Mon Sep 17 00:00:00 2001
From: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
Date: Tue, 14 Dec 2021 13:07:38 +0800
Subject: [PATCH 121/725] New Crowdin updates (#32)
* Update source file messages.json
* New translations messages.json (Chinese Simplified)
* New translations messages.json (Swedish)
* New translations messages.json (Polish)
* New translations messages.json (Norwegian)
* New translations messages.json (German)
* New translations messages.json (German)
---
crowdin/lang/de-DE/messages.json | 14 +++++++-------
crowdin/lang/no-NO/messages.json | 10 +++++-----
crowdin/lang/pl-PL/messages.json | 6 +++---
crowdin/lang/sv-SE/messages.json | 4 ++--
crowdin/lang/zh-CN/messages.json | 4 ++--
src/main/resources/lang/messages.json | 4 ++--
6 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/crowdin/lang/de-DE/messages.json b/crowdin/lang/de-DE/messages.json
index 0a3c4588d4..f81b9672a5 100644
--- a/crowdin/lang/de-DE/messages.json
+++ b/crowdin/lang/de-DE/messages.json
@@ -6,7 +6,7 @@
"translation-contributors": "Mitwirkende: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken und Andre_601",
"translation-country": "Sprache: Deutsch (de_DE)",
"language-version": "63",
- "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
+ "not-looking-at-valid-shop-block": "&cKonnte keinen Block zum erstellen eines Shops finden. Stelle sicher dass du einen ansiehst.",
"not-looking-at-shop": "&cKonnte keinen QuickShop finden. Du musst auf einen schauen.",
"no-anythings-in-your-hand": "&cEs befindet sich nichts in deiner Hand.",
"no-permission": "&cDu hast keine Berechtigung um das zu tun.",
@@ -110,8 +110,8 @@
},
"bypassing-lock": "&cUmgehe eine QuickShop Sicherung!",
"that-is-locked": "&cDieser Shop ist geschützt.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
+ "how-many-buy": "&aSchreib im Chat, wie viele du gerne &bKAUFEN&a willst. Du kannst &e{0}&a kaufen. Schreibe &b{1}&a um alle zu kaufen.",
+ "how-many-sell": "&aSchreib im Chat, wie viele du gerne &dVERKAUFEN&a willst. Du kannst &e{0}&a verkaufen. Schreibe &b{1}&a um alle zu verkaufen.",
"not-allowed-to-create": "&cDu kannst hier keinen Shop erstellen.",
"blacklisted-item": "&cDu kannst dieses Item nicht verkaufen, da es auf der schwarzen Liste steht",
"how-much-to-trade-for": "&aGib im Chat ein, für wieviel du {1}x &e{0}&a handeln willst.",
@@ -167,7 +167,7 @@
"about": "&eZeigt QuickShop Informationen",
"help": "&eZeigt QuickShop-Hilfe",
"item": "&eÄndert das Shopitem eines Shops",
- "size": "&eÄndert die Mengenanzahl eines Shops",
+ "size": "&eÄndert die Anzahl an Items pro Menge eines Shops",
"supercreate": "&eErstellen eines Shops, während alle Schutzprüfungen umgangen werden",
"language": "&eÄndert die derzeitig verwendete Sprache",
"removeall": "&eEntferne ALLE Shops eines bestimmten Spielers",
@@ -220,7 +220,7 @@
"empty-hover": "&eKlicke hier um den Shop zu leeren.",
"remove": "&c&l[Shop entfernen]",
"remove-hover": "&eKlicke um diesen Shop zu entfernen.",
- "stack": "&aMengeneinheit: &b{0} &e[&d&lÄndern&e]",
+ "stack": "&aItems pro Menge: &b{0} &e[&d&lÄndern&e]",
"stack-hover": "&eKlicke um die Anzahl an Items pro Mengeneinheit zu ändern. Setze es zu 1 für normales Verhalten.",
"item": "&aShopitem: {0} &e[&d&lÄndern&e]",
"item-hover": "&eKlicke, um das Shopitem zu ändern",
@@ -307,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cDu kannst mit diesem Shop nicht handeln, da er eingefroren ist.",
"shop-freezed-at-location": "&eDein Shop {0} bei {1} wurde eingefroren!",
"denied-put-in-item": "&cDu kannst dieses Item nicht in deinen Shop setzen!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
+ "how-many-buy-stack": "&aSchreib im Chat, wie viele Mengen du gerne &bKAUFEN&a willst. Es sind &e{0}&a Items pro Menge und du kannst &e{1}&a Mengen kaufen. Schreibe &b{2}&a um alle zu kaufen.",
+ "how-many-sell-stack": "&aSchreib im Chat, wie viele Mengen du gerne &dVERKAUFEN&a willst. Es sind &e{0}&a Items pro Menge und du kannst &e{1}&a Mengen verkaufen. Schreibe &b{2}&a um alle zu verkaufen.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
diff --git a/crowdin/lang/no-NO/messages.json b/crowdin/lang/no-NO/messages.json
index ced5203e9c..64b6fcbfa8 100644
--- a/crowdin/lang/no-NO/messages.json
+++ b/crowdin/lang/no-NO/messages.json
@@ -6,7 +6,7 @@
"translation-contributors": "Bidragsytere: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
"translation-country": "Språksone: Norsk (no_NO)",
"language-version": "63",
- "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
+ "not-looking-at-valid-shop-block": "&cKunne ikke finne en blokk for å opprette butikk. Du må se på en gyldig blokk.",
"not-looking-at-shop": "&cKunne ikke finne en QuickShop. Du må se på en butikk.",
"no-anythings-in-your-hand": "&cDet er ingenting i hånden din.",
"no-permission": "&cDu har ikke tillatelse til å gjøre det.",
@@ -110,8 +110,8 @@
},
"bypassing-lock": "&cIgnorerer en QuickShop lås!",
"that-is-locked": "&cDenne butikken er låst.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
+ "how-many-buy": "&aSkriv i chat hvor mange du ønsker å &bKJØPE&a. Du kan kjøpe maks &e{0}&a. Skriv &b{1}&a om du vil kjøpe alle.",
+ "how-many-sell": "&aSkriv i chat hvor mange du ønsker å &dSELGE&a. Du kan selge &e{0}&a. Skriv &b{1}&a for å selge alle.",
"not-allowed-to-create": "&cDu kan ikke opprette en butikk her.",
"blacklisted-item": "&cDu kan ikke selge denne gjenstanden fordi den er på svartelisten",
"how-much-to-trade-for": "&aSkriv i chat hvor mye du ønsker å selge &e{1}x {0}&a for.",
@@ -307,8 +307,8 @@
"shop-cannot-trade-when-freezing": "&cDu kan ikke handle med denne butikken fordi den er frosset.",
"shop-freezed-at-location": "&eDin butikk {0} på {1} ble frosset!",
"denied-put-in-item": "&cDu kan ikke legge denne varen i butikken din!",
- "how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
+ "how-many-buy-stack": "&eSkriv i chat hvor mange pakker du ønsker å &bKJØPE&a. Det er &e{0}&a varer i hver pakke og du kan kjøpe totalt &e{1}&a pakker. Skriv &b{2}&a om du vil kjøpe alle.",
+ "how-many-sell-stack": "&eSkriv i chat hvor mange pakker du ønsker å &bSELGE&a. Det er &e{0}&a varer i hver pakke og du kan selge &e{1}&a pakker. Skriv &b{2}&a om du vil selge alle.",
"language": {
"name": "&eNavn: &6{0}",
"code": "&eKode: &6{0}",
diff --git a/crowdin/lang/pl-PL/messages.json b/crowdin/lang/pl-PL/messages.json
index 4a537f61d7..25697bca88 100644
--- a/crowdin/lang/pl-PL/messages.json
+++ b/crowdin/lang/pl-PL/messages.json
@@ -6,7 +6,7 @@
"translation-contributors": "Współtwórcy: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken i Andre_601",
"translation-country": "Język: Polski (pl_PL)",
"language-version": "63",
- "not-looking-at-valid-shop-block": "&cCould not find a block for creating shop. You need to look at one.",
+ "not-looking-at-valid-shop-block": "&cNie można znaleźć bloku do tworzenia sklepu. Musisz patrzeć się na jeden z nich.",
"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ć.",
@@ -110,8 +110,8 @@
},
"bypassing-lock": "&cOmijanie blokady QuickShop!",
"that-is-locked": "&cTen sklep jest zablokowany.",
- "how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
+ "how-many-buy": "&aWpisz ilość jaką chcesz &bKUPIĆ&a na czacie. Możesz kupić &e{0}&a. Wpisz &b{1}&a, jeśli chcesz kupić wszystko.",
+ "how-many-sell": "&aWpisz ilość jaką chcesz &dSPRZEDAĆ&a na czacie. Możesz sprzedać &e{0}&a. Wpisz &b{1}&a, jeśli chcesz sprzedać wszystko.",
"not-allowed-to-create": "&cTu nie zrobisz sklepu.",
"blacklisted-item": "&cNie możesz sprzedać tego przedmiotu, ponieważ znajduje się na czarnej liście",
"how-much-to-trade-for": "&aWpisz na czacie cenę za &e{1}x {0}&a.",
diff --git a/crowdin/lang/sv-SE/messages.json b/crowdin/lang/sv-SE/messages.json
index 8be0d755a5..b732f7729c 100644
--- a/crowdin/lang/sv-SE/messages.json
+++ b/crowdin/lang/sv-SE/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cIgnorerar ett butikslås!",
"that-is-locked": "&cDenna butik är låst.",
"how-many-buy": "&aAnge i chatten, hur många du vill &bKÖPA&a. Du kan köpa &e{0}&a. Ange &b{1}&a för att köpa alla.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aAnge i chatten, hur många du vill &dSÄLJA&a. Du har &{0}& tillgängliga. Ange &{1}&a i chatten, för att sälja alla.",
"not-allowed-to-create": "&cDu får inte skapa en butik här.",
"blacklisted-item": "&cDu kan inte sälja detta föremål eftersom det finns på svartlistan",
"how-much-to-trade-for": "&aAnge i chatten, hur mycket du vill sälja &e{1}x {0}&a för.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eDin butik {0} vid {1} blev frusen!",
"denied-put-in-item": "&cDu kan inte lägga in detta objekt i din butik!",
"how-many-buy-stack": "&eAnge i chatten, hur många paket du vill &bKÖPA&a. Det finns &e{0}&a föremål i varje paket och du kan köpa &e{1}&a paket. Ange &b{2}&a i chatten för att köpa alla.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aAnge i chatten, hur många föremål du vill &dSÄLJA&a per paket. Det finns &e{0}&a föremål per paket och du har &e{1}&a paket tillgängliga. Ange &b{2}&a i chatten för att sälja alla.",
"language": {
"name": "&eNamn: &6{0}",
"code": "&eKod: &6{0}",
diff --git a/crowdin/lang/zh-CN/messages.json b/crowdin/lang/zh-CN/messages.json
index 27d95112de..05f383c6e3 100644
--- a/crowdin/lang/zh-CN/messages.json
+++ b/crowdin/lang/zh-CN/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&c你绕过了QuickShop的锁!",
"that-is-locked": "&c这个商店已上锁。",
"how-many-buy": "&a在聊天中输入您想要&b购买&a的数量。您可以购买&e{0}&a个,输入&b{1}&a以购买全部。",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&a聊天栏中输入想 &d出售 &a的物品数量. 您现在可以卖出 &e{0} &a件物品。输入 &b{1}&a 来出售全部物品。",
"not-allowed-to-create": "&c你不能在这里创建商店",
"blacklisted-item": "&c这件物品已经被拉黑,你不能出售它",
"how-much-to-trade-for": "&a请在聊天中输入交易&e{1}个{0}&a所需的价格。",
@@ -308,7 +308,7 @@
"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 份. 输入 &b{2}&a 以买下所有该物品.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&a在聊天栏中输入你想 &d卖&a 的份数. 每份中有 &e{0}&a 个该物品, 你目前可卖出 &e{1}&a 份这样的物品,输入 &b{2}&a 以卖出所有此项物品。",
"language": {
"name": "&e名称: &6{0}",
"code": "&e代码: &6{0}",
diff --git a/src/main/resources/lang/messages.json b/src/main/resources/lang/messages.json
index 355f5c6138..6944ca2125 100644
--- a/src/main/resources/lang/messages.json
+++ b/src/main/resources/lang/messages.json
@@ -111,7 +111,7 @@
"bypassing-lock": "&cBypassing a QuickShop lock!",
"that-is-locked": "&cThis shop is locked.",
"how-many-buy": "&aEnter in chat, how many you wish to &bBUY&a. You can buy &e{0}&a. Enter &b{1}&a to buy them all.",
- "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You have &e{0}&a available. Enter &b{1}&a in chat, to sell all.",
+ "how-many-sell": "&aEnter in chat, how much you wish to &dSELL&a. You can sell &e{0}&a. Enter &b{1}&a in chat, to sell all.",
"not-allowed-to-create": "&cYou may not create a shop here.",
"blacklisted-item": "&cYou cannot sell this item because it is on the blacklist",
"how-much-to-trade-for": "&aEnter in chat, how much you wish to trade &e{1}x {0}&a for.",
@@ -308,7 +308,7 @@
"shop-freezed-at-location": "&eYour shop {0} at {1} got frozen!",
"denied-put-in-item": "&cYou cannot put this item into your shop!",
"how-many-buy-stack": "&eEnter in chat, how many bulks you wish to &bBUY&a. There are &e{0}&a items in each bulk and you can buy &e{1}&a bulks. Enter &b{2}&a in chat to buy all.",
- "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you have &e{1}&a bulks available. Enter &b{2}&a in chat to sell all.",
+ "how-many-sell-stack": "&aEnter in chat, how many bulk you wish to &dSELL&a. There are &e{0}&a items per bulk and you can sell &e{1}&a bulks. Enter &b{2}&a in chat to sell all.",
"language": {
"name": "&eName: &6{0}",
"code": "&eCode: &6{0}",
From f95c92be111cf38ee5082eeb5d2f35795aa54f3d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 14 Dec 2021 13:07:56 +0800
Subject: [PATCH 122/725] Bump SongodaCore from 2.6.3 to 2.6.6 (#33)
Bumps SongodaCore from 2.6.3 to 2.6.6.
---
updated-dependencies:
- dependency-name: com.songoda:SongodaCore
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 9d6cf03326..7783f9f563 100644
--- a/pom.xml
+++ b/pom.xml
@@ -786,7 +786,7 @@
com.songoda
SongodaCore
- 2.6.3
+ 2.6.6
provided
From 7e0ce2effdbd0fa1e126758f7621415eae228446 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 14 Dec 2021 13:08:09 +0800
Subject: [PATCH 123/725] Bump PlotSquared-Core from 6.1.4 to 6.2.0 (#34)
Bumps [PlotSquared-Core](https://github.com/IntellectualSites/PlotSquared) from 6.1.4 to 6.2.0.
- [Release notes](https://github.com/IntellectualSites/PlotSquared/releases)
- [Commits](https://github.com/IntellectualSites/PlotSquared/compare/6.1.4...6.2.0)
---
updated-dependencies:
- dependency-name: com.plotsquared:PlotSquared-Core
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 7783f9f563..05208f054e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -710,7 +710,7 @@
com.plotsquared
PlotSquared-Core
- 6.1.4
+ 6.2.0
provided
From 8c552729844774f221b85f6ef46887b947ae2a05 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 14 Dec 2021 13:17:06 +0800
Subject: [PATCH 124/725] Fix debug command not respect local config.yml
---
.../maxgamer/quickshop/command/subcommand/SubCommand_Debug.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Debug.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Debug.java
index df6ca2b494..65dc317565 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Debug.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Debug.java
@@ -120,6 +120,7 @@ public void switchDebug(@NotNull CommandSender sender) {
final boolean debug = plugin.getConfig().getBoolean("dev-mode");
if (debug) {
+ plugin.reloadConfiguration();
plugin.getConfig().set("dev-mode", false);
plugin.saveConfiguration();
plugin.reload();
@@ -127,6 +128,7 @@ public void switchDebug(@NotNull CommandSender sender) {
return;
}
+ plugin.reloadConfiguration();
plugin.getConfig().set("dev-mode", true);
plugin.saveConfiguration();
plugin.reload();
From dbfd82369609ba6130559a1bf119a6108ada6c17 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Fri, 17 Dec 2021 15:02:46 +0800
Subject: [PATCH 125/725] Handle NBTApi broken issue
---
.../org/maxgamer/quickshop/QuickShop.java | 6 ++++-
.../quickshop/shop/ContainerShop.java | 23 +++++++++++++------
.../matcher/item/BukkitItemMatcherImpl.java | 19 +++++++++++----
.../item/QuickShopItemMatcherImpl.java | 20 +++++++++++-----
4 files changed, 50 insertions(+), 18 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index bb5d6f38a6..7101ebece5 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -257,10 +257,14 @@ public class QuickShop extends JavaPlugin implements QuickShopAPI {
private ShopPurger shopPurger;
@Getter
@Nullable
- private NBTAPI nbtapi = null;
+ private volatile NBTAPI nbtapi = null;
private int loggingLocation = 0;
+ public void disableNBTAPI() {
+ nbtapi = null;
+ }
+
/**
* Use for mock bukkit
*/
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index ab9011354b..83453e3194 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -21,6 +21,7 @@
import com.lishid.openinv.OpenInv;
import de.tr7zw.nbtapi.NBTTileEntity;
+import de.tr7zw.nbtapi.NbtApiException;
import io.papermc.lib.PaperLib;
import lombok.EqualsAndHashCode;
import me.lucko.helper.serialize.BlockPosition;
@@ -785,14 +786,22 @@ public void setSignText(@NotNull List lines) {
Util.ensureThread(false);
List signs = this.getSigns();
for (Sign sign : signs) {
- NBTTileEntity tileSign = null;
if (this.plugin.getNbtapi() != null) {
- tileSign = new NBTTileEntity(sign);
- }
- for (int i = 0; i < lines.size(); i++) {
- if (tileSign != null) {
- tileSign.setString("Text" + (i + 1), Util.componentsToJson(lines.get(i).getComponents()));
- } else {
+ NBTTileEntity tileSign = new NBTTileEntity(sign);
+ for (int i = 0; i < lines.size(); i++) {
+ try {
+ tileSign.setString("Text" + (i + 1), Util.componentsToJson(lines.get(i).getComponents()));
+ } catch (NbtApiException e) {
+ plugin.getLogger().log(Level.WARNING, "NBTAPI is broken, disabling...(You can safely ignore this)", e);
+ plugin.disableNBTAPI();
+ Util.debugLog("NBTAPI is broken, error: " + e.getMessage() + "\n stacktrace: \n" + Arrays.toString(e.getStackTrace()));
+ //Reset it since we disable nbt api, text need to change
+ setSignText();
+ return;
+ }
+ }
+ } else {
+ for (int i = 0; i < lines.size(); i++) {
sign.setLine(i, toLegacyText(lines.get(i).getComponents()));
}
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java b/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
index 91e62789c4..3c7c7caa14 100644
--- a/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
@@ -20,6 +20,7 @@
package org.maxgamer.quickshop.util.matcher.item;
import de.tr7zw.nbtapi.NBTItem;
+import de.tr7zw.nbtapi.NbtApiException;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.inventory.ItemStack;
@@ -28,6 +29,10 @@
import org.jetbrains.annotations.Nullable;
import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.api.shop.ItemMatcher;
+import org.maxgamer.quickshop.util.Util;
+
+import java.util.Arrays;
+import java.util.logging.Level;
/**
* A simple impl for ItemMatcher
@@ -85,10 +90,16 @@ public boolean matches(@Nullable ItemStack original, @Nullable ItemStack tester)
if (plugin.getNbtapi() != null) {
NBTItem nbtItemOriginal = new NBTItem(original);
NBTItem nbtItemTester = new NBTItem(tester);
- String tagOriginal = nbtItemOriginal.getString("shopItemId");
- String tagTester = nbtItemTester.getString("shopItemId");
- if (StringUtils.isNotEmpty(tagOriginal) && StringUtils.isNotEmpty(tagTester) && tagOriginal.equals(tagTester)) {
- return true;
+ try {
+ String tagOriginal = nbtItemOriginal.getString("shopItemId");
+ String tagTester = nbtItemTester.getString("shopItemId");
+ if (StringUtils.isNotEmpty(tagOriginal) && StringUtils.isNotEmpty(tagTester) && tagOriginal.equals(tagTester)) {
+ return true;
+ }
+ } catch (NbtApiException e) {
+ plugin.disableNBTAPI();
+ plugin.getLogger().log(Level.WARNING, "NBTAPI is broken, disabling...(You can safely ignore this)", e);
+ Util.debugLog("NBTAPI is broken, error: " + e.getMessage() + "\n stacktrace: \n" + Arrays.toString(e.getStackTrace()));
}
}
return tester.isSimilar(original);
diff --git a/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java b/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
index 470f249835..54227f4e48 100644
--- a/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
@@ -20,6 +20,7 @@
package org.maxgamer.quickshop.util.matcher.item;
import de.tr7zw.nbtapi.NBTItem;
+import de.tr7zw.nbtapi.NbtApiException;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.attribute.Attribute;
@@ -41,6 +42,7 @@
import org.maxgamer.quickshop.util.reload.Reloadable;
import java.util.*;
+import java.util.logging.Level;
@AllArgsConstructor
public class QuickShopItemMatcherImpl implements ItemMatcher, Reloadable {
@@ -146,12 +148,18 @@ public boolean matches(@Nullable ItemStack requireStack, @Nullable ItemStack giv
givenStack = givenStack.clone();
givenStack.setAmount(1);
if (plugin.getNbtapi() != null) {
- NBTItem nbtItemOriginal = new NBTItem(requireStack);
- NBTItem nbtItemTester = new NBTItem(givenStack);
- String tagOriginal = nbtItemOriginal.getString("shopItemId");
- String tagTester = nbtItemTester.getString("shopItemId");
- if (StringUtils.isNotEmpty(tagOriginal) && StringUtils.isNotEmpty(tagTester) && tagOriginal.equals(tagTester)) {
- return true;
+ try {
+ NBTItem nbtItemOriginal = new NBTItem(requireStack);
+ NBTItem nbtItemTester = new NBTItem(givenStack);
+ String tagOriginal = nbtItemOriginal.getString("shopItemId");
+ String tagTester = nbtItemTester.getString("shopItemId");
+ if (StringUtils.isNotEmpty(tagOriginal) && StringUtils.isNotEmpty(tagTester) && tagOriginal.equals(tagTester)) {
+ return true;
+ }
+ } catch (NbtApiException e) {
+ plugin.disableNBTAPI();
+ plugin.getLogger().log(Level.WARNING, "NBTAPI is broken, disabling...(You can safely ignore this)", e);
+ Util.debugLog("NBTAPI is broken, error: " + e.getMessage() + "\n stacktrace: \n" + Arrays.toString(e.getStackTrace()));
}
}
if (workType == 1) {
From 667a0330b40a811bc6341608eefba5cf40582718 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Fri, 17 Dec 2021 15:07:22 +0800
Subject: [PATCH 126/725] Fix misleading message
---
src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java | 2 +-
.../quickshop/util/matcher/item/BukkitItemMatcherImpl.java | 2 +-
.../quickshop/util/matcher/item/QuickShopItemMatcherImpl.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index 83453e3194..9bfb605537 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -792,7 +792,7 @@ public void setSignText(@NotNull List lines) {
try {
tileSign.setString("Text" + (i + 1), Util.componentsToJson(lines.get(i).getComponents()));
} catch (NbtApiException e) {
- plugin.getLogger().log(Level.WARNING, "NBTAPI is broken, disabling...(You can safely ignore this)", e);
+ plugin.getLogger().log(Level.WARNING, "NBTAPI support is broken, dsiable and fallback... (You can safely ignore this)", e);
plugin.disableNBTAPI();
Util.debugLog("NBTAPI is broken, error: " + e.getMessage() + "\n stacktrace: \n" + Arrays.toString(e.getStackTrace()));
//Reset it since we disable nbt api, text need to change
diff --git a/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java b/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
index 3c7c7caa14..99db2b747c 100644
--- a/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
@@ -98,7 +98,7 @@ public boolean matches(@Nullable ItemStack original, @Nullable ItemStack tester)
}
} catch (NbtApiException e) {
plugin.disableNBTAPI();
- plugin.getLogger().log(Level.WARNING, "NBTAPI is broken, disabling...(You can safely ignore this)", e);
+ plugin.getLogger().log(Level.WARNING, "NBTAPI support is broken, dsiable and fallback... (You can safely ignore this)", e);
Util.debugLog("NBTAPI is broken, error: " + e.getMessage() + "\n stacktrace: \n" + Arrays.toString(e.getStackTrace()));
}
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java b/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
index 54227f4e48..c46178ca9f 100644
--- a/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
@@ -158,7 +158,7 @@ public boolean matches(@Nullable ItemStack requireStack, @Nullable ItemStack giv
}
} catch (NbtApiException e) {
plugin.disableNBTAPI();
- plugin.getLogger().log(Level.WARNING, "NBTAPI is broken, disabling...(You can safely ignore this)", e);
+ plugin.getLogger().log(Level.WARNING, "NBTAPI support is broken, dsiable and fallback... (You can safely ignore this)", e);
Util.debugLog("NBTAPI is broken, error: " + e.getMessage() + "\n stacktrace: \n" + Arrays.toString(e.getStackTrace()));
}
}
From e375b3b55bd51b577dd8fa74adcd53270c740932 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Fri, 17 Dec 2021 18:28:38 +0800
Subject: [PATCH 127/725] Fix world-guard integration not checking
applicableRegionSet
---
.../worldguard/WorldGuardIntegration.java | 38 ++++++++++---------
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java b/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java
index 1161abcb2c..ccb6939f58 100644
--- a/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java
+++ b/src/main/java/org/maxgamer/quickshop/integration/worldguard/WorldGuardIntegration.java
@@ -137,23 +137,25 @@ public boolean canCreateShopHere(@NotNull Player player, @NotNull Location locat
}
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
- ApplicableRegionSet applicableRegionSet=query.getApplicableRegions(wgLoc);
+ ApplicableRegionSet applicableRegionSet = query.getApplicableRegions(wgLoc);
//Regions not included global one
- if (applicableRegionSet.getRegions().isEmpty()&&!respectGlobalRegion) {
- return !whiteList;
- }else {
- //So check it manually
- RegionManager worldManger = WorldGuard.getInstance().getPlatform().getRegionContainer().get(BukkitAdapter.adapt(location.getWorld()));
- if (worldManger != null&&!worldManger.hasRegion("__global__")) {
- //If not have, just check whitelist
+ if (applicableRegionSet.getRegions().isEmpty()) {
+ if (!respectGlobalRegion) {
return !whiteList;
+ } else {
+ //So check it manually
+ RegionManager worldManger = WorldGuard.getInstance().getPlatform().getRegionContainer().get(BukkitAdapter.adapt(location.getWorld()));
+ if (worldManger != null && !worldManger.hasRegion("__global__")) {
+ //If not have, just check whitelist
+ return !whiteList;
+ }
}
}
//Passed, but flag calculation will include the global region
for (WorldGuardFlags flag : createFlags) {
switch (flag) {
case BUILD:
- if (!applicableRegionSet.testState(localPlayer,Flags.BUILD)) {
+ if (!applicableRegionSet.testState(localPlayer, Flags.BUILD)) {
return false;
}
break;
@@ -208,16 +210,18 @@ public boolean canTradeShopHere(@NotNull Player player, @NotNull Location locati
}
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
- ApplicableRegionSet applicableRegionSet=query.getApplicableRegions(wgLoc);
+ ApplicableRegionSet applicableRegionSet = query.getApplicableRegions(wgLoc);
//Regions not included global one
- if (applicableRegionSet.getRegions().isEmpty()&&!respectGlobalRegion) {
- return !whiteList;
- }else {
- //So check it manually
- RegionManager worldManger = WorldGuard.getInstance().getPlatform().getRegionContainer().get(BukkitAdapter.adapt(location.getWorld()));
- if (worldManger != null&&!worldManger.hasRegion("__global__")) {
- //If not have, just check whitelist
+ if (applicableRegionSet.getRegions().isEmpty()) {
+ if (!respectGlobalRegion) {
return !whiteList;
+ } else {
+ //So check it manually
+ RegionManager worldManger = WorldGuard.getInstance().getPlatform().getRegionContainer().get(BukkitAdapter.adapt(location.getWorld()));
+ if (worldManger != null && !worldManger.hasRegion("__global__")) {
+ //If not have, just check whitelist
+ return !whiteList;
+ }
}
}
//Passed, but flag calculation will include the global region
From eea9ed230d1a31272de2966a8eb89d6b195e2f94 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Fri, 17 Dec 2021 18:30:14 +0800
Subject: [PATCH 128/725] Bump version
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 05208f054e..88bc9d3ca6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
QuickShop
- 5.1.0.2
+ 5.1.0.3
org.maxgamer.quickshop
Ghost-chu
UTF-8
From 82fdd406d8057e1e1c9dc868bf4f41521b2e51ee Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Fri, 17 Dec 2021 18:47:04 +0800
Subject: [PATCH 129/725] Remove the usage of NbtApiException
---
src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java | 3 +--
.../quickshop/util/matcher/item/BukkitItemMatcherImpl.java | 3 +--
.../quickshop/util/matcher/item/QuickShopItemMatcherImpl.java | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index 9bfb605537..aadfff0742 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -21,7 +21,6 @@
import com.lishid.openinv.OpenInv;
import de.tr7zw.nbtapi.NBTTileEntity;
-import de.tr7zw.nbtapi.NbtApiException;
import io.papermc.lib.PaperLib;
import lombok.EqualsAndHashCode;
import me.lucko.helper.serialize.BlockPosition;
@@ -791,7 +790,7 @@ public void setSignText(@NotNull List lines) {
for (int i = 0; i < lines.size(); i++) {
try {
tileSign.setString("Text" + (i + 1), Util.componentsToJson(lines.get(i).getComponents()));
- } catch (NbtApiException e) {
+ } catch (Exception e) {
plugin.getLogger().log(Level.WARNING, "NBTAPI support is broken, dsiable and fallback... (You can safely ignore this)", e);
plugin.disableNBTAPI();
Util.debugLog("NBTAPI is broken, error: " + e.getMessage() + "\n stacktrace: \n" + Arrays.toString(e.getStackTrace()));
diff --git a/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java b/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
index 99db2b747c..f9cb51a56f 100644
--- a/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/util/matcher/item/BukkitItemMatcherImpl.java
@@ -20,7 +20,6 @@
package org.maxgamer.quickshop.util.matcher.item;
import de.tr7zw.nbtapi.NBTItem;
-import de.tr7zw.nbtapi.NbtApiException;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.inventory.ItemStack;
@@ -96,7 +95,7 @@ public boolean matches(@Nullable ItemStack original, @Nullable ItemStack tester)
if (StringUtils.isNotEmpty(tagOriginal) && StringUtils.isNotEmpty(tagTester) && tagOriginal.equals(tagTester)) {
return true;
}
- } catch (NbtApiException e) {
+ } catch (Exception e) {
plugin.disableNBTAPI();
plugin.getLogger().log(Level.WARNING, "NBTAPI support is broken, dsiable and fallback... (You can safely ignore this)", e);
Util.debugLog("NBTAPI is broken, error: " + e.getMessage() + "\n stacktrace: \n" + Arrays.toString(e.getStackTrace()));
diff --git a/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java b/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
index c46178ca9f..f8f691896e 100644
--- a/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
+++ b/src/main/java/org/maxgamer/quickshop/util/matcher/item/QuickShopItemMatcherImpl.java
@@ -20,7 +20,6 @@
package org.maxgamer.quickshop.util.matcher.item;
import de.tr7zw.nbtapi.NBTItem;
-import de.tr7zw.nbtapi.NbtApiException;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.attribute.Attribute;
@@ -156,7 +155,7 @@ public boolean matches(@Nullable ItemStack requireStack, @Nullable ItemStack giv
if (StringUtils.isNotEmpty(tagOriginal) && StringUtils.isNotEmpty(tagTester) && tagOriginal.equals(tagTester)) {
return true;
}
- } catch (NbtApiException e) {
+ } catch (Exception e) {
plugin.disableNBTAPI();
plugin.getLogger().log(Level.WARNING, "NBTAPI support is broken, dsiable and fallback... (You can safely ignore this)", e);
Util.debugLog("NBTAPI is broken, error: " + e.getMessage() + "\n stacktrace: \n" + Arrays.toString(e.getStackTrace()));
From b946a296cad5ebaf5f9b78ce9fce3335dbe82758 Mon Sep 17 00:00:00 2001
From: Ghost_chu <30802565+Ghost-chu@users.noreply.github.com>
Date: Sat, 18 Dec 2021 17:15:22 +0800
Subject: [PATCH 130/725] Stop to use Ghost_chu's FOSSA services
Stop to use Ghost_chu's FOSSA services
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index e83f6c54ca..b31e443f69 100644
--- a/README.md
+++ b/README.md
@@ -89,7 +89,7 @@ To compile the QuickShop and debug it by yourself, please follow these steps:
## License
-[](https://app.fossa.com/projects/git%2Bgithub.com%2FGhost-chu%2FQuickShop-Reremake?ref=badge_large)
+[](https://app.fossa.com/projects/git%2Bgithub.com%2FPotatoCraft-Studio%2FQuickShop-Reremake?ref=badge_large)
## Developer API
From e3d21a12c5383aa035591199178b542fc15fbb24 Mon Sep 17 00:00:00 2001
From: Ghost_chu <30802565+Ghost-chu@users.noreply.github.com>
Date: Sat, 18 Dec 2021 17:20:36 +0800
Subject: [PATCH 131/725] Update FOSSA service badge
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index b31e443f69..a8768a5ba5 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@



-[](https://app.fossa.com/projects/git%2Bgithub.com%2FGhost-chu%2FQuickShop-Reremake?ref=badge_shield)
+[](https://app.fossa.com/projects/git%2Bgithub.com%2FPotatoCraft-Studio%2FQuickShop-Reremake?ref=badge_shield)
---
-orange)
From 0eb5e86cbc7b8a7b64e00d22a5c0b4d1a8142813 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 18 Dec 2021 19:08:21 +0800
Subject: [PATCH 132/725] Fix the mistaken importing causes
InaccessibleObjectException when changing staffs
---
.../org/maxgamer/quickshop/listener/InternalListener.java | 2 +-
.../util/logging/container/ShopModeratorChangedLog.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/listener/InternalListener.java b/src/main/java/org/maxgamer/quickshop/listener/InternalListener.java
index ce2b39a425..d3edbd7239 100644
--- a/src/main/java/org/maxgamer/quickshop/listener/InternalListener.java
+++ b/src/main/java/org/maxgamer/quickshop/listener/InternalListener.java
@@ -84,7 +84,7 @@ public void shopDelete(ShopDeleteEvent event) {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void shopModeratorChanges(ShopModeratorChangedEvent event) {
if (loggingAction) {
- plugin.logEvent(new ShopModeratorChangedEvent(event.getShop(), event.getModerator()));
+ plugin.logEvent(new ShopModeratorChangedLog(event.getShop().saveToInfoStorage(), event.getModerator()));
}
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/logging/container/ShopModeratorChangedLog.java b/src/main/java/org/maxgamer/quickshop/util/logging/container/ShopModeratorChangedLog.java
index 22705a8270..0d8fdb81f0 100644
--- a/src/main/java/org/maxgamer/quickshop/util/logging/container/ShopModeratorChangedLog.java
+++ b/src/main/java/org/maxgamer/quickshop/util/logging/container/ShopModeratorChangedLog.java
@@ -22,12 +22,12 @@
import lombok.AllArgsConstructor;
import lombok.Data;
import org.maxgamer.quickshop.api.shop.ShopInfoStorage;
-import org.maxgamer.quickshop.shop.SimpleShopModerator;
+import org.maxgamer.quickshop.api.shop.ShopModerator;
@AllArgsConstructor
@Data
public class ShopModeratorChangedLog {
private static int v = 1;
private ShopInfoStorage shop;
- private SimpleShopModerator moderator;
+ private ShopModerator moderator;
}
From 33d1c546c1a4d172e314abd2b13573af9308bb9a Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 19 Dec 2021 19:19:29 +0800
Subject: [PATCH 133/725] Fix display disappeared when enabled
display-auto-despawn
---
.../maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java b/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
index 49bb497958..c12488ee37 100644
--- a/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
+++ b/src/main/java/org/maxgamer/quickshop/watcher/DisplayAutoDespawnWatcher.java
@@ -42,7 +42,7 @@ public class DisplayAutoDespawnWatcher extends BukkitRunnable implements Reloada
public DisplayAutoDespawnWatcher(@NotNull QuickShop plugin) {
this.plugin = plugin;
plugin.getReloadManager().register(this);
-
+ init();
}
private void init() {
From ac8ff04ca0fd983db6c5caea8c3461b238e12f7a Mon Sep 17 00:00:00 2001
From: Ryan
Date: Tue, 21 Dec 2021 03:34:22 +0000
Subject: [PATCH 134/725] Fix Issue #42 - Be mindful of non-symmetric matching
functions (#43)
---
.../quickshop/shop/ContainerShop.java | 20 +++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
index aadfff0742..bf0ef6493e 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java
@@ -321,7 +321,7 @@ public void buy(@NotNull UUID buyer, @NotNull Inventory buyerInventory,
if (stack == null || stack.getType() == Material.AIR) {
continue; // No item
}
- if (matches(stack)) {
+ if (matches(stack, true)) {
int stackSize = Math.min(amount, stack.getAmount());
stack.setAmount(stack.getAmount() - stackSize);
amount -= stackSize;
@@ -346,7 +346,7 @@ public void buy(@NotNull UUID buyer, @NotNull Inventory buyerInventory,
Inventory chestInv = this.getInventory();
for (int i = 0; amount > 0 && i < contents.length; i++) {
ItemStack item = contents[i];
- if (item != null && this.matches(item)) {
+ if (item != null && this.matches(item, true)) {
// Copy it, we don't want to interfere
item = item.clone();
// Amount = total, item.getAmount() = how many items in the
@@ -510,6 +510,17 @@ public boolean isAttached(@NotNull Block b) {
*/
@Override
public boolean matches(@Nullable ItemStack item) {
+ return this.matches(item, false);
+ }
+
+ /**
+ * Returns true if the ItemStack matches what this shop is selling/buying
+ *
+ * @param item The ItemStack
+ * @param buying Some matching functions are not symmetric, this decides the order it will check
+ * @return True if the ItemStack is the same (Excludes amounts)
+ */
+ public boolean matches(@Nullable ItemStack item, boolean buying) {
if (item == null) {
return false;
}
@@ -517,7 +528,8 @@ public boolean matches(@Nullable ItemStack item) {
guest.setAmount(1);
ItemStack owner = this.item.clone();
owner.setAmount(1);
- return plugin.getItemMatcher().matches(guest, owner);
+ return buying ? plugin.getItemMatcher().matches(guest, owner) :
+ plugin.getItemMatcher().matches(owner, guest);
}
@Override
@@ -646,7 +658,7 @@ public void sell(@NotNull UUID seller, @NotNull Inventory sellerInventory,
for (int i = 0; amount > 0 && i < chestContents.length; i++) {
// Can't clone it here, it could be null
ItemStack item = chestContents[i];
- if (item != null && item.getType() != Material.AIR && this.matches(item)) {
+ if (item != null && item.getType() != Material.AIR && this.matches(item, false)) {
// Copy it, we don't want to interfere
item = item.clone();
// Amount = total, item.getAmount() = how many items in the
From b5239cbddc5c3eb367c3ba4248d3cba2b79937ef Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Tue, 21 Dec 2021 11:46:22 +0800
Subject: [PATCH 135/725] Handle empty case and lazy load unlimited-shop-owner
---
.../quickshop/shop/SimpleShopManager.java | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java b/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java
index 6dfec7d876..412a678d1a 100644
--- a/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java
+++ b/src/main/java/org/maxgamer/quickshop/shop/SimpleShopManager.java
@@ -119,11 +119,17 @@ private void init() {
// disable tax account
cacheTaxAccount = null;
}
- String uAccount = plugin.getConfig().getString("unlimited-shop-owner-change-account", "quickshop");
- if (Util.isUUID(uAccount)) {
- cacheUnlimitedShopAccount = new Trader(uAccount, Bukkit.getOfflinePlayer(UUID.fromString(uAccount)));
- } else {
- cacheUnlimitedShopAccount = new Trader(uAccount, Bukkit.getOfflinePlayer(uAccount));
+ if (plugin.getConfig().getBoolean("unlimited-shop-owner-change")) {
+ String uAccount = plugin.getConfig().getString("unlimited-shop-owner-change-account", "");
+ if (uAccount.isEmpty()) {
+ uAccount = "quickshop";
+ plugin.getLogger().log(Level.WARNING, "unlimited-shop-owner-change-account is empty, default to \"quickshop\"");
+ }
+ if (Util.isUUID(uAccount)) {
+ cacheUnlimitedShopAccount = new Trader(uAccount, Bukkit.getOfflinePlayer(UUID.fromString(uAccount)));
+ } else {
+ cacheUnlimitedShopAccount = new Trader(uAccount, Bukkit.getOfflinePlayer(uAccount));
+ }
}
this.priceLimiter = new SimplePriceLimiter(
plugin.getConfig().getDouble("shop.minimum-price"),
From de7e61245dc1a77ac774d03340a62064ecd22e64 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Wed, 22 Dec 2021 23:52:43 +0800
Subject: [PATCH 136/725] Handle fake player case in TextManager
---
.../quickshop/localization/text/SimpleTextManager.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
index e3240b6d66..6ab2d3df4e 100644
--- a/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
+++ b/src/main/java/org/maxgamer/quickshop/localization/text/SimpleTextManager.java
@@ -280,7 +280,8 @@ public void load() {
}
private String findRelativeLanguages(String langCode) {
- if (langCode.isEmpty()) {
+ //langCode may null when some plugins providing fake player
+ if (langCode == null || langCode.isEmpty()) {
return "en_us";
}
String result = languagesCache.getIfPresent(langCode);
From 3160eb14d06ed63cfeec756a3060e9bab6804399 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Thu, 23 Dec 2021 13:06:46 +0800
Subject: [PATCH 137/725] Fix wrong sender limit in transfer command
---
.../command/subcommand/SubCommand_Transfer.java | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Transfer.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Transfer.java
index 9e8f622366..3f47607a00 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Transfer.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Transfer.java
@@ -20,21 +20,19 @@
package org.maxgamer.quickshop.command.subcommand;
import org.bukkit.OfflinePlayer;
-import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.api.command.CommandHandler;
import org.maxgamer.quickshop.api.shop.Shop;
-import org.maxgamer.quickshop.util.MsgUtil;
import org.maxgamer.quickshop.util.Util;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
-public class SubCommand_Transfer implements CommandHandler {
+public class SubCommand_Transfer implements CommandHandler {
private final QuickShop plugin;
@@ -44,13 +42,8 @@ public SubCommand_Transfer(QuickShop plugin) {
@Override
- public void onCommand(@NotNull ConsoleCommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
+ public void onCommand(@NotNull Player sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
if (cmdArg.length == 1) {
- if (!(sender instanceof Player)) {
- MsgUtil.sendDirectMessage(sender, "This command can't be run by the console!");
- return;
- }
- //noinspection deprecation
final OfflinePlayer targetPlayer = plugin.getServer().getOfflinePlayer(cmdArg[0]);
String targetPlayerName = targetPlayer.getName();
if (targetPlayerName == null) {
@@ -93,7 +86,7 @@ public void onCommand(@NotNull ConsoleCommandSender sender, @NotNull String comm
}
@Override
- public @Nullable List onTabComplete(@NotNull ConsoleCommandSender sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
+ public @Nullable List onTabComplete(@NotNull Player sender, @NotNull String commandLabel, @NotNull String[] cmdArg) {
return cmdArg.length <= 2 ? Util.getPlayerList() : Collections.emptyList();
}
}
From 35cce104e6cc5a0c0486c2949fe1c82d0f8eedaf Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sat, 25 Dec 2021 01:53:15 +0800
Subject: [PATCH 138/725] Fix misleading debug logs and variable names
---
.../api/compatibility/CompatibilityModule.java | 6 +++---
.../compatibility/NCPCompatibilityModule.java | 16 ++++++++--------
.../SpartanCompatibilityModule.java | 12 ++++++------
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/api/compatibility/CompatibilityModule.java b/src/main/java/org/maxgamer/quickshop/api/compatibility/CompatibilityModule.java
index f48b40c7a7..86795d0b93 100644
--- a/src/main/java/org/maxgamer/quickshop/api/compatibility/CompatibilityModule.java
+++ b/src/main/java/org/maxgamer/quickshop/api/compatibility/CompatibilityModule.java
@@ -41,8 +41,8 @@ public interface CompatibilityModule {
/**
* Calls CompatibilityModule to toggle the detection status for player between on and off
*
- * @param player The player
- * @param checking On or Off
+ * @param player The player
+ * @param status On or Off
*/
- void toggle(@NotNull Player player, boolean checking);
+ void toggle(@NotNull Player player, boolean status);
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/compatibility/NCPCompatibilityModule.java b/src/main/java/org/maxgamer/quickshop/util/compatibility/NCPCompatibilityModule.java
index d4ab8395c5..3a9273ef20 100644
--- a/src/main/java/org/maxgamer/quickshop/util/compatibility/NCPCompatibilityModule.java
+++ b/src/main/java/org/maxgamer/quickshop/util/compatibility/NCPCompatibilityModule.java
@@ -47,21 +47,21 @@ public NCPCompatibilityModule(QuickShop plugin) {
/**
* Calls CompatibilityModule to toggle the detection status for playerb between on and off
*
- * @param player The player
- * @param checking On or Off
+ * @param player The player
+ * @param status On or Off
*/
@Override
- public void toggle(@NotNull Player player, boolean checking) {
- if (checking) {
+ public void toggle(@NotNull Player player, boolean status) {
+ if (status) {
+ Util.debugLog(
+ "Calling NoCheatPlus continue follow " + player.getName() + " cheats detection.");
+ NCPExemptionManager.unexempt(player);
+ } else {
Util.debugLog(
"Calling NoCheatPlus ignore "
+ player.getName()
+ " cheats detection until we finished permission checks.");
- NCPExemptionManager.unexempt(player);
- } else {
- Util.debugLog(
- "Calling NoCheatPlus continue follow " + player.getName() + " cheats detection.");
NCPExemptionManager.exemptPermanently(player);
}
}
diff --git a/src/main/java/org/maxgamer/quickshop/util/compatibility/SpartanCompatibilityModule.java b/src/main/java/org/maxgamer/quickshop/util/compatibility/SpartanCompatibilityModule.java
index a4c7603011..efdea4cb82 100644
--- a/src/main/java/org/maxgamer/quickshop/util/compatibility/SpartanCompatibilityModule.java
+++ b/src/main/java/org/maxgamer/quickshop/util/compatibility/SpartanCompatibilityModule.java
@@ -40,19 +40,19 @@ public SpartanCompatibilityModule(QuickShop plugin) {
}
@Override
- public void toggle(@NotNull Player player, boolean checking) {
- if (checking) {
+ public void toggle(@NotNull Player player, boolean status) {
+ if (status) {
Util.debugLog(
- "Calling Spartan ignore "
- + player.getName()
- + " cheats detection until we finished permission checks.");
+ "Calling Spartan continue follow " + player.getName() + " cheats detection.");
for (Enums.HackType value : Enums.HackType.values()) {
API.startCheck(player, value);
}
} else {
Util.debugLog(
- "Calling Spartan continue follow " + player.getName() + " cheats detection.");
+ "Calling Spartan ignore "
+ + player.getName()
+ + " cheats detection until we finished permission checks.");
for (Enums.HackType value : Enums.HackType.values()) {
API.stopCheck(player, value);
}
From 331a38ebf1e36ad19c34df06f478bcbf26e0dc2f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun, 26 Dec 2021 10:51:10 +0800
Subject: [PATCH 139/725] Bump PlotSquared-Core from 6.2.0 to 6.2.1 (#37)
Bumps [PlotSquared-Core](https://github.com/IntellectualSites/PlotSquared) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/IntellectualSites/PlotSquared/releases)
- [Commits](https://github.com/IntellectualSites/PlotSquared/compare/6.2.0...6.2.1)
---
updated-dependencies:
- dependency-name: com.plotsquared:PlotSquared-Core
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 88bc9d3ca6..9be726a4e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -710,7 +710,7 @@
com.plotsquared
PlotSquared-Core
- 6.2.0
+ 6.2.1
provided
From 41b0881d1ca6cb01330f78db8236b8a8d3117cb4 Mon Sep 17 00:00:00 2001
From: sandtechnology
Date: Sun, 26 Dec 2021 21:36:00 +0800
Subject: [PATCH 140/725] Let disabled command could be hot loaded
---
.../org/maxgamer/quickshop/api/command/CommandContainer.java | 4 +++-
.../org/maxgamer/quickshop/command/SimpleCommandManager.java | 5 ++---
.../quickshop/command/subcommand/SubCommand_Help.java | 2 +-
.../quickshop/command/subcommand/SubCommand_ROOT.java | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/maxgamer/quickshop/api/command/CommandContainer.java b/src/main/java/org/maxgamer/quickshop/api/command/CommandContainer.java
index 6a654170e0..830585b4a9 100644
--- a/src/main/java/org/maxgamer/quickshop/api/command/CommandContainer.java
+++ b/src/main/java/org/maxgamer/quickshop/api/command/CommandContainer.java
@@ -31,6 +31,7 @@
import java.lang.reflect.Method;
import java.util.List;
import java.util.function.Function;
+import java.util.function.Supplier;
@Data
@Builder
@@ -52,7 +53,8 @@ public class CommandContainer {
private String description; // Will show in the /qs help
private boolean disabled; //Set command is disabled or not.
-
+ @Nullable
+ private Supplier disabledSupplier; //Set command is disabled or not.
@Nullable
private String disablePlaceholder; //Set the text shown if command disabled
@Nullable
diff --git a/src/main/java/org/maxgamer/quickshop/command/SimpleCommandManager.java b/src/main/java/org/maxgamer/quickshop/command/SimpleCommandManager.java
index 9fb2f1fd0e..d1ef7f4e16 100644
--- a/src/main/java/org/maxgamer/quickshop/command/SimpleCommandManager.java
+++ b/src/main/java/org/maxgamer/quickshop/command/SimpleCommandManager.java
@@ -293,8 +293,7 @@ public SimpleCommandManager(QuickShop plugin) {
.permission("quickshop.create.stacks")
.permission("quickshop.create.changeamount")
.executor(new SubCommand_Size(plugin))
- .disabled(!plugin.isAllowStack())
- // TODO: Check the sender
+ .disabledSupplier(plugin::isAllowStack)
.disablePlaceholder(plugin.text().of("command.feature-not-enabled").forLocale())
.build());
registerCmd(CommandContainer.builder()
@@ -407,7 +406,7 @@ public boolean onCommand(
if (!container.getPrefix().equalsIgnoreCase(cmdArg[0])) {
continue;
}
- if (container.isDisabled()) {
+ if (container.isDisabled() || (container.getDisabledSupplier() != null && container.getDisabledSupplier().get())) {
MsgUtil.sendDirectMessage(sender, container.getDisableText(sender));
return true;
}
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Help.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Help.java
index 4a8d9fa709..a07150e058 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Help.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Help.java
@@ -79,7 +79,7 @@ private void sendHelp(@NotNull CommandSender s, @NotNull String commandLabel) {
commandDesc = "Error: Subcommand " + container.getPrefix() + " # " + container.getClass().getCanonicalName() + " doesn't register the correct help description.";
}
}
- if (container.isDisabled()) {
+ if (container.isDisabled() || (container.getDisabledSupplier() != null && container.getDisabledSupplier().get())) {
if (QuickShop.getPermissionManager().hasPermission(s, "quickshop.showdisabled")) {
plugin.text().of(s, "command.format", commandLabel, container.getPrefix(), container.getDisableText(s)).send();
}
diff --git a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_ROOT.java b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_ROOT.java
index d4125656c8..0e09564c34 100644
--- a/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_ROOT.java
+++ b/src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_ROOT.java
@@ -71,7 +71,7 @@ public List