Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277)

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

Bukkit Changes:
9a80d38c SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-722: Add EntityRemoveEvent
258086d9 SPIGOT-7417, PR-967: Add Sign#getTargetSide and Sign#getAllowedEditor
ffaba051 SPIGOT-7584: Add missing Tag.ITEMS_NON_FLAMMABLE_WOOD

CraftBukkit Changes:
98b6c1ac7 SPIGOT-7589 Fix NullPointerException when bans expire
a2736ddb0 SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-1008: Add EntityRemoveEvent
5bf12cb89 SPIGOT-7565: Throw a more descriptive error message when a developer tries to spawn an entity from a CraftBukkit class
76d95fe7e SPIGOT-7417, PR-1343: Add Sign#getTargetSide and Sign#getAllowedEditor

Spigot Changes:
e9ec5485 Rebuild patches
f1b62e0c Rebuild patches
This commit is contained in:
Nassim Jahnke
2024-02-23 14:37:33 +01:00
parent e33fdd8189
commit 1863ac217f
40 changed files with 150 additions and 91 deletions

View File

@@ -10,9 +10,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/org/bukkit/block/Sign.java
@@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable {
*/
@NotNull
public SignSide getSide(@NotNull Side side);
+
@Nullable
public Player getAllowedEditor();
+ // Paper start - get side for player
+ /**
+ * Compute the side facing the specified entity.

View File

@@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Sun, 3 Jan 2021 20:03:40 -0800
Subject: [PATCH] Added missing vanilla tags
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Tag.java
+++ b/src/main/java/org/bukkit/Tag.java
@@ -0,0 +0,0 @@ public interface Tag<T extends Keyed> extends Keyed {
* Vanilla item tag representing all chest boat items.
*/
Tag<Material> ITEMS_CHEST_BOATS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("chest_boats"), Material.class);
+ // Paper start
+ /**
+ * Vanilla item tag representing all non-flammable wood items.
+ */
+ Tag<Material> ITEMS_NON_FLAMMABLE_WOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("non_flammable_wood"), Material.class);
+ // Paper end
/**
* Vanilla item tag representing all fish items.
*/

View File

@@ -1598,7 +1598,7 @@ diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/block/Sign.java
+++ b/src/main/java/org/bukkit/block/Sign.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
* Represents a captured state of either a SignPost or a WallSign.
*/
public interface Sign extends TileState, Colorable {

View File

@@ -104,3 +104,32 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return HANDLER_LIST;
+ }
+}
diff --git a/src/main/java/org/bukkit/event/entity/EntityRemoveEvent.java b/src/main/java/org/bukkit/event/entity/EntityRemoveEvent.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/event/entity/EntityRemoveEvent.java
+++ b/src/main/java/org/bukkit/event/entity/EntityRemoveEvent.java
@@ -0,0 +0,0 @@
package org.bukkit.event.entity;
+import com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent;
import org.bukkit.entity.Entity;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.ApiStatus;
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
* This event should only be used for monitoring. The result
* of modifying the entity during or after this event is unspecified.
* This event is not called for a {@link org.bukkit.entity.Player}.
+ * @deprecated use {@link EntityRemoveFromWorldEvent} instead
*/
-@ApiStatus.Experimental
+@Deprecated(forRemoval = true)
public class EntityRemoveEvent extends EntityEvent {
private static final HandlerList handlers = new HandlerList();
@@ -0,0 +0,0 @@ public class EntityRemoveEvent extends EntityEvent {
* When the chunk an entity is in gets unloaded.
*/
UNLOAD,
+ DISCARD
}
}