return value of "com.fastasyncworldedit.core.command.tool.brush.InspectBrush.getTarget(com.sk89q.worldedit.entity.Player, boolean)" is null
SecretlyJealous opened this issue ยท 2 comments
Server Implementation
Paper
Server Version
1.20.1
Describe the bug
Last few commands used were:
//drain 50
//drain 50
//drain 50
//drain 50
//set quartz_block
/up 300
Error:
[18:08:21 WARN]: java.lang.NullPointerException: Cannot invoke "com.sk89q.worldedit.math.Vector3.toBlockPoint()" because the return value of "com.fastasyncworldedit.core.command.tool.brush.InspectBrush.getTarget(com.sk89q.worldedit.entity.Player, boolean)" is null
[18:08:21 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.fastasyncworldedit.core.command.tool.brush.InspectBrush.perform(InspectBrush.java:77)
[18:08:21 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.fastasyncworldedit.core.command.tool.brush.InspectBrush.actSecondary(InspectBrush.java:46)
[18:08:21 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.sk89q.worldedit.extension.platform.PlatformManager.lambda$handlePlayerInput$5(PlatformManager.java:485)
[18:08:21 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.sk89q.worldedit.extension.platform.AbstractPlayerActor.lambda$runAction$1(AbstractPlayerActor.java:672)
[18:08:21 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$run$0(AsyncNotifyKeyedQueue.java:48)
[18:08:21 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$call$1(AsyncNotifyKeyedQueue.java:58)
[18:08:21 WARN]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[18:08:21 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.fastasyncworldedit.core.util.task.KeyQueuedExecutorService$KeyRunner.lambda$run$0(KeyQueuedExecutorService.java:150)
[18:08:21 WARN]: at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
[18:08:21 WARN]: at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[18:08:21 WARN]: at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1311)
[18:08:21 WARN]: at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1841)
[18:08:21 WARN]: at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1806)
[18:08:21 WARN]: at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
[18:08:22 INFO]: LastTrain_Home lost connection: Disconnected
[18:08:24 WARN]: java.lang.NullPointerException: Cannot invoke "com.sk89q.worldedit.math.Vector3.toBlockPoint()" because the return value of "com.fastasyncworldedit.core.command.tool.brush.InspectBrush.getTarget(com.sk89q.worldedit.entity.Player, boolean)" is null
[18:08:24 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.fastasyncworldedit.core.command.tool.brush.InspectBrush.perform(InspectBrush.java:77)
[18:08:24 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.fastasyncworldedit.core.command.tool.brush.InspectBrush.actSecondary(InspectBrush.java:46)
[18:08:24 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.sk89q.worldedit.extension.platform.PlatformManager.lambda$handlePlayerInput$5(PlatformManager.java:485)
[18:08:24 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.sk89q.worldedit.extension.platform.AbstractPlayerActor.lambda$runAction$1(AbstractPlayerActor.java:672)
[18:08:24 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$run$0(AsyncNotifyKeyedQueue.java:48)
[18:08:24 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$call$1(AsyncNotifyKeyedQueue.java:58)
[18:08:24 WARN]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[18:08:24 WARN]: at FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-557.jar//com.fastasyncworldedit.core.util.task.KeyQueuedExecutorService$KeyRunner.lambda$run$0(KeyQueuedExecutorService.java:150)
[18:08:24 WARN]: at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
[18:08:24 WARN]: at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[18:08:24 WARN]: at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1311)
[18:08:24 WARN]: at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1841)
[18:08:24 WARN]: at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1806)
[18:08:24 WARN]: at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
To Reproduce
- Not sure
Expected behaviour
No error
Screenshots / Videos
No response
Error log (if applicable)
No response
Fawe Debugpaste
https://athion.net/ISPaster/paste/view/c545d2df72584611bbbdfaaecad0306a
Fawe Version
FastAsyncWorldEdit-557
Checklist
- I have included a Fawe debugpaste.
- I am using the newest build from https://ci.athion.net/job/FastAsyncWorldEdit/ and the issue still persists.
Anything else?
No response
This is happening because InspectBrush.java getTarget() returns null when you aren't targetting a block and use the secondary function (left click).
You can reproduce what the OP is seeing by:
/br inspect
- Look straight up at the sky
- Left click
Could probably resolve by adding a null check after
BlockVector3 target = getTarget(player, rightClick).toBlockPoint();
InspectBrush.java @ line 77