summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmmar Askar <ammar_askar@hotmail.com>2012-06-17 23:18:00 +0500
committerWesley Wolfe <weswolf@aol.com>2012-06-20 12:45:17 -0500
commit8bc42ba8c94ea7ceae81d0620434162333fde404 (patch)
tree31dffbd09751c06022230dac7d067cb8d9dddd26
parent0095add08c4ca77f8e236a464eadeae4620f577a (diff)
downloadcraftbukkit-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.java3
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() {