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:
Philip Cass
2014-01-15 14:02:36 +00:00
parent 6902ffb373
commit 05fe4f2144

View File

@@ -70,9 +70,9 @@ public class ToolListener implements Listener
block.getLocation(), block.getRelative(face).getLocation()));
}
}
if (params.sel == null) {
params.setLocation(block.getLocation());
}
}
if (params.sel == null) {
params.setLocation(block.getLocation());
}
}
try {