mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 03:53:41 +00:00
/spawnmob command: Show error message if EssentialsProtect will prevent spawning of creature.
This commit is contained in:
parent
3b838cc23d
commit
367fcdd029
1 changed files with 9 additions and 2 deletions
|
@ -60,6 +60,12 @@ public class Commandspawnmob extends EssentialsCommand
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ess.getSettings().getProtectPreventSpawn(mobType.toLowerCase())
|
||||||
|
|| (mountType != null && ess.getSettings().getProtectPreventSpawn(mountType.toLowerCase())))
|
||||||
|
{
|
||||||
|
user.sendMessage(Util.i18n("unableToSpawnMob"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Entity spawnedMob = null;
|
Entity spawnedMob = null;
|
||||||
Mob mob = null;
|
Mob mob = null;
|
||||||
|
@ -224,7 +230,8 @@ public class Commandspawnmob extends EssentialsCommand
|
||||||
{
|
{
|
||||||
((CraftWolf)spawned).setAngry(true);
|
((CraftWolf)spawned).setAngry(true);
|
||||||
}
|
}
|
||||||
if ("Creeper".equalsIgnoreCase(type) && data.equalsIgnoreCase("powered")) {
|
if ("Creeper".equalsIgnoreCase(type) && data.equalsIgnoreCase("powered"))
|
||||||
|
{
|
||||||
((CraftCreeper)spawned).setPowered(true);
|
((CraftCreeper)spawned).setPowered(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue