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

Fix the 'Illegal Entity Teleport' issue #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PoQuatre
Copy link
Contributor

From my understanding, the issue was caused by the fact that the entity was being teleported in the EntityPortalEnterEvent, and then when EntityPortalEvent is called, the entity is in the middle of a teleportation, which the game may not like, or something like that.
So to fix that I found a way to prevent the default EntityPortalEvent from being called by setting the entity's portal cooldown, and to make it so the event may still be used, I called another EntityPortalEvent.
With that in place, if someone wants to cancel a teleportation or change the destination, it can now be easily done.

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

Successfully merging this pull request may close these issues.

1 participant