Archiviert
13
0

Force potion effect application in BeaconEffectEvent

Dieser Commit ist enthalten in:
Zach Brown 2016-03-18 20:45:22 -05:00
Ursprung c51bf9d9f3
Commit 52f462d52d

Datei anzeigen

@ -1,11 +1,11 @@
From 7d6d6ae6378901555401aa1b5c8667fe447733e7 Mon Sep 17 00:00:00 2001
From 9d6d73c8bd8d97bdce92acec5e0da22a0755a336 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 23:30:53 -0600
Subject: [PATCH] Add BeaconEffectEvent
diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java
index ed5b374..f490dca 100644
index ed5b374..048f5bb 100644
--- a/src/main/java/net/minecraft/server/TileEntityBeacon.java
+++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java
@@ -13,6 +13,15 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@ -40,7 +40,7 @@ index ed5b374..f490dca 100644
+ BeaconEffectEvent event = new BeaconEffectEvent(block, primaryEffect, (Player) entityhuman.getBukkitEntity(), true);
+ if (CraftEventFactory.callEvent(event).isCancelled()) continue;
+ PotionEffect effect = event.getEffect();
+ entityhuman.getBukkitEntity().addPotionEffect(effect);
+ entityhuman.getBukkitEntity().addPotionEffect(effect, true);
+ // Paper end
}
@ -61,5 +61,5 @@ index ed5b374..f490dca 100644
}
}
--
2.7.2
2.7.3