Ignore invalid tool

This commit is contained in:
boy0001 2015-08-29 12:25:13 +10:00
parent 75fbf67dca
commit fb0b50218d
3 changed files with 6 additions and 3 deletions

View File

@ -72,10 +72,13 @@ public class WESubscriber {
Player objPlayer = ((BukkitPlayer) player).player; Player objPlayer = ((BukkitPlayer) player).player;
ItemStack item = objPlayer.getItemInHand(); ItemStack item = objPlayer.getItemInHand();
if (item != null && !hasMask) { if (item != null && !hasMask) {
BrushTool tool = session.getBrushTool(item.getTypeId()); try {
if (tool != null) { BrushTool tool = session.getBrushTool(item.getTypeId());
hasMask = tool.getMask() != null; if (tool != null) {
hasMask = tool.getMask() != null;
}
} }
catch (Exception e) {}
} }
AbstractDelegateExtent extent = (AbstractDelegateExtent) event.getExtent(); AbstractDelegateExtent extent = (AbstractDelegateExtent) event.getExtent();
ChangeSetExtent history = null; ChangeSetExtent history = null;

Binary file not shown.

Binary file not shown.