mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 05:55:44 +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
32 lines
1.1 KiB
Diff
32 lines
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 6bf3af3ed81b66f61e53105d3591165ea74dba0e..d8cf5e5921357ce9645f5dcb5a3bffcf3c10af7e 100644
|
|
--- a/src/main/java/org/bukkit/entity/Villager.java
|
|
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
|
@@ -78,6 +78,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>
|