Skip to content

Commit 4dfdbf6

Browse files
authored
Merge pull request #1109 from Ghost-chu/hikari
5.1.1.0
2 parents e255256 + ddf13dc commit 4dfdbf6

File tree

96 files changed

+1530
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1530
-61
lines changed

addon/bluemap/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.ghostchu</groupId>
99
<artifactId>quickshop-hikari</artifactId>
10-
<version>5.1.0.0</version>
10+
<version>5.1.1.0</version>
1111
<relativePath>../../pom.xml</relativePath>
1212
</parent>
1313
<groupId>com.ghostchu.quickshop.addon</groupId>

addon/discordsrv/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.ghostchu</groupId>
99
<artifactId>quickshop-hikari</artifactId>
10-
<version>5.1.0.0</version>
10+
<version>5.1.1.0</version>
1111
<relativePath>../../pom.xml</relativePath>
1212
</parent>
1313
<groupId>com.ghostchu.quickshop.addon</groupId>

addon/discount/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.ghostchu</groupId>
99
<artifactId>quickshop-hikari</artifactId>
10-
<version>5.1.0.0</version>
10+
<version>5.1.1.0</version>
1111
<relativePath>../../pom.xml</relativePath>
1212
</parent>
1313
<groupId>com.ghostchu.quickshop.addon</groupId>

addon/displaycontrol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.ghostchu</groupId>
99
<artifactId>quickshop-hikari</artifactId>
10-
<version>5.1.0.0</version>
10+
<version>5.1.1.0</version>
1111
<relativePath>../../pom.xml</relativePath>
1212
</parent>
1313
<groupId>com.ghostchu.quickshop.addon</groupId>

addon/dynmap/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.ghostchu</groupId>
99
<artifactId>quickshop-hikari</artifactId>
10-
<version>5.1.0.0</version>
10+
<version>5.1.1.0</version>
1111
<relativePath>../../pom.xml</relativePath>
1212
</parent>
1313
<groupId>com.ghostchu.quickshop.addon</groupId>

addon/limited/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.ghostchu</groupId>
99
<artifactId>quickshop-hikari</artifactId>
10-
<version>5.1.0.0</version>
10+
<version>5.1.1.0</version>
1111
<relativePath>../../pom.xml</relativePath>
1212
</parent>
1313
<groupId>com.ghostchu.quickshop.addon</groupId>

addon/list/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.ghostchu</groupId>
99
<artifactId>quickshop-hikari</artifactId>
10-
<version>5.1.0.0</version>
10+
<version>5.1.1.0</version>
1111
<relativePath>../../pom.xml</relativePath>
1212
</parent>
1313
<groupId>com.ghostchu.quickshop.addon</groupId>

addon/plan/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>com.ghostchu</groupId>
99
<artifactId>quickshop-hikari</artifactId>
10-
<version>5.1.0.0</version>
10+
<version>5.1.1.0</version>
1111
<relativePath>../../pom.xml</relativePath>
1212
</parent>
1313
<groupId>com.ghostchu.quickshop.addon</groupId>

