mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fixed summoned ocelots never changing skins. (Thanks Xackery!)
This commit is contained in:
parent
3ec5894249
commit
7b22c6232d
@ -6,6 +6,7 @@ import org.bukkit.entity.AnimalTamer;
|
|||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Ocelot;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Tameable;
|
import org.bukkit.entity.Tameable;
|
||||||
import org.bukkit.entity.Wolf;
|
import org.bukkit.entity.Wolf;
|
||||||
@ -243,6 +244,10 @@ public class Taming {
|
|||||||
entity.setMetadata("mcmmoSummoned", new FixedMetadataValue(plugin, true));
|
entity.setMetadata("mcmmoSummoned", new FixedMetadataValue(plugin, true));
|
||||||
((Tameable) entity).setOwner(player);
|
((Tameable) entity).setOwner(player);
|
||||||
|
|
||||||
|
if (entity.getType().equals(EntityType.OCELOT)) {
|
||||||
|
((Ocelot) entity).setCatType(Ocelot.Type.getType(1 + (int) (Math.random() * 3)));
|
||||||
|
}
|
||||||
|
|
||||||
player.setItemInHand(new ItemStack(summonItem, item.getAmount() - summonAmount));
|
player.setItemInHand(new ItemStack(summonItem, item.getAmount() - summonAmount));
|
||||||
player.sendMessage(mcLocale.getString("m.TamingSummon"));
|
player.sendMessage(mcLocale.getString("m.TamingSummon"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user