mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 21:22:09 +00: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
1 changed files with 17 additions and 1 deletions
|
@ -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…
Reference in a new issue