addon/reremake-migrator/pom.xml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns="http://maven.apache.org/POM/4.0.0"
5+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
6+
<modelVersion>4.0.0</modelVersion>
7+
<parent>
8+
<groupId>com.ghostchu</groupId>
9+
<artifactId>quickshop-hikari</artifactId>
10+
<version>5.1.1.0</version>
11+
<relativePath>../../pom.xml</relativePath>
12+
</parent>
13+
<groupId>com.ghostchu.quickshop.addon</groupId>
14+
<artifactId>reremake-migrator</artifactId>
15+
<packaging>jar</packaging>
16+
17+
<name>Addon-Reremake-Migrator</name>
18+
19+
<description>Migrator QuickShop-Reremake data to QuickShop-Hikari</description>
20+
<properties>
21+
<java.version>17</java.version>
22+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23+
</properties>
24+
25+
<repositories>
26+
<repository>
27+
<id>quickshop-repo</id>
28+
<url>https://repo.codemc.io/repository/maven-public/</url>
29+
</repository>
30+
</repositories>
31+
32+
<build>
33+
<plugins>
34+
<plugin>
35+
<groupId>org.apache.maven.plugins</groupId>
36+
<artifactId>maven-compiler-plugin</artifactId>
37+
</plugin>
38+
39+
<plugin>
40+
<groupId>org.apache.maven.plugins</groupId>
41+
<artifactId>maven-shade-plugin</artifactId>
42+
</plugin>
43+
</plugins>
44+
<resources>
45+
<resource>
46+
<directory>src/main/resources</directory>
47+
<filtering>true</filtering>
48+
</resource>
49+
</resources>
50+
</build>
51+
52+
53+
<dependencies>
54+
<dependency>
55+
<groupId>org.spigotmc</groupId>
56+
<artifactId>spigot-api</artifactId>
57+
</dependency>
58+
<dependency>
59+
<groupId>com.ghostchu</groupId>
60+
<artifactId>quickshop-bukkit</artifactId>
61+
<version>${parent.version}</version>
62+
<scope>provided</scope>
63+
</dependency>
64+
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
65+
<dependency>
66+
<groupId>org.apache.commons</groupId>
67+
<artifactId>commons-lang3</artifactId>
68+
<version>3.13.0</version>
69+
<scope>provided</scope>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.maxgamer</groupId>
73+
<artifactId>QuickShop</artifactId>
74+
<version>5.1.2.2</version>
75+
<scope>provided</scope>
76+
</dependency>
77+
<dependency>
78+
<groupId>de.tr7zw</groupId>
79+
<artifactId>item-nbt-api-plugin</artifactId>
80+
<version>2.11.3</version>
81+
<scope>compile</scope>
82+
</dependency>
83+
<dependency>
84+
<groupId>com.google.protobuf</groupId>
85+
<artifactId>protobuf-java</artifactId>
86+
<version>3.21.9</version>
87+
<scope>compile</scope>
88+
</dependency>
89+
<!-- <dependency>-->
90+
<!-- <groupId>net.kyori</groupId>-->
91+
<!-- <artifactId>adventure-text-serializer-plain</artifactId>-->
92+
<!-- <version>4.12.0</version>-->
93+
<!-- <scope>provided</scope>-->
94+
<!-- </dependency>-->
95+
</dependencies>
96+
</project>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
package com.ghostchu.quickshop.addon.reremakemigrator;
2+
3+
import com.ghostchu.quickshop.QuickShop;
4+
import com.ghostchu.quickshop.addon.reremakemigrator.command.SubCommand_ReremakeMigrate;
5+
import com.ghostchu.quickshop.api.command.CommandContainer;
6+
import net.kyori.adventure.text.Component;
7+
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
8+
import org.bukkit.Bukkit;
9+
import org.bukkit.event.EventHandler;
10+
import org.bukkit.event.EventPriority;
11+
import org.bukkit.event.HandlerList;
12+
import org.bukkit.event.Listener;
13+
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
14+
import org.bukkit.plugin.Plugin;
15+
import org.bukkit.plugin.java.JavaPlugin;
16+
17+
public class Main extends JavaPlugin implements Listener {
18+
static Main instance;
19+
private QuickShop hikari;
20+
private org.maxgamer.quickshop.QuickShop reremake;
21+
private String deniedMessage;
22+
@Override
23+
public void onLoad() {
24+
instance = this;
25+
}
26+
27+
@Override
28+
public void onEnable() {
29+
saveDefaultConfig();
30+
hikari = QuickShop.getInstance();
31+
reremake = org.maxgamer.quickshop.QuickShop.getInstance();
32+
getLogger().info("Found QuickShop-Hikari: "+hikari.getJavaPlugin().getDescription().getVersion());
33+
getLogger().info("Found QuickShop-Reremake: "+reremake.getDescription().getVersion());
34+
Bukkit.getPluginManager().registerEvents(this, this);
35+
hikari.getCommandManager().registerCmd(
36+
CommandContainer
37+
.builder()
38+
.prefix("migratefromreremake")
39+
.description((locale) -> hikari.text().of("addon.reremake-migrator.commands.migratefromreremake").forLocale(locale))
40+
.permission("quickshopaddon.reremakemigrator.migrator-admin")
41+
.executor(new SubCommand_ReremakeMigrate(this, hikari,reremake))
42+
.build());
43+
}
44+
45+
@Override
46+
public void onDisable() {
47+
HandlerList.unregisterAll((Plugin) this);
48+
}
49+
50+
public QuickShop getHikari() {
51+
return hikari;
52+
}
53+
54+
public org.maxgamer.quickshop.QuickShop getReremake() {
55+
return reremake;
56+
}
57+
58+
public void setDeniedMessage(String deniedMessage) {
59+
this.deniedMessage = deniedMessage;
60+
}
61+
62+
public void setDeniedMessage(Component deniedMessage) {
63+
this.deniedMessage = LegacyComponentSerializer.legacySection().serialize(deniedMessage);
64+
}
65+
66+
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
67+
public void onPlayerJoin(AsyncPlayerPreLoginEvent event){
68+
if(this.deniedMessage != null){
69+
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_OTHER, this.deniedMessage);
70+
}
71+
}
72+
}

0 commit comments

Comments
 (0)