forked from LogBlock/LogBlock
Move null check in tool code one level out. This means it will guard against trying to use worldedit for querying double chests when worldedit is not loaded. Fixes #511
Long-term, perhaps rather than using a worldedit object directly, we should use our own interface which supports similar methods and have two implementations, one which uses a worldedit selection and one which takes two corner coordinates for use in double chests. That might also allow for custom queries along those lines.
This commit is contained in:
@@ -70,11 +70,11 @@ public class ToolListener implements Listener
|
||||
block.getLocation(), block.getRelative(face).getLocation()));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (params.sel == null) {
|
||||
params.setLocation(block.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (toolData.mode == ToolMode.ROLLBACK)
|
||||
handler.new CommandRollback(player, params, true);
|
||||
|
Reference in New Issue
Block a user