Only set the item in hand null if it's actually a fishing rod

This commit is contained in:
TfT_02 2013-05-31 17:17:45 +02:00 committed by GJ
parent d43ae17bd2
commit da25b02e0a

View File

@ -114,7 +114,9 @@ public class FishingManager extends SkillManager {
mcMMO.p.getServer().broadcastMessage(ChatColor.RED + AdvancedConfig.getInstance().getServerUnleashMessage().replace("(PLAYER)", player.getDisplayName()));
}
player.setItemInHand(null);
if (player.getItemInHand().getType() == Material.FISHING_ROD) {
player.setItemInHand(null);
}
Creature kraken = (Creature) world.spawnEntity(player.getEyeLocation(), (Misc.getRandom().nextInt(100) == 0 ? EntityType.CHICKEN : EntityType.SQUID));
kraken.setCustomName(AdvancedConfig.getInstance().getKrakenName());