diff options
author | Ammar Askar <ammar_askar@hotmail.com> | 2012-06-17 23:18:00 +0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2012-06-20 12:45:17 -0500 |
commit | 8bc42ba8c94ea7ceae81d0620434162333fde404 (patch) | |
tree | 31dffbd09751c06022230dac7d067cb8d9dddd26 | |
parent | 0095add08c4ca77f8e236a464eadeae4620f577a (diff) | |
download | craftbukkit-8bc42ba8c94ea7ceae81d0620434162333fde404.tar craftbukkit-8bc42ba8c94ea7ceae81d0620434162333fde404.tar.gz craftbukkit-8bc42ba8c94ea7ceae81d0620434162333fde404.tar.lz craftbukkit-8bc42ba8c94ea7ceae81d0620434162333fde404.tar.xz craftbukkit-8bc42ba8c94ea7ceae81d0620434162333fde404.zip |
Clear animal owner when untamed. Fixes BUKKIT-1482
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java index 04520be3..8fb8629b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java @@ -52,6 +52,9 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat public void setTamed(boolean tame) { getHandle().setTamed(tame); + if (!tame) { + setOwnerName(""); + } } public boolean isSitting() { |