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

Players can move slappers #176

Closed
ManiakMCPE opened this issue Aug 31, 2018 · 6 comments
Closed

Players can move slappers #176

ManiakMCPE opened this issue Aug 31, 2018 · 6 comments

Comments

@ManiakMCPE
Copy link

Please make it so when players shoot a slapper with punch it won't move them. This is a very annoying bug.

@SoflyTtv
Copy link

and what the permissions

@SleepSpace9
Copy link
Contributor

I've just created a fix for this issue, but at the moment of creating the PR I thought it should be configurable by a setting whether the entity can be moved or not.
There are many possible ways, e.g. create an extra plugin that cancels EntityMotionEvents of Slappers. (would be simple for non-devs and doesn't need an extra config). And / or just create a new SlapperMotionEvent and let devs cancel this event if needed. What do you think?

@jojoe77777
Copy link
Owner

jojoe77777 commented Jan 25, 2019

Slappers should never be "moved", only teleported specifically
Processing motion should be easily overrideable (not a word?) in the entity classes (SlapperHuman, SlapperEntity)

also I haven't looked into this issue so I don't know if it's caused by 3rd party plugins?

@SleepSpace9
Copy link
Contributor

SleepSpace9 commented Jan 25, 2019

In my case Explosion::ExplodeB() (https://github.com/pmmp/PocketMine-MP/blob/3.5/src/pocketmine/level/Explosion.php#L199) moves Slappers, no matter if EntityDamageEvent is cancelled or not. The impact is calculated regardless of the event so $entity->setMotion() will always be triggered.
My concern is that, if we cancel EntityMotionEvent we won't have a possibility to use Entity::SetMotion() on slapper entities by another plugin (EDIT: without overriding setMotion() in an inherited Slapper class).

@jojoe77777
Copy link
Owner

Slappers are supposed to be stationary NPCs, if someone wants to do something else with them they can figure it out themselves

@SleepSpace9
Copy link
Contributor

Ok, then the fix should be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants