/*
	This file is part of mcMMO.

    mcMMO is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    mcMMO is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with mcMMO.  If not, see <http://www.gnu.org/licenses/>.
*/
package com.gmail.nossr50.skills;

import org.bukkit.entity.AnimalTamer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Wolf;
import org.bukkit.plugin.Plugin;

public class Taming 
{
	public static boolean ownerOnline(Wolf theWolf, Plugin pluginx)
	{
		for(Player x : pluginx.getServer().getOnlinePlayers())
		{
			if(x instanceof AnimalTamer)
			{
				AnimalTamer tamer = (AnimalTamer)x;
				if(theWolf.getOwner() == tamer)
					return true;
			}
		}
		return false;
	}
	
	public static Player getOwner(Entity wolf, Plugin pluginx)
	{
		if(wolf instanceof Wolf)
		{
			Wolf theWolf = (Wolf)wolf;
			for(Player x : pluginx.getServer().getOnlinePlayers())
			{
				if(x instanceof AnimalTamer && x.isOnline())
				{
					AnimalTamer tamer = (AnimalTamer)x;
					if(theWolf.getOwner() == tamer)
						return x;
				}
			}
			return null;
		}
		return null;
	}
	
	public static String getOwnerName(Wolf theWolf)
	{
		Player owner = (Player)theWolf.getOwner();
		if(owner != null)
		{
			return owner.getName();
		}
		else
			return "Offline Master";
	}
}

@@ -713,16 +713,67 @@
 lls;%0D%0A%0D%0A
+import org.bukkit.craftbukkit.CraftOfflinePlayer;%0D%0A
 import o
@@ -1744,16 +1744,88 @@
  owner =
+ null;%0D%0A%09%09%0D%0A%09%09if (theWolf.getOwner() instanceof Player)%0D%0A%09%09%7B%0D%0A%09%09%09owner =
  (Player
@@ -1846,16 +1846,25 @@
 ner();%0D%0A
+%09%09%7D%0D%0A%09%09%0D%0A
 %09%09if(own

Fix for issue #212 from upstream repo