1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-18 17:53:00 +01:00

Updates to Taming

This commit is contained in:
GJ
2012-03-02 13:55:23 -05:00
parent 5a8b9fc344
commit f9b9dddbc8
4 changed files with 31 additions and 58 deletions

View File

@@ -134,12 +134,9 @@ public class Combat
{
Wolf wolf = (Wolf) damager;
if (wolf.isTamed() && Taming.ownerOnline(wolf, pluginx))
if (wolf.isTamed() && (wolf.getOwner() instanceof Player))
{
Player master = Taming.getOwner(wolf, pluginx);
if (master == null) //Can it really happen?
return;
Player master = (Player) wolf.getOwner();
PlayerProfile PPo = Users.getProfile(master);
if(mcPermissions.getInstance().taming(master))
{
@@ -177,7 +174,7 @@ public class Combat
else if(target instanceof Wolf)
{
Wolf wolf = (Wolf) target;
if(wolf.isTamed() && Taming.ownerOnline(wolf, pluginx))
if(wolf.isTamed() && (wolf.getOwner() instanceof Player))
Taming.preventDamage(event, pluginx);
}
}