mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-17 20:11:21 +02: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:
@@ -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]);
|
||||||
|
Reference in New Issue
Block a user