mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-30 20:39:10 +00:00
.7
This commit is contained in:
@@ -76,6 +76,15 @@ public class BukkitProjectileManager implements Listener, ProjectileManager {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||
public void onEntitiesLoad(EntitiesLoadEvent event) {
|
||||
for (Entity entity : event.getEntities()) {
|
||||
if (entity instanceof Projectile projectile) {
|
||||
handleProjectileLoad(projectile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH)
|
||||
public void onEntityRemove(EntityRemoveFromWorldEvent event) {
|
||||
this.projectiles.remove(event.getEntity().getEntityId());
|
||||
|
||||
Reference in New Issue
Block a user