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

runAtEntityLater method broken on Paper only #14

Open
PikaMug opened this issue Apr 5, 2024 · 2 comments
Open

runAtEntityLater method broken on Paper only #14

PikaMug opened this issue Apr 5, 2024 · 2 comments

Comments

@PikaMug
Copy link

PikaMug commented Apr 5, 2024

Thank you for adding c720ba1 it works great on Folia!

However, it seems to have broken on Paper, with or without a fallback parameter. FoliaLib 0.3.3 executes the consumer, whereas 0.3.4 simply does not. Furthermore, if a fallback runnable is specified, that gets triggered instead (tested with ProjectileLaunchEvent where the fallback is triggered immediately on launching a Fireball via Player#launchProjectile).

Edit: It appears the Projectile#isValid check returns false on Paper? Perhaps #isDead would be preferable?

Java 17 with Paper version git-Paper-370 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 1fa48d1)

@Browsit
Copy link

Browsit commented Apr 11, 2024

We get a repeating StackOverflowError when spawning a custom mob which may be caused by this (did not occur on 0.3.3):

[17:35:53 ERROR]: Could not pass event MythicMobSpawnEvent to TestPlugin v1.0
java.lang.StackOverflowError: null
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.isValid(CraftEntity.java:389) ~[paper-1.20.4.jar:git-Paper-477]
        at org.browsit.testplugin.libs.folialib.impl.SpigotImplementation.runAtEntityLater(SpigotImplementation.java:236) ~[TestPlugin-1.0-SNAPSHOT.jar:?]

@TechnicallyCoded
Copy link
Owner

I'm currently away for vacation, sorry for the slow replies. I'll do my best to address this asap. If anyone wants to PR a fix in the meantime, feel free :)

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

3 participants