mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-02 05:21:52 +01:00
[trunk] Fixes slime:size
1 is smallest Also added wool color for sheeps: Use color name (like white, red, blue) Example: /spawnmob sheep:blue git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1104 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
1438f91392
commit
e5be12bc5c
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user