Multiverse-Portals icon indicating copy to clipboard operation
Multiverse-Portals copied to clipboard

Add Option to make OnMove Portals use Polling

Open dirkson opened this issue 13 years ago • 4 comments

This plugin currently registers for the "player_move" event, which I suspect is sort of wasteful on larger servers.

Could I request that you add an option to use a scheduled event instead, checking every X ticks if players are inside portals?

Please disregard if this would actually be slower - I just noticed this plugin soaking up an awful lot of time with player_move.

Cheers, -Dirk

dirkson avatar Dec 10 '11 02:12 dirkson

So you're right. If you set /mvp conf useonplayermove false whenever the event is received, we return, which since the event has to be fired and travel around to a bunch of other plugins regardless, this time is negligible.

I'd love to use a scheduler, but have a lot of other issues that are actually bugs (I kinda count this as a feature request) that I need to get done first.

We do <3 pull requests so if you'd like to write it up, we'd be more than glad to accept it.

For now I'll leave this open and we'll see what we can get resolved. --FF

fernferret avatar Dec 10 '11 02:12 fernferret

Gotcha. I'm no java coder (I'd rather pluck out my eyes with rusty sporks, I think) but we have a couple people on the server who are. We've got one more pressing problem, (Residences, stop registering for all the events in existence!) and then I'll see if I can't get someone assigned to whipping up this feature and generating a pull request for you.

And I agree, this is definitely a feature request, not a bug report.

Cheers! -Dirk

dirkson avatar Dec 10 '11 02:12 dirkson

I've got this working locally, there's just a few things left to do.

nicegamer7 avatar Oct 29 '20 04:10 nicegamer7

I just pushed the teleport_entities branch which includes polling. It is considered experimental as of now.

nicegamer7 avatar Mar 02 '21 02:03 nicegamer7