Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 02:50:09 +01:00
Fix upstream nullability on entity equipment getters (#6519)
Dieser Commit ist enthalten in:
Ursprung
aad7d376a8
Commit
6084ac368f
@ -31,6 +31,50 @@ index 1d13a4c289e6a764b3b080455a86e17a5e60929e..294b6092b438ad3d09bf3ad28d08ffdf
|
||||
*
|
||||
* @return an array containing all previous players
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
index 91fc11dda99de506be83d40df8929bf7cd8e8d85..7dc631ebd009f5f5c3ac1699c3f3515c47609c05 100644
|
||||
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
@@ -360,5 +360,8 @@ public interface ArmorStand extends LivingEntity {
|
||||
* @param move {@code true} if this armour stand can move, {@code false} otherwise
|
||||
*/
|
||||
void setCanMove(boolean move);
|
||||
+
|
||||
+ @Override
|
||||
+ org.bukkit.inventory.@NotNull EntityEquipment getEquipment();
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index db4ba67618d29f72d695c66c27d771795565a1d0..0ab94ddd3b88eee8040233a89823bd2fadc78d55 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -21,6 +21,11 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder {
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ org.bukkit.inventory.@NotNull EntityEquipment getEquipment();
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Returns the name of this player
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index be9334a8b5fba9181ad63c211697e798be63da25..0514a141cb93a650be38c63d4336d46e4304f4b6 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -8,6 +8,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface Mob extends LivingEntity, Lootable {
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ org.bukkit.inventory.@org.jetbrains.annotations.NotNull EntityEquipment getEquipment();
|
||||
+ // Paper end
|
||||
/**
|
||||
* Instructs this Mob to set the specified LivingEntity as its target.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 9d5c5b5f7d7ae4f0278410833d9d385242872498..2301a5c6ada86b63b1c0207a6d89b0da4c167bbb 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index db4ba67618d29f72d695c66c27d771795565a1d0..f748e3d3836df4da76fa883a51b9582bc31a4f8c 100644
|
||||
index 0ab94ddd3b88eee8040233a89823bd2fadc78d55..396092fd249928ca01133eeeeb61f0ad90b2e332 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -310,6 +310,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -315,6 +315,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public int getExpToLevel();
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add method to open already placed sign
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index f748e3d3836df4da76fa883a51b9582bc31a4f8c..a46cefbb0508c192fdfefd685c7ad3973bb9c0c9 100644
|
||||
index 396092fd249928ca01133eeeeb61f0ad90b2e332..5cc025b69c4f405be8f7098d0dcef40fa522b39f 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -471,6 +471,14 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -476,6 +476,14 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
@Deprecated
|
||||
public void setShoulderEntityRight(@Nullable Entity entity);
|
||||
|
@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
||||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index a46cefbb0508c192fdfefd685c7ad3973bb9c0c9..66f11e9670770e05a164922cc0f2aa863c066203 100644
|
||||
index 5cc025b69c4f405be8f7098d0dcef40fa522b39f..1d573d33304e9c15a9949af68dab0626ae04dce4 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -153,6 +153,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -158,6 +158,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public void closeInventory();
|
||||
|
||||
|
@ -5,13 +5,13 @@ Subject: [PATCH] Allow disabling armour stand ticking
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
index 91fc11dda99de506be83d40df8929bf7cd8e8d85..bf7ded92ed2d39f57bc828a6290a8e9e7afe3a0c 100644
|
||||
index 7dc631ebd009f5f5c3ac1699c3f3515c47609c05..2ee3814a52945f541e049b621b9552f8ae9e261d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
@@ -360,5 +360,21 @@ public interface ArmorStand extends LivingEntity {
|
||||
* @param move {@code true} if this armour stand can move, {@code false} otherwise
|
||||
*/
|
||||
void setCanMove(boolean move);
|
||||
@@ -363,5 +363,21 @@ public interface ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
org.bukkit.inventory.@NotNull EntityEquipment getEquipment();
|
||||
+
|
||||
+ /**
|
||||
+ * Tests if this armor stand can tick.
|
||||
|
@ -8,7 +8,7 @@ Add the following:
|
||||
- Enable/Disable slot interactions
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
index bf7ded92ed2d39f57bc828a6290a8e9e7afe3a0c..21c8ec6d8b795799b5b110be57ffd27fc8dcabe3 100644
|
||||
index 2ee3814a52945f541e049b621b9552f8ae9e261d..707639096657f995cc812c7b50108eeed48e8181 100644
|
||||
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
@@ -14,7 +14,7 @@ public interface ArmorStand extends LivingEntity {
|
||||
@ -29,7 +29,7 @@ index bf7ded92ed2d39f57bc828a6290a8e9e7afe3a0c..21c8ec6d8b795799b5b110be57ffd27f
|
||||
*/
|
||||
@Deprecated
|
||||
void setItemInHand(@Nullable ItemStack item);
|
||||
@@ -376,5 +376,71 @@ public interface ArmorStand extends LivingEntity {
|
||||
@@ -379,5 +379,71 @@ public interface ArmorStand extends LivingEntity {
|
||||
* @param tick {@code true} if this armour stand can tick, {@code false} otherwise
|
||||
*/
|
||||
void setCanTick(final boolean tick);
|
||||
|
@ -230,7 +230,7 @@ index 0000000000000000000000000000000000000000..e2a6f9c3881ff9d7373ac30e60009200
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index be9334a8b5fba9181ad63c211697e798be63da25..b132287817d35579ca5128a1ed5c242bf229771a 100644
|
||||
index 0514a141cb93a650be38c63d4336d46e4304f4b6..cc30b4e22ee238de13f031398fc566f4123694ff 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -241,19 +241,17 @@ index be9334a8b5fba9181ad63c211697e798be63da25..b132287817d35579ca5128a1ed5c242b
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
@@ -8,6 +9,15 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface Mob extends LivingEntity, Lootable {
|
||||
|
||||
+ // Paper start
|
||||
@@ -11,6 +12,13 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
// Paper start
|
||||
@Override
|
||||
org.bukkit.inventory.@org.jetbrains.annotations.NotNull EntityEquipment getEquipment();
|
||||
+
|
||||
+ /**
|
||||
+ * Enables access to control the pathing of an Entity
|
||||
+ * @return Pathfinding Manager for this entity
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ com.destroystokyo.paper.entity.Pathfinder getPathfinder();
|
||||
+ // Paper end
|
||||
+
|
||||
// Paper end
|
||||
/**
|
||||
* Instructs this Mob to set the specified LivingEntity as its target.
|
||||
* <p>
|
||||
|
@ -26,10 +26,10 @@ index 2a371a93c99cb034df897fa82d816ee852a2c4e7..f2dc2c9138c3e2e3431837cb24307be8
|
||||
* Gets the full in-game time on this world since the world generation
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index b132287817d35579ca5128a1ed5c242bf229771a..d726453c041a980576312b6bee96a07837f37974 100644
|
||||
index cc30b4e22ee238de13f031398fc566f4123694ff..55c5227a340e34621160afc9fae3ea843492881d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -16,6 +16,13 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
@@ -19,6 +19,13 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
*/
|
||||
@NotNull
|
||||
com.destroystokyo.paper.entity.Pathfinder getPathfinder();
|
||||
@ -41,5 +41,5 @@ index b132287817d35579ca5128a1ed5c242bf229771a..d726453c041a980576312b6bee96a078
|
||||
+ */
|
||||
+ boolean isInDaylight();
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Instructs this Mob to set the specified LivingEntity as its target.
|
||||
|
@ -8,10 +8,10 @@ Adds a new method to fetch the location of a player's bed without generating any
|
||||
getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 66f11e9670770e05a164922cc0f2aa863c066203..c307a58b17324d6df8c21fa45f0f1e34810f1828 100644
|
||||
index 1d573d33304e9c15a9949af68dab0626ae04dce4..9cb7a9b1e1d7c20760a54bdf6aea346828ad8fc7 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -240,6 +240,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -245,6 +245,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public int getSleepTicks();
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add additional open container api to HumanEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index c307a58b17324d6df8c21fa45f0f1e34810f1828..112c891e54e8f30ac10e6865efc2a8ee8d172188 100644
|
||||
index 9cb7a9b1e1d7c20760a54bdf6aea346828ad8fc7..aae6331de24c1a65e3f708cfdc3890364bc8e681 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -148,6 +148,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -153,6 +153,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@Nullable
|
||||
public InventoryView openMerchant(@NotNull Merchant merchant, boolean force);
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 112c891e54e8f30ac10e6865efc2a8ee8d172188..0ad7a3d4d40d58eb950e34668f9554bb73f934fb 100644
|
||||
index aae6331de24c1a65e3f708cfdc3890364bc8e681..28d1ff809e44bda0324ffac957c1d455be02e783 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -319,6 +319,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -324,6 +324,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public void setCooldown(@NotNull Material material, int ticks);
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Mob#lookAt API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index d726453c041a980576312b6bee96a07837f37974..7d4ce660adb21e579e564796568945ee20f0ca59 100644
|
||||
index 55c5227a340e34621160afc9fae3ea843492881d..07bedbc15ba2463d3c629ae68d229286d4033f79 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -23,6 +23,88 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
@@ -26,6 +26,88 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
* @return True if mob is exposed to daylight
|
||||
*/
|
||||
boolean isInDaylight();
|
||||
@ -95,5 +95,5 @@ index d726453c041a980576312b6bee96a07837f37974..7d4ce660adb21e579e564796568945ee
|
||||
+ */
|
||||
+ int getMaxHeadPitch();
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Instructs this Mob to set the specified LivingEntity as its target.
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren