Flag value doesn't accept string literals or escape sequences
Opened this issue ยท 0 comments
Versions
WorldEdit version:
WorldEdit version 7.2.5
https://github.com/EngineHub/WorldEdit/
------------------ Platforms ------------------
- Bukkit-Official(7.2.5+57d5ac9)
---------------- Capabilities ----------------
GAME_HOOKS: Bukkit-Official
CONFIGURATION: Bukkit-Official
USER_COMMANDS: Bukkit-Official
PERMISSIONS: Bukkit-Official
WORLDEDIT_CUI: Bukkit-Official
WORLD_EDITING: Bukkit-Official
WorldGuard version:
WorldGuard 7.0.4
http://www.enginehub.org
----------- Platforms -----------
- Bukkit-Official (7.0.4+f7ff984)
Platform version:
This server is running Paper version git-Paper-744 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
Describe the bug
Worldguard doesn't allow for escape sequences or string literals (quotes) in the flag value argument(s). One of the consequences is that you can't set a region with the greeting "foo -w bar" or something similar.
To Reproduce
- /rg define dummy
- /rg flag -w world dummy greeting The -w option can't be used here, because flag values don't parse properly!
Expected behavior
Expected the commands to succeed. Instead, it says "Value flag 'w' already given" on the second command.
Additional context
The solution to this issue might be to build a check if the arg length is equal to 3, to then get the arg value from the CommandContext through the parsed arguments.
https://github.com/EngineHub/WorldGuard/blob/master/worldguard-core/src/main/java/com/sk89q/worldguard/commands/region/RegionCommands.java#L500