From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: zbk Date: Sun, 26 Apr 2020 23:49:01 -0400 Subject: [PATCH] Villager Restocks API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java index e22453a79371266c3dad450e6c82cb24babcece8..fe3a73e9cdb85fdf8385f0a0d096a991541cbf60 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java @@ -83,6 +83,18 @@ public class CraftVillager extends CraftAbstractVillager implements Villager { this.getHandle().setVillagerXp(experience); } + // Paper start + @Override + public int getRestocksToday() { + return getHandle().numberOfRestocksToday; + } + + @Override + public void setRestocksToday(int restocksToday) { + getHandle().numberOfRestocksToday = restocksToday; + } + // Paper end + @Override public boolean sleep(Location location) { Preconditions.checkArgument(location != null, "Location cannot be null");