Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading shops on startup is too late/slow #128

Open
MarvinKlar opened this issue Dec 5, 2023 · 0 comments
Open

Loading shops on startup is too late/slow #128

MarvinKlar opened this issue Dec 5, 2023 · 0 comments

Comments

@MarvinKlar
Copy link

When starting up the server and joining right after startup I tried to execute a Bossshop command, which caused the following error:

[08:25:59] [Server thread/INFO]: Mr_Minecraft15 joined the game
[08:25:59] [Server thread/INFO]: Mr_Minecraft15[/XXXXXXXX] logged in with entity id 175 at ([doggerland]-1675.4220921459582, 84.9375, 504.31518583701165)
[08:26:13] [Server thread/ERROR]: [ItemJoin_ERROR] {ItemCommand} There was an error executing an item's command as console, if this continues report it to the developer.
[08:26:13] [Server thread/WARN]: org.bukkit.command.CommandException: Unhandled exception executing command 'bs' in plugin BossShopPro v2.0.9
[08:26:13] [Server thread/WARN]: 	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47)
[08:26:13] [Server thread/WARN]: 	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
[08:26:13] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand(CraftServer.java:869)
[08:26:13] [Server thread/WARN]: 	at ItemJoin-6.0.3-SNAPSHOT-b916.jar//me.RockinChaos.itemjoin.item.ItemCommand.dispatchConsoleCommands(ItemCommand.java:508)
[08:26:13] [Server thread/WARN]: 	at ItemJoin-6.0.3-SNAPSHOT-b916.jar//me.RockinChaos.itemjoin.item.ItemCommand.lambda$sendDispatch$3(ItemCommand.java:462)
[08:26:13] [Server thread/WARN]: 	at ItemJoin-6.0.3-SNAPSHOT-b916.jar//me.RockinChaos.itemjoin.item.ItemCommand$$Lambda$9196/0x00000000d5c6fc78.run(Unknown Source)
[08:26:13] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101)
[08:26:13] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483)
[08:26:13] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1567)
[08:26:13] [Server thread/WARN]: 	at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:490)
[08:26:13] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1483)
[08:26:13] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1282)
[08:26:13] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[08:26:13] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer$$Lambda$3658/0x000000007c557d20.run(Unknown Source)
[08:26:13] [Server thread/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:883)
[08:26:13] [Server thread/WARN]: Caused by: java.lang.NullPointerException: Cannot invoke "org.black_ixx.bossshop.core.BSShops.getShop(java.lang.String)" because the return value of "org.black_ixx.bossshop.managers.ClassManager.getShops()" is null
[08:26:13] [Server thread/WARN]: 	at BossShopPro.jar//org.black_ixx.bossshop.managers.CommandManager.onCommand(CommandManager.java:132)
[08:26:13] [Server thread/WARN]: 	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[08:26:13] [Server thread/WARN]: 	... 14 more
[08:26:20] [Craft Scheduler Thread - 13 - BossShopPro/INFO]: [BossShopPro] Loaded 323 Shops!
[08:26:20] [Craft Scheduler Thread - 13 - BossShopPro/INFO]: [BossShopPro] Vault found.

I would suggest to either load the shops synchronous on startup or to queue the issued BossShop commands when the plugin is not yet fully loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant