Skip to content

Commit 63291ca

Browse files
5.1.2.5 1.20.2 Support (#406)
* Using varchar(128) for world name in database * Replace Rollbar token * Fix event append issue for custom item display * Add 1.20.2 Support * Fix typo for limit comment * Bump to 5.1.2.5 * Improve real display item message * Bump de.tr7zw:item-nbt-api-plugin from 2.11.3 to 2.12.0 (#403) Bumps de.tr7zw:item-nbt-api-plugin from 2.11.3 to 2.12.0. --- updated-dependencies: - dependency-name: de.tr7zw:item-nbt-api-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump me.clip:placeholderapi from 2.11.2 to 2.11.4 (#404) Bumps me.clip:placeholderapi from 2.11.2 to 2.11.4. --- updated-dependencies: - dependency-name: me.clip:placeholderapi dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.spigotmc:spigot-api (#405) Bumps org.spigotmc:spigot-api from 1.20.1-R0.1-SNAPSHOT to 1.20.2-R0.1-SNAPSHOT. --- updated-dependencies: - dependency-name: org.spigotmc:spigot-api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <[email protected]>
1 parent dc77f81 commit 63291ca

File tree

7 files changed

+22
-11
lines changed

7 files changed

+22
-11
lines changed

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<artifactId>QuickShop</artifactId>
2626

2727
<properties>
28-
<pluginver>5.1.2.4</pluginver>
28+
<pluginver>5.1.2.5</pluginver>
2929
<package>org.maxgamer.quickshop</package>
3030
<developer>Ghost-chu</developer>
3131
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -565,7 +565,7 @@
565565
<dependency>
566566
<groupId>me.clip</groupId>
567567
<artifactId>placeholderapi</artifactId>
568-
<version>2.11.2</version>
568+
<version>2.11.4</version>
569569
<scope>provided</scope>
570570
<exclusions>
571571
<exclusion>
@@ -627,7 +627,7 @@
627627
<dependency>
628628
<groupId>org.spigotmc</groupId>
629629
<artifactId>spigot-api</artifactId>
630-
<version>1.20.1-R0.1-SNAPSHOT</version>
630+
<version>1.20.2-R0.1-SNAPSHOT</version>
631631
<scope>provided</scope>
632632
</dependency>
633633
<dependency>
@@ -886,7 +886,7 @@
886886
<dependency>
887887
<groupId>de.tr7zw</groupId>
888888
<artifactId>item-nbt-api-plugin</artifactId>
889-
<version>2.11.3</version>
889+
<version>2.12.0</version>
890890
<scope>provided</scope>
891891
</dependency>
892892
<dependency>

src/main/java/org/maxgamer/quickshop/QuickShop.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public class QuickShop extends JavaPlugin implements QuickShopAPI {
236236
@Nullable
237237
private AbstractEconomy economy;
238238
/**
239-
* Whether or not to limit players shop amounts
239+
* Whether to limit players shop amounts
240240
*/
241241
private boolean limit = false;
242242
@Nullable
@@ -500,7 +500,7 @@ private void load3rdParty() {
500500
}
501501
}
502502
if (AbstractDisplayItem.getNowUsing() == DisplayType.REALITEM) {
503-
getLogger().warning("You're using Real Display system and that may cause your server lagg, switch to Virtual Display system if you can!");
503+
getLogger().warning("You're using Real Display system and that may cause your server lagg, switch to Virtual Display system if you can! (Checkout display-type option in config.yml)");
504504
Plugin clearLagPlugin = Bukkit.getPluginManager().getPlugin("ClearLag");
505505
if (clearLagPlugin != null && Util.verifyClassLoader(clearLagPlugin)) {
506506
try {

src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,13 @@ private ComponentBuilder append(BaseComponent component, ComponentBuilder.Format
439439
if (component.isReset() && retention == ComponentBuilder.FormatRetention.ALL) {
440440
retention = ComponentBuilder.FormatRetention.EVENTS;
441441
}
442+
443+
//Hacky method to replace dummy components
444+
if (previous == null && builder.getCursor() == -1) {
445+
previous = new TextComponent("");
446+
builder.append(previous);
447+
}
448+
442449
if (previous != null && (!component.isReset() || retention == ComponentBuilder.FormatRetention.EVENTS)) {
443450
component.copyFormatting(previous, retention, false);
444451
parts.add(component);

src/main/java/org/maxgamer/quickshop/database/SimpleDatabaseHelper.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ private void init() throws SQLException {
8181
*/
8282

8383
private void createShopsTable() {
84-
String sqlString = "CREATE TABLE " + manager.getDatabase().getTablePrefix() + "shops (owner VARCHAR(255) NOT NULL, price double(32, 2) NOT NULL, itemConfig TEXT CHARSET utf8 NOT NULL, x INTEGER(32) NOT NULL, y INTEGER(32) NOT NULL, z INTEGER(32) NOT NULL, world VARCHAR(32) NOT NULL, unlimited boolean, type boolean, PRIMARY KEY (x, y, z, world) );";
84+
String sqlString = "CREATE TABLE " + manager.getDatabase().getTablePrefix() + "shops (owner VARCHAR(255) NOT NULL, price double(32, 2) NOT NULL, itemConfig TEXT CHARSET utf8 NOT NULL, x INTEGER(32) NOT NULL, y INTEGER(32) NOT NULL, z INTEGER(32) NOT NULL, world VARCHAR(128) NOT NULL, unlimited boolean, type boolean, PRIMARY KEY (x, y, z, world) );";
8585
if (manager.getDatabase() instanceof MySQLCore) {
86-
sqlString = "CREATE TABLE " + manager.getDatabase().getTablePrefix() + "shops (owner VARCHAR(255) NOT NULL, price double(32, 2) NOT NULL, itemConfig TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, x INTEGER(32) NOT NULL, y INTEGER(32) NOT NULL, z INTEGER(32) NOT NULL, world VARCHAR(32) NOT NULL, unlimited boolean, type boolean, PRIMARY KEY (x, y, z, world) );";
86+
sqlString = "CREATE TABLE " + manager.getDatabase().getTablePrefix() + "shops (owner VARCHAR(255) NOT NULL, price double(32, 2) NOT NULL, itemConfig TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, x INTEGER(32) NOT NULL, y INTEGER(32) NOT NULL, z INTEGER(32) NOT NULL, world VARCHAR(128) NOT NULL, unlimited boolean, type boolean, PRIMARY KEY (x, y, z, world) );";
8787
}
8888
manager.runInstantTask(new DatabaseTask(sqlString));
8989
}
@@ -111,7 +111,7 @@ private void createLogsTable() {
111111

112112
private void createExternalCacheTable() {
113113
String createTable = "CREATE TABLE " + manager.getDatabase().getTablePrefix()
114-
+ "external_cache (x INTEGER(32) NOT NULL, y INTEGER(32) NOT NULL, z INTEGER(32) NOT NULL, world VARCHAR(32) NOT NULL, PRIMARY KEY (x, y, z, world));";
114+
+ "external_cache (x INTEGER(32) NOT NULL, y INTEGER(32) NOT NULL, z INTEGER(32) NOT NULL, world VARCHAR(128) NOT NULL, PRIMARY KEY (x, y, z, world));";
115115
manager.runInstantTask(new DatabaseTask(createTable));
116116
createColumn("external_cache", "space", new DataType(DataTypeMapping.INT, null));
117117
createColumn("external_cache", "stock", new DataType(DataTypeMapping.INT, null));
@@ -151,6 +151,9 @@ public void onFailed(SQLException e) {
151151
manager.runInstantTask(new DatabaseTask("ALTER TABLE " + manager.getDatabase().getTablePrefix() + "shops TO CHARACTER SET uft8mb4 COLLATE utf8mb4_general_ci", checkTask));
152152
manager.runInstantTask(new DatabaseTask("ALTER TABLE " + manager.getDatabase().getTablePrefix() + "messages TO CHARACTER SET uft8mb4 COLLATE utf8mb4_general_ci", checkTask));
153153
manager.runInstantTask(new DatabaseTask("ALTER TABLE " + manager.getDatabase().getTablePrefix() + "history TO CHARACTER SET uft8mb4 COLLATE utf8mb4_general_ci", checkTask));
154+
//Using varchar 128 for world name
155+
manager.runInstantTask(new DatabaseTask("ALTER TABLE " + manager.getDatabase().getTablePrefix() + "shops MODIFY COLUMN world VARCHAR(128)", checkTask));
156+
manager.runInstantTask(new DatabaseTask("ALTER TABLE " + manager.getDatabase().getTablePrefix() + "external_cache MODIFY COLUMN world VARCHAR(128)", checkTask));
154157
}
155158
plugin.getLogger().info("Finished!");
156159
}

src/main/java/org/maxgamer/quickshop/util/GameVersion.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public enum GameVersion {
6767
v1_19_R2(true, false, true, true, true, true),
6868
v1_19_R3(true, false, true, true, true, true),
6969
v1_20_R1(true, false, true, true, true, true),
70+
v1_20_R2(true, false, true, true, true, true),
7071

7172
UNKNOWN(true, false, false, true, true, true);
7273
/**

src/main/java/org/maxgamer/quickshop/util/reporter/error/RollbarErrorReporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class RollbarErrorReporter implements IErrorReporter {
6868

6969
public RollbarErrorReporter(@NotNull QuickShop plugin) {
7070
this.plugin = plugin;
71-
Config config = ConfigBuilder.withAccessToken("164c5246fa464ae4a6a0867a856d4062")
71+
Config config = ConfigBuilder.withAccessToken("c386df69d08440d9a3d982cf98b53ed6")
7272
.environment(Util.isDevEdition() ? "development" : "production")
7373
.platform(plugin.getServer().getVersion())
7474
.codeVersion(QuickShop.getVersion())

src/main/java/org/maxgamer/quickshop/util/updater/impl/MavenUpdater.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static class IndexMetaHandler extends DefaultHandler {
252252
@Override
253253
public void endElement(String uri, String localName, String qName) {
254254
switch (qName) {
255-
case "latest":
255+
case "release":
256256
latestRelease = tempStr;
257257
break;
258258
case "lastUpdated":

0 commit comments

Comments
 (0)