Paper/Spigot-API-Patches/0164-Add-more-Witch-API.patch
Zach Brown c5ef31cb0d
Restore lost player cooldown APIs
Accidentally removed in 0976d52bbd
2019-03-24 13:16:59 -04:00

59 lines
1.5 KiB
Diff

From 21d9b029cdd5e1dd73ff4ece26a7341d82fa58fd 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 4b27f689..1828b2ce 100644
--- a/src/main/java/org/bukkit/entity/Witch.java
+++ b/src/main/java/org/bukkit/entity/Witch.java
@@ -2,8 +2,43 @@ 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
*/
-public interface Witch extends Monster, RangedEntity { // Paper
+// Paper start
+public interface Witch extends Monster, RangedEntity {
+ /**
+ * Check if Witch is drinking a potion
+ *
+ * @return True if drinking a potion
+ */
+ boolean isDrinkingPotion();
+
+ /**
+ * Get time remaining (in ticks) the Witch is drinking a potion
+ *
+ * @return Time remaining (in ticks)
+ */
+ int getPotionUseTimeLeft();
+
+ /**
+ * 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
}
--
2.17.1