geforkt von Mirrors/Paper
Cleanup LivingEntity Hand Raised/Item Use API (#7995)
Dieser Commit ist enthalten in:
Ursprung
11ebcf8061
Commit
bd0ca3a1fc
@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -0,0 +0,0 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -0,0 +0,0 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
@Nullable
|
@NotNull
|
||||||
ItemStack getActiveItem();
|
org.bukkit.inventory.ItemStack getActiveItem();
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -5,18 +5,24 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
|
|||||||
|
|
||||||
How long an entity has raised hands to charge an attack or use an item
|
How long an entity has raised hands to charge an attack or use an item
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
|
@@ -0,0 +0,0 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
|
*
|
||||||
|
* @return the item being used by the player, or null if they are not using
|
||||||
|
* an item
|
||||||
|
+ * @deprecated Deprecated in favor of {@link LivingEntity#getActiveItem()}
|
||||||
|
*/
|
||||||
|
+ @Deprecated // Paper
|
||||||
|
@Nullable
|
||||||
|
public ItemStack getItemInUse();
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -0,0 +0,0 @@ import org.bukkit.attribute.Attributable;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.entity.memory.MemoryKey;
|
|
||||||
import org.bukkit.inventory.EntityEquipment;
|
|
||||||
+import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.potion.PotionEffect;
|
|
||||||
import org.bukkit.potion.PotionEffectType;
|
|
||||||
import org.bukkit.projectiles.ProjectileSource;
|
|
||||||
@@ -0,0 +0,0 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -0,0 +0,0 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
* @param delay Delay in ticks
|
* @param delay Delay in ticks
|
||||||
*/
|
*/
|
||||||
@ -24,10 +30,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Get's the item being actively "used" or consumed.
|
+ * Get's the item being actively "used" or consumed.
|
||||||
+ * @return The item. Will be null if no active item.
|
+ * @return The item
|
||||||
+ */
|
+ */
|
||||||
+ @Nullable
|
+ @NotNull
|
||||||
+ ItemStack getActiveItem();
|
+ org.bukkit.inventory.ItemStack getActiveItem();
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Get's remaining time a player needs to keep hands raised with an item to finish using it.
|
+ * Get's remaining time a player needs to keep hands raised with an item to finish using it.
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren