diff --git a/.gitignore b/.gitignore index 45dd1f49d..08cd04510 100644 --- a/.gitignore +++ b/.gitignore @@ -92,4 +92,6 @@ local.properties *.ear # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* \ No newline at end of file +hs_err_pid* +.classpath +.project \ No newline at end of file diff --git a/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java index da540462a..119d1b316 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/PlotMain.java @@ -143,11 +143,11 @@ public class PlotMain extends JavaPlugin { */ public static int hasPermissionRange(Player player, String stub, int range) { if (player==null || player.isOp()) { - return range; - } - if (player.hasPermission(stub + ".*")) { - return range; - } + return Integer.MAX_VALUE; + } + if (player.hasPermission(stub + ".*")) { + return Integer.MAX_VALUE; + } for (int i = range; i > 0; i--) { if (player.hasPermission(stub + "." + i)) { return i; diff --git a/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java b/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java index b8be5e421..894bbc831 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/commands/Claim.java @@ -100,20 +100,21 @@ public class Claim extends SubCommand { } PlotWorld world = PlotMain.getWorldSettings(plot.getWorld()); if (world.SCHEMATIC_ON_CLAIM) { - SchematicHandler handler = new SchematicHandler(); SchematicHandler.Schematic sch; if (schematic.equals("")) { - sch = handler.getSchematic(world.SCHEMATIC_FILE); + sch = SchematicHandler.getSchematic(world.SCHEMATIC_FILE); } else { - sch = handler.getSchematic(schematic); + sch = SchematicHandler.getSchematic(schematic); if (sch == null) { - sch = handler.getSchematic(world.SCHEMATIC_FILE); + sch = SchematicHandler.getSchematic(world.SCHEMATIC_FILE); } } - handler.paste(player.getLocation(), sch, plot); + SchematicHandler.paste(player.getLocation(), sch, plot); + } + if (world.DEFAULT_FLAGS != null && world.DEFAULT_FLAGS.size() > 0) { + plot.settings.setFlags(FlagManager.parseFlags(PlotMain.getWorldSettings(player.getWorld()).DEFAULT_FLAGS)); } - plot.settings.setFlags(FlagManager.parseFlags(PlotMain.getWorldSettings(player.getWorld()).DEFAULT_FLAGS)); } return event.isCancelled(); }