BG-Software-LLC / SuperiorSkyblock2

Optimized, feature packed Skyblock core.
https://bg-software.com/superiorskyblock/
GNU General Public License v3.0
167 stars 141 forks source link

Error message on executing /is level when The End island is generated #2041

Closed Davisiiiik closed 5 months ago

Davisiiiik commented 5 months ago

Minecraft's Version

git-SlimeWorldManager-15796 (MC: 1.20.4) (Git: 7b0ee15 on paper_upstream)

Plugin's Version

SSB2: 2023.3-b155 ASWM: 2.10.0

Describe the bug

When a player has unlocks and generates The End island, he cannot use /is level anymore, because of the error described bellow. Furthermore if the player tries to build after executing the command, he gets message saying that he cannot build, because island level recalculation is in progress.

Console output:

[15:36:00 INFO]: Davisiiiik issued server command: /is level
[15:36:00 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'is level' in com.bgsoftware.superiorskyblock.commands.CommandsManagerImpl$PluginCommand(island)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165) ~[slimeworldmanager-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:999) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at org.bukkit.craftbukkit.v1_20_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:32) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.commands.execution.CommandQueueEntry.a(CommandQueueEntry.java:5) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:101) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:434) ~[?:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:336) ~[?:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:323) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2230) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$14(ServerGamePacketListenerImpl.java:2190) ~[?:?]
        at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1470) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1447) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1370) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1348) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1237) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[slimeworldmanager-1.20.4.jar:git-SlimeWorldManager-15796]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "com.bgsoftware.superiorskyblock.api.world.WorldInfo.getEnvironment()" because the return value of "com.bgsoftware.superiorskyblock.core.ChunkPosition.getWorldsInfo()" is null
        at com.bgsoftware.superiorskyblock.island.chunk.DirtyChunksContainer.isMarkedDirty(DirtyChunksContainer.java:58) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.island.SIsland.isChunkDirty(SIsland.java:2522) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.island.IslandUtils.getChunkCoords(IslandUtils.java:81) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.island.IslandUtils.getAllChunksAsync(IslandUtils.java:131) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.island.IslandUtils.getAllChunksAsync(IslandUtils.java:154) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.island.algorithm.DefaultIslandCalculationAlgorithm.calculateIsland(DefaultIslandCalculationAlgorithm.java:67) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.island.SIsland.calcIslandWorthInternal(SIsland.java:4069) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.island.SIsland.calcIslandWorth(SIsland.java:1670) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.island.SIsland.calcIslandWorth(SIsland.java:1654) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.commands.player.CmdRecalc.execute(CmdRecalc.java:70) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.commands.ISuperiorCommand.execute(ISuperiorCommand.java:18) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at com.bgsoftware.superiorskyblock.commands.CommandsManagerImpl$PluginCommand.execute(CommandsManagerImpl.java:285) ~[SuperiorSkyblock2-2023.3-b155.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[slimeworldmanager-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        ... 28 more

To Reproduce

  1. Install server with ASWM
  2. Unlock The End
  3. Teleport to The End
  4. Execute /is level command

Additional Information

Tested on multiple servers

Blank server with ASWM (only ASWM, CMI and SSB2): Error occured

Blank server without ASWM (only CMI and SSB2): No Error

OmerBenGera commented 5 months ago

Check out latest dev build (both SuperiorSkyblock and the module), let me know if the issue is fixed

Davisiiiik commented 5 months ago

Fixed, thank you!