Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Please note that this build includes changes to meet upstreams
requirements for nullability annotations. While we aim for a level of
accuracy, these might not be 100% correct, if there are any issues,
please speak to us on discord, or open an issue on the tracker to
discuss.

Bukkit Changes:
9a6a1de3 Remove nullability annotations from enum constructors
3f0591ea SPIGOT-2540: Add nullability annotations to entire Bukkit API

CraftBukkit Changes:
8d8475fc SPIGOT-4666: Force parameter in HumanEntity#sleep
8b1588e2 Fix ExplosionPrimeEvent#setFire not working with EnderCrystals
39a287b7 Don't ignore newlines in PlayerListHeader/Footer

Spigot Changes:
cf694d87 Add nullability annotations
This commit is contained in:
Shane Freeder 2019-03-20 00:28:15 +00:00
parent c3c889523f
commit 0976d52bbd
261 changed files with 3224 additions and 2923 deletions

View file

@ -1,4 +1,4 @@
From b9ed451873b6f1026308d423f636604f07fcf31c Mon Sep 17 00:00:00 2001
From fa357068acea340946c5984451c2889eb725c7ac Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 21:15:34 -0400
Subject: [PATCH] EntityPathfindEvent
@ -7,10 +7,10 @@ Fires when an Entity decides to start moving to a location.
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java
new file mode 100644
index 00000000..0e4902d9
index 000000000..63e46b2fb
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java
@@ -0,0 +1,74 @@
@@ -0,0 +1,82 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.Location;
@ -18,6 +18,8 @@ index 00000000..0e4902d9
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.EntityEvent;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Fired when an Entity decides to start moving towards a location.
@ -26,9 +28,10 @@ index 00000000..0e4902d9
+ * is choosing to start moving to a location.
+ */
+public class EntityPathfindEvent extends EntityEvent implements Cancellable {
+ private final Entity targetEntity;
+ private final Location loc;
+ public EntityPathfindEvent(Entity entity, Location loc, Entity targetEntity) {
+ @Nullable private final Entity targetEntity;
+ @NotNull private final Location loc;
+
+ public EntityPathfindEvent(@NotNull Entity entity, @NotNull Location loc, @Nullable Entity targetEntity) {
+ super(entity);
+ this.targetEntity = targetEntity;
+ this.loc = loc;
@ -38,6 +41,7 @@ index 00000000..0e4902d9
+ * The Entity that is pathfinding.
+ * @return The Entity that is pathfinding.
+ */
+ @NotNull
+ public Entity getEntity() {
+ return entity;
+ }
@ -49,6 +53,7 @@ index 00000000..0e4902d9
+ *
+ * @return The entity target or null
+ */
+ @Nullable
+ public Entity getTargetEntity() {
+ return targetEntity;
+ }
@ -59,16 +64,19 @@ index 00000000..0e4902d9
+ * Note that if the target happened to of been an entity
+ * @return Location of where the entity is trying to pathfind to.
+ */
+ @NotNull
+ public Location getLoc() {
+ return loc;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
@ -86,5 +94,5 @@ index 00000000..0e4902d9
+ }
+}
--
2.20.1
2.21.0