Skip to content

//line <block> without selection gives exception #3387

@Zoriot

Description

@Zoriot

Server Implementation

Paper

Server Version

1.21.10

Describe the bug

When you execute the line command, without a selection a verbose exception message is printed in the chat & log.

Logs:

[17:51:43] [Server thread/INFO]: 4004 issued server command: //line white
[17:51:43] [AsyncNotifyKeyedQueue - 88/ERROR]: An unexpected error while handling a FastAsyncWorldEdit command
java.lang.IllegalStateException: No injected value for region (type Key{type=com.sk89q.worldedit.regions.Region, annotationWrapper=TypeAnnotationWrapper{annotationType=interface com.sk89q.worldedit.internal.annotation.Selection}})
	at FastAsyncWorldEdit-Paper-2.14.1.jar/org.enginehub.piston.internal.RegistrationUtil.lambda$requireOptional$0(RegistrationUtil.java:37) ~[FastAsyncWorldEdit-Paper-2.14.1.jar:?]
	at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
	at FastAsyncWorldEdit-Paper-2.14.1.jar/org.enginehub.piston.internal.RegistrationUtil.requireOptional(RegistrationUtil.java:36) ~[FastAsyncWorldEdit-Paper-2.14.1.jar:?]
	at FastAsyncWorldEdit-Paper-2.14.1.jar/com.sk89q.worldedit.command.RegionCommandsRegistration.extract$region(RegionCommandsRegistration.java:1054) ~[FastAsyncWorldEdit-Paper-2.14.1.jar:?]
	at FastAsyncWorldEdit-Paper-2.14.1.jar/com.sk89q.worldedit.command.RegionCommandsRegistration.cmd$_line(RegionCommandsRegistration.java:737) ~[FastAsyncWorldEdit-Paper-2.14.1.jar:?]

To Reproduce

  1. Join Server
  2. Execute //line white
  3. Watch the wrong message

Expected behaviour

With WorldEdit you get a nice error message (Make a region selection first.) and no exception.
I expected that also and no exception in my server logs.

Screenshots / Videos

No response

Error log (if applicable)

https://mclo.gs/YwB2lpI

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/d84641e43f0f44df9a0355a8b89c7bee

Fawe Version

FastAsyncWorldEdit version 2.14.1+9f3663b (+ 2.14.2)

Checklist

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Requires TestingThis is a new issue which needs to be approved before labeled with "bug"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions