Fixes NPE with FurnaceExtractEvent. Fixes #847

This commit is contained in:
GJ 2013-03-17 21:47:45 -04:00
parent c14ceab24d
commit e7ee23b871

View File

@ -142,6 +142,10 @@ public class InventoryListener implements Listener {
// We can make this assumption because we (should) be the only ones using this exact metadata // We can make this assumption because we (should) be the only ones using this exact metadata
Player player = plugin.getServer().getPlayer(furnaceBlock.getMetadata(mcMMO.furnaceMetadataKey).get(0).asString()); Player player = plugin.getServer().getPlayer(furnaceBlock.getMetadata(mcMMO.furnaceMetadataKey).get(0).asString());
if (Misc.isNPCEntity(player)) {
return;
}
SmeltingManager smeltingManager = UserManager.getPlayer(player).getSmeltingManager(); SmeltingManager smeltingManager = UserManager.getPlayer(player).getSmeltingManager();
if (smeltingManager.canUseVanillaXpBoost()) { if (smeltingManager.canUseVanillaXpBoost()) {