Fixed bug where Smelting would throw consistent errors due to offline

players. Fixes #754
This commit is contained in:
GJ 2013-03-01 18:45:44 -05:00
parent ae8b70be0f
commit 0d7c402c01
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ Key:
Version 1.4.01-dev Version 1.4.01-dev
= Fixed bug where trying to use /mctop or /xplock with the Smelting child skill caused NPEs = Fixed bug where trying to use /mctop or /xplock with the Smelting child skill caused NPEs
= Fixed bug where /mctop and /mcrank wouldn't show overall power levels for servers using Flatfile = Fixed bug where /mctop and /mcrank wouldn't show overall power levels for servers using Flatfile
= Fixed bug where Smelting would throw consistent errors due to offline players
Version 1.4.00 Version 1.4.00
+ Added new Child Skill - Smelting! + Added new Child Skill - Smelting!

View File

@ -94,7 +94,7 @@ public class InventoryListener implements Listener {
if (plugin.furnaceIsTracked(furnaceBlock) && smelting != null && ItemUtils.isSmeltable(smelting)) { if (plugin.furnaceIsTracked(furnaceBlock) && smelting != null && ItemUtils.isSmeltable(smelting)) {
Player player = plugin.getFurnacePlayer(furnaceBlock); Player player = plugin.getFurnacePlayer(furnaceBlock);
if (!Misc.isNPCEntity(player)) { if (Misc.isNPCEntity(player)) {
return; return;
} }
@ -115,7 +115,7 @@ public class InventoryListener implements Listener {
if (plugin.furnaceIsTracked(furnaceBlock) && smelting != null && ItemUtils.isSmeltable(smelting)) { if (plugin.furnaceIsTracked(furnaceBlock) && smelting != null && ItemUtils.isSmeltable(smelting)) {
Player player = plugin.getFurnacePlayer(furnaceBlock); Player player = plugin.getFurnacePlayer(furnaceBlock);
if (!Misc.isNPCEntity(player)) { if (Misc.isNPCEntity(player)) {
return; return;
} }