PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
10.04k stars 2.34k forks source link

CreatureSpawnEvent - Server crash #4616

Closed fof1092 closed 4 years ago

fof1092 commented 4 years ago

Using "addPassenger()" within the CreatureSpawnEvent leads to a server crash. With the latest Spigot version (git-Spigot-988b411-aa8206a (MC: 1.16.3)) I could not reproduce the error.

Link/paste of stack trace

latest.log crash-2020-10-04_12.38.30-server.txt

Plugin list:

Only my own plugin with which I noticed the bug.

Actions to reproduce (if known):

@EventHandler
public void onCreatureSpawnEvent(CreatureSpawnEvent e) {
    if (e.getEntity() instanceof Spider) {
        Entity creeper = e.getEntity().getWorld().spawnEntity(e.getEntity().getLocation(), EntityType.CREEPER);
        e.getEntity().addPassenger(creeper);
    }
}

Paper version:

This server is running Paper version git-Paper-214 (MC: 1.16.3) (Implementing API version 1.16.3-R0.1-SNAPSHOT)

mrfloris commented 4 years ago

Thank you @Proximyst