Update upstream #6
@ -8,10 +8,10 @@ to simulate damage done to an itemstack and all
|
|||||||
the logic associated with damaging them
|
the logic associated with damaging them
|
||||||
|
|
||||||
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 f5a4160afb75549dd56a237cf99ec733efef9b4c..285b4028eb45439c052d6a2e9001a8c0bfacd49a 100644
|
index f5a4160afb75549dd56a237cf99ec733efef9b4c..efcf093bc908a3a5711a06e579503100514f57aa 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
|
||||||
@@ -1082,5 +1082,48 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -1082,5 +1082,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
* @param directionZ The relative z position of the knockback source direction
|
* @param directionZ The relative z position of the knockback source direction
|
||||||
*/
|
*/
|
||||||
void knockback(double strength, double directionX, double directionZ);
|
void knockback(double strength, double directionX, double directionZ);
|
||||||
@ -38,21 +38,25 @@ index f5a4160afb75549dd56a237cf99ec733efef9b4c..285b4028eb45439c052d6a2e9001a8c0
|
|||||||
+ void broadcastSlotBreak(org.bukkit.inventory.@NotNull EquipmentSlot slot, @NotNull Collection<Player> players);
|
+ void broadcastSlotBreak(org.bukkit.inventory.@NotNull EquipmentSlot slot, @NotNull Collection<Player> players);
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Damages this itemstack by the specified amount. This
|
+ * Damages the itemstack in this slot by the specified amount.
|
||||||
+ * runs all logic associated with damaging an itemstack like
|
+ * <p>
|
||||||
+ * events and stat changes.
|
+ * This runs all logic associated with damaging an itemstack like
|
||||||
|
+ * gamemode and enchantment checks, events, stat changes, and advancement
|
||||||
|
+ * triggers.
|
||||||
+ *
|
+ *
|
||||||
+ * @param stack the itemstack to damage
|
+ * @param stack the itemstack to damage
|
||||||
+ * @param amount the amount of damage to do
|
+ * @param amount the amount of damage to do
|
||||||
+ * @return the damaged itemstack, or an empty stack if it broke. It may be the same instance as the stack passed it, but it may not.
|
+ * @return the damaged itemstack, or an empty stack if it broke. There are no
|
||||||
|
+ * guarantees the returned itemstack is the same instance
|
||||||
+ */
|
+ */
|
||||||
+ @NotNull ItemStack damageItemStack(@NotNull ItemStack stack, int amount);
|
+ @NotNull ItemStack damageItemStack(@NotNull ItemStack stack, int amount);
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Damages the itemstack in this slot by the specified amount.
|
+ * Damages the itemstack in this slot by the specified amount.
|
||||||
|
+ * <p>
|
||||||
+ * This runs all logic associated with damaging an itemstack like
|
+ * This runs all logic associated with damaging an itemstack like
|
||||||
+ * events, stat changes, and notifying clients to play
|
+ * gamemode and enchantment checks, events, stat changes, advancement
|
||||||
+ * break animations.
|
+ * triggers, and notifying clients to play break animations.
|
||||||
+ *
|
+ *
|
||||||
+ * @param slot the slot of the stack to damage
|
+ * @param slot the slot of the stack to damage
|
||||||
+ * @param amount the amount of damage to do
|
+ * @param amount the amount of damage to do
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Entity Body Yaw API
|
|||||||
|
|
||||||
|
|
||||||
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 6555397148b84dba7a87cae505544b65452f1742..1da1c293ac8a13d22743c26d35624155bfa73a16 100644
|
index df91f612978dcea83a99f8403820cea1ab462c06..d045f41d929c6101060caf3a9fb48c8ffc036f16 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
|
||||||
@@ -1125,5 +1125,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -1129,5 +1129,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
* @param amount the amount of damage to do
|
* @param amount the amount of damage to do
|
||||||
*/
|
*/
|
||||||
void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);
|
void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren