mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-25 10:07:40 +01:00
Fix for issue #212 from upstream repo
This commit is contained in:
parent
58b302fd7e
commit
6970174503
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.gmail.nossr50.skills;
|
||||
|
||||
import org.bukkit.craftbukkit.CraftOfflinePlayer;
|
||||
import org.bukkit.entity.AnimalTamer;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -59,7 +60,13 @@ public class Taming
|
||||
|
||||
public static String getOwnerName(Wolf theWolf)
|
||||
{
|
||||
Player owner = (Player)theWolf.getOwner();
|
||||
Player owner = null;
|
||||
|
||||
if (theWolf.getOwner() instanceof Player)
|
||||
{
|
||||
owner = (Player)theWolf.getOwner();
|
||||
}
|
||||
|
||||
if(owner != null)
|
||||
{
|
||||
return owner.getName();
|
||||
|
Loading…
Reference in New Issue
Block a user