diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 51c114147..f07dc42d7 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -9,6 +9,10 @@ import com.earth2me.essentials.User; import com.earth2me.essentials.Mob; import com.earth2me.essentials.Mob.MobException; import com.earth2me.essentials.TargetBlock; +import net.minecraft.server.EntitySheep; +import org.bukkit.DyeColor; +import org.bukkit.craftbukkit.entity.CraftSheep; +import org.bukkit.craftbukkit.entity.CraftSlime; public class Commandspawnmob extends EssentialsCommand @@ -102,7 +106,7 @@ public class Commandspawnmob extends EssentialsCommand { try { - //((EntitySlime)spawned.getHandle()).a(Integer.parseInt(split1[1])); + ((CraftSlime)spawned).setSize(Integer.parseInt(split1[1])); } catch (Exception e) { @@ -110,6 +114,18 @@ public class Commandspawnmob extends EssentialsCommand return; } } + if (split1.length == 2 && "Sheep".equals(mob.name)) + { + try + { + ((CraftSheep)spawned).setColor(DyeColor.valueOf(split1[1].toUpperCase())); + } + catch (Exception e) + { + user.sendMessage("Malformed color."); + return; + } + } if (args.length == 2) { int mobCount = Integer.parseInt(args[1]);