Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
36f34f01c0
Upstream has released updates that appears 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: da9ef3c5 #496: Add methods to get/set ItemStacks in EquipmentSlots 3abebc9f #492: Let Tameable extend Animals rather than Entity 941111a0 #495: Expose ItemStack and hand used in PlayerShearEntityEvent 4fe19cae #494: InventoryView - Add missing Brewing FUEL_TIME CraftBukkit Changes:933e9094
#664: Add methods to get/set ItemStacks in EquipmentSlots18722312
#662: Expose ItemStack and hand used in PlayerShearEntityEvent
32 Zeilen
1.1 KiB
Diff
32 Zeilen
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: zbk <zbk@projectsolaris.net>
|
|
Date: Sun, 26 Apr 2020 23:49:03 -0400
|
|
Subject: [PATCH] Villager Restocks API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
|
index ef48ad9b28750ab7b33071f6b8e354e922731909..d1579153092c1b80350155110f1b9926b1a1ef57 100644
|
|
--- a/src/main/java/org/bukkit/entity/Villager.java
|
|
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
|
@@ -77,6 +77,20 @@ public interface Villager extends AbstractVillager {
|
|
*/
|
|
public void setVillagerExperience(int experience);
|
|
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Gets the amount of times a villager has restocked their trades today
|
|
+ * @return The amount of trade restocks.
|
|
+ */
|
|
+ public int getRestocksToday();
|
|
+
|
|
+ /**
|
|
+ * Sets the amount of times a villager has restocked their trades today
|
|
+ * @param restocksToday new restock count
|
|
+ */
|
|
+ public void setRestocksToday(int restocksToday);
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Attempts to make this villager sleep at the given location.
|
|
* <br>
|