📅  最后修改于: 2022-03-11 14:52:12.732000             🧑  作者: Mango
@EventHandler
public void onEntitySpawn(EntitySpawnEvent event) {
if (event.getEntityType() == EntityType.CREEPER) {
if (event.getEntity() instanceof Damageable) {
Damageable creeper = (Damageable) event.getEntity();
creeper.damage(1000);
}
}
}