mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-05 14:18:21 +02:00
Merge branch 'master' of github.com:essentials/Essentials
This commit is contained in:
@@ -262,19 +262,19 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
|||||||
nickname.append(ess.getSettings().getNicknamePrefix()).append(nick);
|
nickname.append(ess.getSettings().getNicknamePrefix()).append(nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isOp())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
nickname.insert(0, ess.getSettings().getOperatorColor().toString());
|
||||||
|
nickname.append("§f");
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
if (addprefixsuffix && ess.getSettings().addPrefixSuffix())
|
if (addprefixsuffix && ess.getSettings().addPrefixSuffix())
|
||||||
{
|
{
|
||||||
if (isOp())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
nickname.insert(0, ess.getSettings().getOperatorColor().toString());
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ess.getSettings().disablePrefix())
|
if (!ess.getSettings().disablePrefix())
|
||||||
{
|
{
|
||||||
final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§');
|
final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§');
|
||||||
|
@@ -219,21 +219,16 @@ public class Commandspawnmob extends EssentialsCommand
|
|||||||
|| type == EntityType.VILLAGER
|
|| type == EntityType.VILLAGER
|
||||||
|| type == EntityType.OCELOT
|
|| type == EntityType.OCELOT
|
||||||
|| type == EntityType.WOLF)
|
|| type == EntityType.WOLF)
|
||||||
&& data.equals("baby"))
|
&& data.contains("baby"))
|
||||||
{
|
{
|
||||||
((Animals)spawned).setAge(-24000);
|
((Animals)spawned).setBaby();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type == EntityType.SHEEP)
|
if (type == EntityType.SHEEP)
|
||||||
{
|
{
|
||||||
if (data.contains("baby"))
|
|
||||||
{
|
|
||||||
((Sheep)spawned).setAge(-24000);
|
|
||||||
}
|
|
||||||
final String color = data.toUpperCase(Locale.ENGLISH).replace("BABY", "");
|
final String color = data.toUpperCase(Locale.ENGLISH).replace("BABY", "");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
if (color.equals("RANDOM"))
|
if (color.equals("RANDOM"))
|
||||||
{
|
{
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
@@ -249,49 +244,36 @@ public class Commandspawnmob extends EssentialsCommand
|
|||||||
throw new Exception(_("sheepMalformedColor"), e);
|
throw new Exception(_("sheepMalformedColor"), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type == EntityType.WOLF
|
if ((type == EntityType.WOLF
|
||||||
&& data.startsWith("tamed"))
|
|| type == EntityType.OCELOT)
|
||||||
|
&& data.contains("tamed"))
|
||||||
{
|
{
|
||||||
final Wolf wolf = ((Wolf)spawned);
|
final Tameable tameable = ((Tameable)spawned);
|
||||||
wolf.setTamed(true);
|
tameable.setTamed(true);
|
||||||
wolf.setOwner(user);
|
tameable.setOwner(user.getBase());
|
||||||
wolf.setSitting(true);
|
|
||||||
if (data.equals("tamedbaby"))
|
|
||||||
{
|
|
||||||
((Animals)spawned).setAge(-24000);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (type == EntityType.WOLF
|
if (type == EntityType.WOLF
|
||||||
&& data.startsWith("angry"))
|
&& data.contains("angry"))
|
||||||
{
|
{
|
||||||
((Wolf)spawned).setAngry(true);
|
((Wolf)spawned).setAngry(true);
|
||||||
if (data.equals("angrybaby"))
|
|
||||||
{
|
|
||||||
((Animals)spawned).setAge(-24000);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (type == EntityType.CREEPER && data.equals("powered"))
|
if (type == EntityType.CREEPER && data.contains("powered"))
|
||||||
{
|
{
|
||||||
((Creeper)spawned).setPowered(true);
|
((Creeper)spawned).setPowered(true);
|
||||||
}
|
}
|
||||||
if (type == EntityType.OCELOT)
|
if (type == EntityType.OCELOT)
|
||||||
{
|
{
|
||||||
final Ocelot cat = ((Ocelot)spawned);
|
if (data.contains("siamese"))
|
||||||
if (data.contains("siamese")) {
|
{
|
||||||
cat.setCatType(Ocelot.Type.SIAMESE_CAT);
|
((Ocelot)spawned).setCatType(Ocelot.Type.SIAMESE_CAT);
|
||||||
}
|
}
|
||||||
if (data.contains("red")) {
|
if (data.contains("red"))
|
||||||
cat.setCatType(Ocelot.Type.RED_CAT);
|
{
|
||||||
|
((Ocelot)spawned).setCatType(Ocelot.Type.RED_CAT);
|
||||||
}
|
}
|
||||||
if (data.contains("black")) {
|
if (data.contains("black"))
|
||||||
cat.setCatType(Ocelot.Type.BLACK_CAT);
|
{
|
||||||
}
|
((Ocelot)spawned).setCatType(Ocelot.Type.BLACK_CAT);
|
||||||
if (data.contains("tamed")) {
|
|
||||||
cat.setTamed(true);
|
|
||||||
cat.setOwner(user);
|
|
||||||
}
|
|
||||||
if (data.contains("baby")) {
|
|
||||||
cat.setAge(-24000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user