mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-01-07 07:21:02 +00:00
Ignore invalid tool
This commit is contained in:
parent
75fbf67dca
commit
fb0b50218d
3 changed files with 6 additions and 3 deletions
|
@ -72,10 +72,13 @@ public class WESubscriber {
|
|||
Player objPlayer = ((BukkitPlayer) player).player;
|
||||
ItemStack item = objPlayer.getItemInHand();
|
||||
if (item != null && !hasMask) {
|
||||
BrushTool tool = session.getBrushTool(item.getTypeId());
|
||||
if (tool != null) {
|
||||
hasMask = tool.getMask() != null;
|
||||
try {
|
||||
BrushTool tool = session.getBrushTool(item.getTypeId());
|
||||
if (tool != null) {
|
||||
hasMask = tool.getMask() != null;
|
||||
}
|
||||
}
|
||||
catch (Exception e) {}
|
||||
}
|
||||
AbstractDelegateExtent extent = (AbstractDelegateExtent) event.getExtent();
|
||||
ChangeSetExtent history = null;
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue