mirror of
https://github.com/essentials/Essentials.git
synced 2025-02-24 16:32:35 +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
be9cd2464f
commit
5b615382da
@ -9,6 +9,10 @@ import com.earth2me.essentials.User;
|
|||||||
import com.earth2me.essentials.Mob;
|
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 org.bukkit.DyeColor;
|
||||||
|
import org.bukkit.craftbukkit.entity.CraftSheep;
|
||||||
|
import org.bukkit.craftbukkit.entity.CraftSlime;
|
||||||
|
|
||||||
|
|
||||||
public class Commandspawnmob extends EssentialsCommand
|
public class Commandspawnmob extends EssentialsCommand
|
||||||
@ -102,7 +106,7 @@ public class Commandspawnmob extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//((EntitySlime)spawned.getHandle()).a(Integer.parseInt(split1[1]));
|
((CraftSlime)spawned).setSize(Integer.parseInt(split1[1]));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -110,6 +114,18 @@ public class Commandspawnmob extends EssentialsCommand
|
|||||||
return;
|
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)
|
if (args.length == 2)
|
||||||
{
|
{
|
||||||
int mobCount = Integer.parseInt(args[1]);
|
int mobCount = Integer.parseInt(args[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user