aromaa / WorldGuardExtraFlags

Extension for the WorldGuard plugin.
https://www.spigotmc.org/resources/worldguard-extra-flags.4823
MIT License
88 stars 70 forks source link

teleport-on-entry does not work if someone teleports a player into a claim #259

Open TomLewis opened 11 months ago

TomLewis commented 11 months ago

I have setup teleport-on-entry as an attempt to prevent people outside the claim requesting TP into it to a player thats inside the claim. If they walk into the claim it does teleport them using teleport-on-entry, BUT if they are /tp in by a player its just ignored.

I also tried join-location

aromaa commented 11 months ago

Wouldn't denying entry work for that just fine?

Anyways, fixing this is a bit problematic due to the nature of the events happening. Basically all teleports are ignored while other teleport request is in flight and that would need to be cancelled in order for it to work but that blocks the processing of other flags. So the other route is add a delay before teleporting the player and that's not the most ideal thing..

TomLewis commented 11 months ago

No, I need the users able to use the region as its an event that I need to prevent them using Teleport to cheat it!

Could the teleport-on-entry not just do a check after the player has entered and see how they got in? even if they are in the region for 1 second before they are teleported or just straight up block it all together "You can not be teleported into this region" or something.

aromaa commented 11 months ago

No, I need the users able to use the region as its an event that I need to prevent them using Teleport to cheat it!

Right. Can't you just block the commands used to teleport in?

TomLewis commented 11 months ago

No, I need the users able to use the region as its an event that I need to prevent them using Teleport to cheat it!

Right. Can't you just block the commands used to teleport in?

You can block commands inside a region, but not outside! The rest of the server needs to still function outside events. So someone outside the region can still send a /tpa request to someone inside, and they can accept via clicking the request in chat (I use CMI Teleport)

aromaa commented 11 months ago

and they can accept via clicking the request in chat (I use CMI Teleport)

Those are commands under the hood