1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-16 11:37:30 +02:00

Added saddles to pigs and horses /spawnmob pig:saddle /spawnmob horse:saddle

This commit is contained in:
okamosy
2013-07-17 18:09:56 +01:00
committed by KHobbits
parent 536793ed10
commit 3c641138cf

View File

@@ -471,6 +471,20 @@ public class SpawnMob
((Horse)spawned).setTamed(true);
((Horse)spawned).setCarryingChest(true);
}
if (data.contains("saddle"))
{
((Horse)spawned).setTamed(true);
((Horse)spawned).getInventory().setSaddle(new ItemStack(Material.SADDLE, 1));
}
}
if (type == EntityType.PIG)
{
if (data.contains("saddle"))
{
((Pig)spawned).setSaddle(true);
}
}
}