Make AreaEffectCloudApplyEvent cancellable
Dieser Commit ist enthalten in:
Ursprung
c7ba97906c
Commit
2b1940ae24
@ -52,7 +52,7 @@
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ org.bukkit.event.entity.AreaEffectCloudApplyEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callAreaEffectCloudApplyEvent(this, entities);
|
+ org.bukkit.event.entity.AreaEffectCloudApplyEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callAreaEffectCloudApplyEvent(this, entities);
|
||||||
+ if (true) { // Preserve NMS spacing and bracket count for smallest diff
|
+ if (!event.isCancelled()) {
|
||||||
+ for (LivingEntity entity : event.getAffectedEntities()) {
|
+ for (LivingEntity entity : event.getAffectedEntities()) {
|
||||||
+ if (entity instanceof CraftLivingEntity) {
|
+ if (entity instanceof CraftLivingEntity) {
|
||||||
+ EntityLiving entityliving = ((CraftLivingEntity) entity).getHandle();
|
+ EntityLiving entityliving = ((CraftLivingEntity) entity).getHandle();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren