aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api-unmapped/0197-Villager-Restocks-API.patch
blob: e2dcfc3144951894b367beb7af482a746267502e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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>