Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
928bcc8d3a
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: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
61 Zeilen
1.7 KiB
Diff
61 Zeilen
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
Date: Fri, 12 Oct 2018 03:47:26 -0500
|
|
Subject: [PATCH] Add more Witch API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Witch.java b/src/main/java/org/bukkit/entity/Witch.java
|
|
index 6618f2129e108c0a6cd15f6d0e86426021b6ff0d..4badeafe2f20cb123ef95897c90d5e61251cc40f 100644
|
|
--- a/src/main/java/org/bukkit/entity/Witch.java
|
|
+++ b/src/main/java/org/bukkit/entity/Witch.java
|
|
@@ -2,6 +2,11 @@ package org.bukkit.entity;
|
|
|
|
import com.destroystokyo.paper.entity.RangedEntity;
|
|
|
|
+// Paper start
|
|
+import org.bukkit.inventory.ItemStack;
|
|
+import org.jetbrains.annotations.Nullable;
|
|
+// Paper end
|
|
+
|
|
/**
|
|
* Represents a Witch
|
|
*/
|
|
@@ -13,4 +18,37 @@ public interface Witch extends Raider, RangedEntity { // Paper
|
|
* @return whether the witch is drinking a potion
|
|
*/
|
|
boolean isDrinkingPotion();
|
|
+
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Get time remaining (in ticks) the Witch is drinking a potion
|
|
+ *
|
|
+ * @return Time remaining (in ticks)
|
|
+ */
|
|
+ int getPotionUseTimeLeft();
|
|
+
|
|
+ /**
|
|
+ * Set time remaining (in ticks) that the Witch is drinking a potion.
|
|
+ * <p>
|
|
+ * This only has an effect while the Witch is drinking a potion.
|
|
+ *
|
|
+ * @param ticks Time in ticks remaining
|
|
+ * @see #isDrinkingPotion
|
|
+ */
|
|
+ void setPotionUseTimeLeft(int ticks);
|
|
+
|
|
+ /**
|
|
+ * Get the potion the Witch is drinking
|
|
+ *
|
|
+ * @return The potion the witch is drinking
|
|
+ */
|
|
+ @Nullable ItemStack getDrinkingPotion();
|
|
+
|
|
+ /**
|
|
+ * Set the potion the Witch should drink
|
|
+ *
|
|
+ * @param potion Potion to drink
|
|
+ */
|
|
+ void setDrinkingPotion(@Nullable ItemStack potion);
|
|
+ // Paper end
|
|
}
|