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

getWorldMinHeight no world in location throws exception #6480

Closed
TheLimeGlass opened this issue Mar 5, 2024 · 0 comments
Closed

getWorldMinHeight no world in location throws exception #6480

TheLimeGlass opened this issue Mar 5, 2024 · 0 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. PR available Issues which have a yet-to-be merged PR resolving it

Comments

@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Mar 5, 2024

Skript/Server Version

2.8.3
Spigot Paper 1.20.1

Bug Description

[14:42:24] [Server thread/ERROR]: #!#! Stack trace:
[14:42:24] [Server thread/ERROR]: #!#! java.lang.NullPointerException: Cannot invoke "org.bukkit.World.getMinHeight()" because "world" is null
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.bukkitutil.WorldUtils.getWorldMinHeight(WorldUtils.java:45)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.util.BlockLineIterator.fitInWorld(BlockLineIterator.java:90)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.util.BlockLineIterator.<init>(BlockLineIterator.java:62)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.expressions.ExprBlocks.iterator(ExprBlocks.java:160)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.sections.SecLoop.walk(SecLoop.java:135)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:52)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.function.ScriptFunction.execute(ScriptFunction.java:86)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.function.Function.execute(Function.java:129)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:301)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.function.EffFunctionCall.execute(EffFunctionCall.java:52)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Effect.run(Effect.java:49)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:52)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:316)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:275)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:286)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:221)
[14:42:24] [Server thread/ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[14:42:24] [Server thread/ERROR]: #!#!     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[14:42:24] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:987)
[14:42:24] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_20_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64)
[14:42:24] [Server thread/ERROR]: #!#!     at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:265)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:324)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:308)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2354)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$21(PlayerConnection.java:2314)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59)
[14:42:24] [Server thread/ERROR]: #!#!     at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.server.TickTask.run(TickTask.java:18)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1338)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.server.MinecraftServer.bg(MinecraftServer.java:1315)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1308)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.server.MinecraftServer.p_(MinecraftServer.java:1286)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1174)
[14:42:24] [Server thread/ERROR]: #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317)
[14:42:24] [Server thread/ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:833)
[14:42:24] [Server thread/ERROR]: #!#! 
[14:42:24] [Server thread/ERROR]: #!#! Version Information:
[14:42:24] [Server thread/ERROR]: #!#!   Skript: (custom version)
[14:42:24] [Server thread/ERROR]: #!#!     Flavor: selfbuilt-unknown
[14:42:24] [Server thread/ERROR]: #!#!     Date: unknown
[14:42:24] [Server thread/ERROR]: #!#!   Bukkit: 1.20.1-R0.1-SNAPSHOT
[14:42:24] [Server thread/ERROR]: #!#!   Minecraft: 1.20.1
[14:42:24] [Server thread/ERROR]: #!#!   Java: 17.0.8.1 (OpenJDK 64-Bit Server VM 17.0.8.1+8-LTS)
[14:42:24] [Server thread/ERROR]: #!#!   OS: Linux amd64 5.10.0-24-amd64
[14:42:24] [Server thread/ERROR]: #!#! 
[14:42:24] [Server thread/ERROR]: #!#! Server platform: Paper
[14:42:24] [Server thread/ERROR]: #!#! 
[14:42:24] [Server thread/ERROR]: #!#! Current node: null
[14:42:24] [Server thread/ERROR]: #!#! Current item: loop blocks below {_location} (as org.bukkit.Location)
[14:42:24] [Server thread/ERROR]: #!#! Current trigger: function waterWalk (simple event) (5/5.sk, line 31)

Expected Behavior

To not throw an exception

Steps to Reproduce

Run the ExprBlocks effect with a location that has no world.

@TheLimeGlass TheLimeGlass changed the title GetWorldMinHeight no world in location throws exception getWorldMinHeight no world in location throws exception Mar 5, 2024
@AyhamAl-Ali AyhamAl-Ali added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Mar 6, 2024
@Moderocky Moderocky added the PR available Issues which have a yet-to-be merged PR resolving it label Apr 19, 2024
@Moderocky Moderocky added completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. labels Apr 26, 2024
@sovdeeth sovdeeth closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. PR available Issues which have a yet-to-be merged PR resolving it
Projects
None yet
Development

No branches or pull requests

4 participants