Blackixx / BossShopPro

BossShopPro is one of the most player-friendly and multifunctional GUI plugins ever! Say goodbye to all the annoying command- or signshops!
https://www.spigotmc.org/resources/bossshoppro-the-most-powerful-chest-gui-shop-menu-plugin.222/
MIT License
43 stars 63 forks source link

Head NBT Skull Support for 1.20.2 #126

Open James-P-Bennett opened 1 year ago

James-P-Bennett commented 1 year ago

Hi, the plugin works for nearly every version of Spigot up to 1.20.2.

Here's the stacktrace of attempting to use custom skulls in menus. [13:27:06 WARN]: java.lang.NullPointerException: Profile name must not be null [13:27:06 WARN]: at java.base/java.util.Objects.requireNonNull(Objects.java:235) [13:27:06 WARN]: at com.mojang.authlib.GameProfile.(GameProfile.java:31) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.item.ItemDataPartCustomSkull.transformSkull(ItemDataPartCustomSkull.java:28) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.item.ItemDataPartCustomSkull.transform(ItemDataPartCustomSkull.java:93) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.item.ItemDataPart.transformItem(ItemDataPart.java:213) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.item.ItemDataPart.transformItem(ItemDataPart.java:128) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.item.ItemDataPart.transformItem(ItemDataPart.java:106) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.item.ItemStackCreator.createItemStack(ItemStackCreator.java:96) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.item.ItemStackCreator.createItemStack(ItemStackCreator.java:57) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.BuyItemHandler.createBuyItem(BuyItemHandler.java:197) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.BuyItemHandler.loadItem(BuyItemHandler.java:47) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.config.BSConfigShop.loadItems(BSConfigShop.java:184) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.config.BSConfigShop.setup(BSConfigShop.java:96) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.config.BSConfigShop.(BSConfigShop.java:72) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.config.BSConfigShop.(BSConfigShop.java:42) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.config.BSConfigShop.(BSConfigShop.java:38) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.core.BSShops.loadShop(BSShops.java:79) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.core.BSShops.loadShops(BSShops.java:52) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.core.BSShops.(BSShops.java:30) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.ClassManager.setupDependentClasses(ClassManager.java:137) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.BossShop.reloadPlugin(BossShop.java:145) [13:27:06 WARN]: at BossShopPro.jar//org.black_ixx.bossshop.managers.CommandManager.onCommand(CommandManager.java:32) [13:27:06 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) [13:27:06 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) [13:27:06 WARN]: at org.bukkit.craftbukkit.v1_20_R2.CraftServer.dispatchCommand(CraftServer.java:1003) [13:27:06 WARN]: at org.bukkit.craftbukkit.v1_20R2.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) [13:27:06 WARN]: at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:265) [13:27:06 WARN]: at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:338) [13:27:06 WARN]: at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:322) [13:27:06 WARN]: at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2275) [13:27:06 WARN]: at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$20(PlayerConnection.java:2235) [13:27:06 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59) [13:27:06 WARN]: at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) [13:27:06 WARN]: at net.minecraft.server.TickTask.run(TickTask.java:18) [13:27:06 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153) [13:27:06 WARN]: at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24) [13:27:06 WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1351) [13:27:06 WARN]: at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:193) [13:27:06 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126) [13:27:06 WARN]: at net.minecraft.server.MinecraftServer.bg(MinecraftServer.java:1328) [13:27:06 WARN]: at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1321) [13:27:06 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136) [13:27:06 WARN]: at net.minecraft.server.MinecraftServer.u(MinecraftServer.java:1299) [13:27:06 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1187) [13:27:06 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) [13:27:06 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)

MorkaZ commented 11 months ago

Does not work for me as well.

Androkai commented 11 months ago

Sadly something with skulls seems to have broken in Paper 1.20.2. Getting the same error multiple times:

[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/ERROR]: [BossShopPro] Was not able to create BuyItem Back! Error at Stage 'MenuItem creation'. [Shop: Item_Kürbisse_und_Melonen_minecraft.melon]
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]: java.lang.NullPointerException: Profile name must not be null
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at java.base/java.util.Objects.requireNonNull(Objects.java:235)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at com.mojang.authlib.GameProfile.<init>(GameProfile.java:31)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.item.ItemDataPartCustomSkull.transformSkull(ItemDataPartCustomSkull.java:28)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.item.ItemDataPartCustomSkull.transform(ItemDataPartCustomSkull.java:93)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.item.ItemDataPart.transformItem(ItemDataPart.java:213)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.item.ItemDataPart.transformItem(ItemDataPart.java:128)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.item.ItemDataPart.transformItem(ItemDataPart.java:106)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.item.ItemStackCreator.createItemStack(ItemStackCreator.java:96)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.item.ItemStackCreator.createItemStack(ItemStackCreator.java:57)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.BuyItemHandler.createBuyItem(BuyItemHandler.java:197)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.BuyItemHandler.loadItem(BuyItemHandler.java:47)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.config.BSConfigShop.loadItems(BSConfigShop.java:184)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.config.BSConfigShop.setup(BSConfigShop.java:96)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.config.BSConfigShop.<init>(BSConfigShop.java:72)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.config.BSConfigShop.<init>(BSConfigShop.java:42)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.config.BSConfigShop.<init>(BSConfigShop.java:38)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.core.BSShops.loadShop(BSShops.java:79)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.core.BSShops.loadShops(BSShops.java:52)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.core.BSShops.<init>(BSShops.java:30)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.managers.ClassManager.setupDependentClasses(ClassManager.java:137)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at BossShopPro-2.0.9.jar//org.black_ixx.bossshop.BossShop$1.run(BossShop.java:79)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/WARN]:     at java.base/java.lang.Thread.run(Thread.java:840)
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/ERROR]: [BossShopPro] Probably caused by Config Mistakes.
[18:51:55] [Craft Scheduler Thread - 4 - BossShopPro/ERROR]: [BossShopPro] For more help please send me a PM at Spigot.

It should be related to https://github.com/PaperMC/Paper/issues/9843 and might get fixed on their side.

Logende commented 11 months ago

Seems like the API was changed 😮

@James-P-Bennett @MorkaZ do you use paper too?

MorkaZ commented 11 months ago

Seems like the API was changed 😮

@James-P-Bennett @MorkaZ do you use paper too?

yes

James-P-Bennett commented 11 months ago

https://github.com/James-P-Bennett/BossShopPro

Here's my fork with the corrected & compiled jar files. 1.20.2, some archaic features like epic spawners integration was removed