Skript

Skript

743k Downloads

Another exception thrown when no world is present in the location for ExprBlocks

TheLimeGlass opened this issue · 1 comments

commented

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.getBlockAt(int, int, int)" because "this.this$0.world" is null
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.util.AABB$1.next(AABB.java:143)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.util.AABB$1.next(AABB.java:111)
[14:42:24] [Server thread/ERROR]: #!#!     at com.google.common.collect.Iterators.addAll(Iterators.java:367)
[14:42:24] [Server thread/ERROR]: #!#!     at com.google.common.collect.Lists.newArrayList(Lists.java:146)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.expressions.ExprBlocks.get(ExprBlocks.java:126)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.expressions.ExprBlocks.get(ExprBlocks.java:48)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:94)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.expressions.ExprShuffledList.get(ExprShuffledList.java:71)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:94)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.util.SimpleExpression.iterator(SimpleExpression.java:330)
[14:42:24] [Server thread/ERROR]: #!#!     at Skript.jar//ch.njol.skript.expressions.ExprFilter.iterator(ExprFilter.java:96)
[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.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 shuffled blocks within {5::pos1} (as org.bukkit.Location) and {5::pos2} (as org.bukkit.Location) where [block input is air]
[14:42:24] [Server thread/ERROR]: #!#! Current trigger: command /5 (simple event) (5/5.sk, line 52)

Expected Behavior

To not throw an exception

Steps to Reproduce

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

commented

Thank you for the reports Lime.

I think they all can be merged into one issue since they are all the same fix but no problem let's keep these as is for now. If there are any other related issues to null worlds please merge them all together or just fix them all together if you are willing to fix them. ⚡