Skip to content

Commit 584cdfd

Browse files
committed
save changes
1 parent 3312dac commit 584cdfd

File tree

2 files changed

+59
-52
lines changed

2 files changed

+59
-52
lines changed

pom.xml

Lines changed: 59 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,18 @@
208208
<pattern>org.enginehub.squirrelid.</pattern>
209209
<shadedPattern>org.maxgamer.quickshop.shade.org.enginehub.squirrelid.</shadedPattern>
210210
</relocation>
211-
<relocation>
212-
<pattern>net.kyori.</pattern>
213-
<shadedPattern>org.maxgamer.quickshop.shade.org.net.kyori.</shadedPattern>
214-
</relocation>
215211
<relocation>
216212
<pattern>com.squareup.</pattern>
217213
<shadedPattern>org.maxgamer.quickshop.shade.org.com.squareup.</shadedPattern>
218214
</relocation>
215+
<relocation>
216+
<pattern>net.kyori.examination.</pattern>
217+
<shadedPattern>org.maxgamer.quickshop.shade.net.kyori.examination</shadedPattern>
218+
</relocation>
219+
<relocation>
220+
<pattern>net.kyori.adventure.</pattern>
221+
<shadedPattern>org.maxgamer.quickshop.shade.kyori.adventure</shadedPattern>
222+
</relocation>
219223

220224

221225

