CHWorldguard Extension and teleportation
LadyCailinBot opened this issue ยท 15 comments
CMDHELPER-3084 - Reported by EarlyReflex
The CHWorldguard extension won't trigger the region_change event when teleporting into or out of a region. This is for all types of teleportations (tp, warp, home, enderpearl etc). Works fine with normal movement.
Spigot 1.8.7, WG6.1, CommandHelper 3.3.1, CHWorldguard1.0.1 build 17.
Comment by PseudoKnight
Technically you shouldn't post extension issues on the CommandHelper issue tracker. You should post those on their respective GitHub issue trackers. You're also more likely to get the author's attention that way.
This wouldn't be too hard to implement. It'd need a teleport event handler and then pass both events to a method that calculates the CH event.
Comment by EarlyReflex
Thank you for your feedback, but I can't find anything related to issues on this extension's GitHub page! :(
Comment by PseudoKnight
kookster must have turned the feature off. :( Guess I'll keep this open here then.
Comment by EarlyReflex
This combo (CH + CHWorldguard) is the ONLY way to have Worldguard trigger commands on region enter/leave. WG itself is not gonna have enter/leave command flags added anytime soon as it's been requested for over 2 years now. The plugins from Mewin that implement these flags break too many flags to be useable. We've been working on finding a solution to this problem for weeks now. I thought I was coming onto something when trying this here, until I realized it's also kinda broken. :( Who is it I must bribe to get it working? ;)
Comment by PseudoKnight
I'll take a look tonight, but I'd need kookster to accept the pull request if he still wants to be the maintainer.
Comment by EarlyReflex
That would be awesome! But is he still active? And who is kookster? I don't see his name anywhere in the project. I see jb-areo, yourself, zeoldcraft and lukecfairchild...
Comment by PseudoKnight
@kookster is lukefairchild.
Comment by PseudoKnight
Turning out more extensive than I had hoped. I need to listen to at least 4 events for comprehensive triggering. (I think I'll leave out player respawning, as you can handle that) The more I work at it, the more I want to change.
Comment by PseudoKnight
That's not quite what I mean. I've updated this extension twice before, but I didn't write it.
Comment by EarlyReflex
Oh yes I got that! I was just quoting Da Vinci, cause software is like art, and is never quite done. And even though you didn't write it, you did contribute to it.
Comment by jb_aero
It may work for all "move" cases if it used the same model as player_move, which doesn't use any Bukkit events.
Comment by PseudoKnight
That's a thought. That would be lighter, but it depends on the use-case if that would be a good direction to take. In theory you'd want the extension to just be another session handler in WorldGuard, but there's no way to register a new one as of the moment. I might talk to @wizjany about that.
I really want to change the event data to entered and exited regions too, rather than all previous and current regions. It would probably not break any existing scripts, but I can't be sure.
Comment by EarlyReflex
While it would still be awesome to have these implemented in the extension, there's no rush for me anymore. I managed to circumvent the issue using the player_teleport event combined with sk_regions_at() function from the SKCompat extension. There's always a plan B somewhere! Well, my workaround is actually plan C, B would be this extension, and A would be having region enter/leave command flags right in WG. But plan A having been requested for almost 2 years now, I gave up expecting it.
In any way, thanks a lot for your support! :)