mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 19:54:43 +02:00
Minor fixes
This commit is contained in:
@ -89,17 +89,17 @@ public class DebugExec extends SubCommand {
|
||||
private Bindings scope;
|
||||
|
||||
public DebugExec() {
|
||||
File file = new File(PS.get().IMP.getDirectory(), "scripts" + File.separator + "start.js");
|
||||
if (file.exists()) {
|
||||
init();
|
||||
try {
|
||||
String script = StringMan.join(Files.readLines(new File(new File(PS.get().IMP.getDirectory() + File.separator + "scripts"), "start.js"), StandardCharsets.UTF_8), System.getProperty("line.separator"));
|
||||
scope.put("THIS", this);
|
||||
scope.put("PlotPlayer", ConsolePlayer.getConsole());
|
||||
engine.eval(script, scope);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
try {
|
||||
File file = new File(PS.get().IMP.getDirectory(), "scripts" + File.separator + "start.js");
|
||||
if (file.exists()) {
|
||||
init();
|
||||
String script = StringMan.join(Files.readLines(new File(new File(PS.get().IMP.getDirectory() + File.separator + "scripts"), "start.js"), StandardCharsets.UTF_8), System.getProperty("line.separator"));
|
||||
scope.put("THIS", this);
|
||||
scope.put("PlotPlayer", ConsolePlayer.getConsole());
|
||||
engine.eval(script, scope);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,9 @@ public class Unclaim extends SubCommand {
|
||||
if (plot == null) {
|
||||
return !sendMessage(plr, C.NOT_IN_PLOT);
|
||||
}
|
||||
if (!plot.hasOwner()) {
|
||||
return !sendMessage(plr, C.PLOT_NOT_CLAIMED);
|
||||
}
|
||||
if (!MainUtil.getTopPlot(plot).equals(MainUtil.getBottomPlot(plot))) {
|
||||
return !sendMessage(plr, C.UNLINK_REQUIRED);
|
||||
}
|
||||
|
Reference in New Issue
Block a user