From 1a0f762c389f59e35fc3c0c52f23e8df277e747a Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 17 May 2019 14:08:43 +0200 Subject: [PATCH] SPIGOT-4943: Zombie villager conversion player API. By: blablubbabc --- .../org/bukkit/entity/ZombieVillager.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/ZombieVillager.java b/paper-api/src/main/java/org/bukkit/entity/ZombieVillager.java index f8ff3b6556..a8ec860ea6 100644 --- a/paper-api/src/main/java/org/bukkit/entity/ZombieVillager.java +++ b/paper-api/src/main/java/org/bukkit/entity/ZombieVillager.java @@ -1,5 +1,6 @@ package org.bukkit.entity; +import org.bukkit.OfflinePlayer; import org.jetbrains.annotations.Nullable; /** @@ -55,4 +56,22 @@ public interface ZombieVillager extends Zombie { */ @Override void setConversionTime(int time); + + /** + * Gets the player who initiated the conversion. + * + * @return the player, or null if the player is unknown or the + * entity isn't converting currently + */ + @Nullable + OfflinePlayer getConversionPlayer(); + + /** + * Sets the player who initiated the conversion. + *

+ * This has no effect if this entity isn't converting currently. + * + * @param conversionPlayer the player + */ + void setConversionPlayer(@Nullable OfflinePlayer conversionPlayer); }