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

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

Closed
TheLimeGlass opened this issue Mar 5, 2024 · 1 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

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.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.

@AyhamAl-Ali
Copy link
Member

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. ⚡

@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 not planned Won't fix, can't repro, duplicate, stale May 2, 2024
@sovdeeth sovdeeth reopened this May 2, 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