Update upstream B/CB - hitEntity added upstream

This commit is contained in:
Zach Brown 2016-11-28 17:16:07 -06:00
parent 422dd712f9
commit ed6bd4ea4a
No known key found for this signature in database
GPG key ID: CC9DA35FC5450B76
18 changed files with 22 additions and 165 deletions

View file

@ -1,4 +1,4 @@
From 582c0de7289fb70e00150ae60d41ec6b7730d1c9 Mon Sep 17 00:00:00 2001
From 4d20b34e3e83e6ed7d517b88c05bc77558641412 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 26 Oct 2016 15:49:28 -0500
Subject: [PATCH] Add debug logging to Timings enable setter
@ -21,5 +21,5 @@ index 4e5cf35..bef7cf7 100644
/**
--
2.10.0.windows.1
2.10.2

View file

@ -1,64 +0,0 @@
From 820409d462306180ec3d416d93a8dba43bb3874f Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Wed, 21 Sep 2016 20:40:21 -0700
Subject: [PATCH] Add hit entity to ProjectileHitEvent
diff --git a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
index 25ae832..250bddf 100644
--- a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
+++ b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
@@ -1,23 +1,50 @@
package org.bukkit.event.entity;
+import org.bukkit.entity.Entity; // Paper
import org.bukkit.entity.Projectile;
import org.bukkit.event.HandlerList;
+import javax.annotation.Nullable;
+
/**
* Called when a projectile hits an object
*/
public class ProjectileHitEvent extends EntityEvent {
private static final HandlerList handlers = new HandlerList();
+ // Paper start
+ @Nullable
+ private final Entity hitEntity;
public ProjectileHitEvent(final Projectile projectile) {
+ this(projectile, null);
+ }
+
+ public ProjectileHitEvent(final Projectile projectile, @Nullable final Entity hitEntity) {
super(projectile);
+ this.hitEntity = hitEntity;
}
+ // Paper end
@Override
public Projectile getEntity() {
return (Projectile) entity;
}
+ // Paper start
+ /**
+ * Gets the entity that was hit by the projectile.
+ *
+ * This may be null, depending on if the projectile
+ * actually hit an entity.
+ *
+ * @return The entity that was hit, or null otherwise
+ */
+ @Nullable
+ public Entity getHitEntity() {
+ return hitEntity;
+ }
+ // Paper end
+
@Override
public HandlerList getHandlers() {
return handlers;
--
2.10.0

View file

@ -1,4 +1,4 @@
From 4814501c98ba55fe2634f0cabfc8615938866c3b Mon Sep 17 00:00:00 2001
From 7a5e519b5a40b6210703aded7140542fbfbe9a9d Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:34 -0700
Subject: [PATCH] Add EntityZapEvent

View file

@ -1,4 +1,4 @@
From 37bc40ae29d91e8f1f7ffc1ad83b6f3987c16515 Mon Sep 17 00:00:00 2001
From 6e4c05b271039c42a798abb3db3d414d50b0111f Mon Sep 17 00:00:00 2001
From: vemacs <d@nkmem.es>
Date: Wed, 23 Nov 2016 12:53:43 -0500
Subject: [PATCH] Misc Utils
@ -42,5 +42,5 @@ index 0000000..d60ecbb
+ }
+}
--
2.8.3.windows.1
2.10.2