@@ -406,10 +410,10 @@
406410
<id>minebench-repo</id>
407411
<url>https://repo.minebench.de/</url>
408412
</repository>
409-
<repository>
410-
<id>songoda-repo</id>
411-
<url>https://repo.songoda.com/repository/public/</url>
412-
</repository>
413+
<!-- <repository>-->
414+
<!-- <id>songoda-repo</id>-->
415+
<!-- <url>https://repo.songoda.com/repository/public/</url>-->
416+
<!-- </repository>-->
413417
<repository>
414418
<id>papermc</id>
415419
<url>https://papermc.io/repo/repository/maven-public/</url>
@@ -864,18 +868,18 @@
864868
<version>4.9.2</version>
865869
<systemPath>${project.basedir}/lib/TNE.jar</systemPath>
866870
</dependency>
867-
<dependency>
868-
<groupId>com.songoda</groupId>
869-
<artifactId>skyblock</artifactId>
870-
<version>2.2.13</version>
871-
<scope>provided</scope>
872-
<exclusions>
873-
<exclusion>
874-
<artifactId>MVdWPlaceholderAPI</artifactId>
875-
<groupId>be.maximvdw</groupId>
876-
</exclusion>
877-
</exclusions>
878-
</dependency>
871+
<!-- <dependency>-->
872+
<!-- <groupId>com.songoda</groupId>-->
873+
<!-- <artifactId>skyblock</artifactId>-->
874+
<!-- <version>2.2.13</version>-->
875+
<!-- <scope>provided</scope>-->
876+
<!-- <exclusions>-->
877+
<!-- <exclusion>-->
878+
<!-- <artifactId>MVdWPlaceholderAPI</artifactId>-->
879+
<!-- <groupId>be.maximvdw</groupId>-->
880+
<!-- </exclusion>-->
881+
<!-- </exclusions>-->
882+
<!-- </dependency>-->
879883
<!-- <dependency>-->
880884
<!-- <groupId>team.aura_dev.lib.slf4j-plugin.spigot</groupId>-->
881885
<!-- <artifactId>slf4j-plugin-spigot</artifactId>-->
@@ -956,18 +960,6 @@
956960
<systemPath>${project.basedir}/lib/IridiumSkyblock-3.1.1.jar</systemPath>
957961
<scope>system</scope>
958962
</dependency>
959-
<dependency>
960-
<groupId>net.kyori</groupId>
961-
<artifactId>adventure-platform-bukkit</artifactId>
962-
<version>4.0.0</version>
963-
<scope>compile</scope>
964-
</dependency>
965-
<dependency>
966-
<groupId>org.maxgamer.quickshop.externalhelper</groupId>
967-
<artifactId>PaperAdventureLib</artifactId>
968-
<version>1.0-SNAPSHOT</version>
969-
<scope>compile</scope>
970-
</dependency>
971963
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
972964
<dependency>
973965
<groupId>com.squareup.okhttp3</groupId>
@@ -982,6 +974,40 @@
982974
<version>2.11.0</version>
983975
<scope>compile</scope>
984976
</dependency>
985-
977+
<dependency>
978+
<groupId>net.kyori</groupId>
979+
<artifactId>adventure-text-serializer-gson</artifactId>
980+
<version>4.9.1</version>
981+
</dependency>
982+
<dependency>
983+
<groupId>net.kyori</groupId>
984+
<artifactId>adventure-api</artifactId>
985+
<version>4.9.1</version>
986+
</dependency>
987+
<dependency>
988+
<groupId>net.kyori</groupId>
989+
<artifactId>adventure-nbt</artifactId>
990+
<version>4.9.1</version>
991+
</dependency>
992+
<dependency>
993+
<groupId>net.kyori</groupId>
994+
<artifactId>adventure-key</artifactId>
995+
<version>4.9.1</version>
996+
</dependency>
997+
<dependency>
998+
<groupId>net.kyori</groupId>
999+
<artifactId>adventure-text-serializer-gson-legacy-impl</artifactId>
1000+
<version>4.9.1</version>
1001+
</dependency>
1002+
<dependency>
1003+
<groupId>net.kyori</groupId>
1004+
<artifactId>adventure-platform-bukkit</artifactId>
1005+
<version>4.0.0</version>
1006+
</dependency>
1007+
<dependency>
1008+
<groupId>net.kyori</groupId>
1009+
<artifactId>adventure-platform-api</artifactId>
1010+
<version>4.0.0</version>
1011+
</dependency>
9861012
</dependencies>
9871013
</project>

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@
2626
import lombok.NonNull;
2727
import lombok.Setter;
2828
import lombok.SneakyThrows;
29-
import net.kyori.adventure.key.Key;
30-
import net.kyori.adventure.nbt.api.BinaryTagHolder;
3129
import net.kyori.adventure.text.Component;
32-
import net.kyori.adventure.text.event.HoverEvent;
3330
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
3431
import org.apache.commons.lang.StringUtils;
3532
import org.bukkit.*;
@@ -56,8 +53,6 @@
5653
import org.jetbrains.annotations.Nullable;
5754
import org.maxgamer.quickshop.QuickShop;
5855
import org.maxgamer.quickshop.database.MySQLCore;
59-
import org.maxgamer.quickshop.externalhelper.paperadventurelib.ItemStackAdventure;
60-
import org.maxgamer.quickshop.externalhelper.paperadventurelib.PaperAdventureLib;
6156
import org.maxgamer.quickshop.shop.DisplayItem;
6257
import org.maxgamer.quickshop.shop.Shop;
6358
import org.yaml.snakeyaml.DumperOptions;
@@ -1405,19 +1400,5 @@ public static void mainThreadRun(@NotNull Runnable runnable) {
14051400
}
14061401
}
14071402

1408-
public static HoverEvent<?> generateItemHoverEvent(ItemStack stack){
1409-
if(PaperAdventureLib.isSupported())
1410-
return ItemStackAdventure.convertHoverItem(stack);
1411-
try {
1412-
return HoverEvent.showItem(
1413-
HoverEvent.ShowItem.of(
1414-
Key.key(stack.getType().getKey().getNamespace(), stack.getType().getKey().getKey()),
1415-
stack.getAmount(),
1416-
BinaryTagHolder.of(ReflectFactory.convertBukkitItemStackToJson(stack))));
1417-
} catch (InvocationTargetException | NoSuchMethodException | InstantiationException | IllegalAccessException e) {
1418-
e.printStackTrace();
1419-
}
1420-
return HoverEvent.showText(Component.text("Failed to generate item preview. Consider switch to Paper."));
1421-
}
14221403

14231404
}

0 commit comments

Comments
 (0)