Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EvtMove - new player/entity move event #3969

Merged
merged 8 commits into from
May 9, 2021
Merged

EvtMove - new player/entity move event #3969

merged 8 commits into from
May 9, 2021

Conversation

ShaneBeee
Copy link
Contributor

@ShaneBeee ShaneBeee commented May 9, 2021

Description

This PR introduces the Player move event, along with an entity move event.
In the past it has been discussed to not use these events as they are performance heavy.
Here are a couple reasons I decided to add this:

  1. Skript already uses the move event for the "move on" event. So regardless, the performance is going to be hindered by that event.

  2. Paper (and I think Spigot too) only calls heavy events like this, if a plugin actually registers an event.
    Skript only registers a listener if a user is using said event. That said, performance will only potentially take a hit to users who use this event. I added cautionary notes in the description of the event to make sure users are clear. This is up to them if they want to use the event or not.

I don't think its in our position to deny users an event strictly because we think it may hurt their server, we should leave that decision in their hands. SkQuery already has this event, which is used by many people. I figured its probably in our best interest to add it.


Target Minecraft Versions: Paper 1.16.5+ for entity move, any for player move
Requirements: Paper 1.16.5+ for entity move, any for player move
Related Issues: #716 (added by pickle man)

@ShaneBeee ShaneBeee added enhancement Feature request, an issue about something that could be improved, or a PR improving something. 2.6 labels May 9, 2021
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor things & some thoughts

src/main/java/ch/njol/skript/events/EvtMove.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/events/EvtMove.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/events/EvtMove.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/events/EvtMove.java Outdated Show resolved Hide resolved
@FranKusmiruk FranKusmiruk merged commit e211d2e into SkriptLang:master May 9, 2021
@ShaneBeee ShaneBeee deleted the feature/move-event branch May 9, 2021 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants