diff options
author | okamosy <okamosy@gmail.com> | 2013-07-17 18:09:56 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-07-17 23:31:37 +0100 |
commit | 307e933052d73bbd58e74db5e4b0faa66d56340f (patch) | |
tree | 204bed35468a571a92a4147a05b4b9d0a3158839 | |
parent | fd6257355f552ee4a8761be2a024a1ab4b81986c (diff) | |
download | Essentials-307e933052d73bbd58e74db5e4b0faa66d56340f.tar Essentials-307e933052d73bbd58e74db5e4b0faa66d56340f.tar.gz Essentials-307e933052d73bbd58e74db5e4b0faa66d56340f.tar.lz Essentials-307e933052d73bbd58e74db5e4b0faa66d56340f.tar.xz Essentials-307e933052d73bbd58e74db5e4b0faa66d56340f.zip |
Added saddles to pigs and horses /spawnmob pig:saddle /spawnmob horse:saddle
-rw-r--r-- | Essentials/src/com/earth2me/essentials/SpawnMob.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/SpawnMob.java b/Essentials/src/com/earth2me/essentials/SpawnMob.java index d7af9df35..63686f40e 100644 --- a/Essentials/src/com/earth2me/essentials/SpawnMob.java +++ b/Essentials/src/com/earth2me/essentials/SpawnMob.java @@ -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); + } } } |