geforkt von Mirrors/Paper
Added suffocation damage as an event.
Dieser Commit ist enthalten in:
Ursprung
62344b57f2
Commit
62624a0799
@ -141,8 +141,18 @@ public abstract class EntityLiving extends Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (B() && C()) {
|
if (B() && C()) {
|
||||||
|
// CraftBukkit start
|
||||||
|
CraftServer server = ((WorldServer) l).getServer();
|
||||||
|
org.bukkit.entity.Entity victim = this.getBukkitEntity();
|
||||||
|
DamageCause damageType = EntityDamageEvent.DamageCause.SUFFOCATION;
|
||||||
|
EntityDamageEvent evt = new EntityDamageEvent(victim, damageType, 1);
|
||||||
|
server.getPluginManager().callEvent(evt);
|
||||||
|
|
||||||
|
if (!evt.isCancelled()){
|
||||||
a(((Entity) (null)), 1);
|
a(((Entity) (null)), 1);
|
||||||
}
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
}
|
||||||
if (ae || this.l.z) {
|
if (ae || this.l.z) {
|
||||||
Z = 0;
|
Z = 0;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren