mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
[trunk] Spawn angry or tamed wolf
/spawnmob wolf:angry /spawnmob wolf:tamed git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1105 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
e5be12bc5c
commit
05c902371a
1 changed files with 17 additions and 0 deletions
|
@ -10,9 +10,12 @@ import com.earth2me.essentials.Mob;
|
||||||
import com.earth2me.essentials.Mob.MobException;
|
import com.earth2me.essentials.Mob.MobException;
|
||||||
import com.earth2me.essentials.TargetBlock;
|
import com.earth2me.essentials.TargetBlock;
|
||||||
import net.minecraft.server.EntitySheep;
|
import net.minecraft.server.EntitySheep;
|
||||||
|
import net.minecraft.server.EntityWolf;
|
||||||
|
import net.minecraft.server.PathEntity;
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.craftbukkit.entity.CraftSheep;
|
import org.bukkit.craftbukkit.entity.CraftSheep;
|
||||||
import org.bukkit.craftbukkit.entity.CraftSlime;
|
import org.bukkit.craftbukkit.entity.CraftSlime;
|
||||||
|
import org.bukkit.craftbukkit.entity.CraftWolf;
|
||||||
|
|
||||||
|
|
||||||
public class Commandspawnmob extends EssentialsCommand
|
public class Commandspawnmob extends EssentialsCommand
|
||||||
|
@ -126,6 +129,20 @@ public class Commandspawnmob extends EssentialsCommand
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (split1.length == 2 && "Wolf".equals(mob.name) && split1[1].equalsIgnoreCase("tamed"))
|
||||||
|
{
|
||||||
|
EntityWolf wolf = ((CraftWolf)spawned).getHandle();
|
||||||
|
wolf.d(true);
|
||||||
|
wolf.a((PathEntity) null);
|
||||||
|
wolf.b(true);
|
||||||
|
wolf.health = 20;
|
||||||
|
wolf.a(user.getName());
|
||||||
|
wolf.world.a(wolf, (byte) 7);
|
||||||
|
}
|
||||||
|
if (split1.length == 2 && "Wolf".equals(mob.name) && split1[1].equalsIgnoreCase("angry"))
|
||||||
|
{
|
||||||
|
((CraftWolf)spawned).setAngry(true);
|
||||||
|
}
|
||||||
if (args.length == 2)
|
if (args.length == 2)
|
||||||
{
|
{
|
||||||
int mobCount = Integer.parseInt(args[1]);
|
int mobCount = Integer.parseInt(args[1]);
|
||||||
|
|
Loading…
Reference in a new issue