Closed Wqrld closed 6 years ago
Should be already included. Just make sure you have worldguard installed for this:
[sharpsk] [worldguard] (point|pos[ition])[ ] 1 of region %string% in [world] %world% [sharpsk] [worldguard] (point|pos[ition])[ ] 2 of region %string% in [world] %world%
set {_json::mapdata::rednexuses:%loop-value-2%} to sharpsk worldguard point {_lv2} of region "%loop-value-1%rednexus%loop-value-2%" in world "%{_json::mapdata::world}%"
give {::mapdata::world}%" is not valid item data
?
broadcast "w: %{_json::mapdata::world}%"
works just fine
the number is harcoded in the syntax and therefore you can't use variables for it.
A workaround would be using skQuery's evaluate effect:
evaluate "set {_json::mapdata::rednexuses:%loop-value-2%} to sharpsk worldguard point %{_lv2}% of region ""%loop-value-1%rednexus%loop-value-2%"" in world ""%{_json::mapdata::world}%"""
or TuSKe's one:
evaluate: set {_json::mapdata::rednexuses:%loop-value-2%} to sharpsk worldguard point %{_lv2}% of region "%loop-value-1%rednexus%loop-value-2%" in world "%{_json::mapdata::world}%"
alternatively, you could just do an if-else check and execute the corresponding code depending on the value.
okay. Closing this issue as it was already a feature.
can you add
point 1/2 of wg region %string% in [world] %world%
piratesk has it but it's broken and you are generally the go-to for worldedit/worldguard stuff.