WorldEdit

WorldEdit

45M Downloads

Flag parsing terminator

KainGross opened this issue ยท 6 comments

commented

WorldEdit Version

Any

Platform Version

Spigot/Paper all versions, maybe others too

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

Flag parsing terminator "--" doesn't works because String#equals check is after flag pattern check. (Pattern is not allowed two minuses)
Problem is in CommandContext class. (https://github.com/EngineHub/WorldEdit/blob/master/worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/CommandContext.java)
Screen of bugged place in sources: https://prnt.sc/26sdnhn

Expected Behavior

Don't parse flags after --

Reproduction Steps

Use any command with terminator

Anything Else?

No response

commented

That part of the command lib isn't even used anymore and is deprecated for removal. Why is this an issue?

commented

this is documented in WG's tracker already. I agree that there's no use fixing it here, WG just needs to be migrated at some point.

commented

WorldGuard's last version using it, if i understand correctly.

commented

Yes, but realistically WG should be switched to use Piston rather than spending time fixing this bug, and also this doesn't explain why it is an issue in context. Is there some command you were trying that you were unable to execute because of this?

commented

Was an problem to use command with arg starts with minus, terminator would help with it.

commented

Fine, I have understand u. Then, I'm just close it.