mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
fixes
This commit is contained in:
parent
595db4a51f
commit
64314723c9
2
.gitignore
vendored
2
.gitignore
vendored
@ -93,3 +93,5 @@ local.properties
|
|||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
.classpath
|
||||||
|
.project
|
@ -143,11 +143,11 @@ public class PlotMain extends JavaPlugin {
|
|||||||
*/
|
*/
|
||||||
public static int hasPermissionRange(Player player, String stub, int range) {
|
public static int hasPermissionRange(Player player, String stub, int range) {
|
||||||
if (player==null || player.isOp()) {
|
if (player==null || player.isOp()) {
|
||||||
return range;
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
if (player.hasPermission(stub + ".*")) {
|
if (player.hasPermission(stub + ".*")) {
|
||||||
return range;
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
for (int i = range; i > 0; i--) {
|
for (int i = range; i > 0; i--) {
|
||||||
if (player.hasPermission(stub + "." + i)) {
|
if (player.hasPermission(stub + "." + i)) {
|
||||||
return i;
|
return i;
|
||||||
|
@ -100,20 +100,21 @@ public class Claim extends SubCommand {
|
|||||||
}
|
}
|
||||||
PlotWorld world = PlotMain.getWorldSettings(plot.getWorld());
|
PlotWorld world = PlotMain.getWorldSettings(plot.getWorld());
|
||||||
if (world.SCHEMATIC_ON_CLAIM) {
|
if (world.SCHEMATIC_ON_CLAIM) {
|
||||||
SchematicHandler handler = new SchematicHandler();
|
|
||||||
SchematicHandler.Schematic sch;
|
SchematicHandler.Schematic sch;
|
||||||
if (schematic.equals("")) {
|
if (schematic.equals("")) {
|
||||||
sch = handler.getSchematic(world.SCHEMATIC_FILE);
|
sch = SchematicHandler.getSchematic(world.SCHEMATIC_FILE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sch = handler.getSchematic(schematic);
|
sch = SchematicHandler.getSchematic(schematic);
|
||||||
if (sch == null) {
|
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();
|
return event.isCancelled();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user