1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-21 05:51:56 +02:00

Oh no! Angry wolf babies D:

This commit is contained in:
snowleo
2011-11-25 06:04:19 +01:00
parent 1cc71007b1
commit 313f4e951f

View File

@@ -214,16 +214,26 @@ public class Commandspawnmob extends EssentialsCommand
throw new Exception(_("sheepMalformedColor"), e); throw new Exception(_("sheepMalformedColor"), e);
} }
} }
if ("Wolf".equalsIgnoreCase(type) && data.equalsIgnoreCase("tamed")) if ("Wolf".equalsIgnoreCase(type)
&& data.toLowerCase(Locale.ENGLISH).startsWith("tamed"))
{ {
final Wolf wolf = ((Wolf)spawned); final Wolf wolf = ((Wolf)spawned);
wolf.setTamed(true); wolf.setTamed(true);
wolf.setOwner(user); wolf.setOwner(user);
wolf.setSitting(true); wolf.setSitting(true);
if (data.equalsIgnoreCase("tamedbaby"))
{
((Animals)spawned).setAge(-24000);
}
} }
if ("Wolf".equalsIgnoreCase(type) && data.equalsIgnoreCase("angry")) if ("Wolf".equalsIgnoreCase(type)
&& data.toLowerCase(Locale.ENGLISH).startsWith("angry"))
{ {
((Wolf)spawned).setAngry(true); ((Wolf)spawned).setAngry(true);
if (data.equalsIgnoreCase("angrybaby"))
{
((Animals)spawned).setAge(-24000);
}
} }
if ("Creeper".equalsIgnoreCase(type) && data.equalsIgnoreCase("powered")) if ("Creeper".equalsIgnoreCase(type) && data.equalsIgnoreCase("powered"))
{ {