Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
79137e14b2
Commit
558da3b6a0
@ -74,11 +74,15 @@ public class Substring implements SpecialCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Value result;
|
Value result;
|
||||||
|
try {
|
||||||
if (v2.asLong() < 0) {
|
if (v2.asLong() < 0) {
|
||||||
result = new Value.StringValue(v1.asString().substring(v1.asString().length() - 1 - (int) v2.asLong()));
|
result = new Value.StringValue(v1.asString().substring(v1.asString().length() - 1 - (int) v2.asLong()));
|
||||||
} else {
|
} else {
|
||||||
result = new Value.StringValue(v1.asString().substring((int) v2.asLong()));
|
result = new Value.StringValue(v1.asString().substring((int) v2.asLong()));
|
||||||
}
|
}
|
||||||
|
} catch (ArrayIndexOutOfBoundsException e) {
|
||||||
|
result = new Value.StringValue("");
|
||||||
|
}
|
||||||
scriptExecutor.getLocalVariables().putValue(resultName, result);
|
scriptExecutor.getLocalVariables().putValue(resultName, result);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ public class ClipboardListener implements Listener {
|
|||||||
SchematicNode schematic = SchematicNode.getSchematicNode(SteamwarUser.get(e.getPlayer().getUniqueId()).getId(), CLIPBOARD_SCHEMNAME, (Integer) null);
|
SchematicNode schematic = SchematicNode.getSchematicNode(SteamwarUser.get(e.getPlayer().getUniqueId()).getId(), CLIPBOARD_SCHEMNAME, (Integer) null);
|
||||||
boolean newSchem = false;
|
boolean newSchem = false;
|
||||||
if (schematic == null) {
|
if (schematic == null) {
|
||||||
schematic = SchematicNode.createSchematic(SteamwarUser.get(e.getPlayer().getUniqueId()).getId(), CLIPBOARD_SCHEMNAME, (Integer) null);
|
schematic = SchematicNode.createSchematic(SteamwarUser.get(e.getPlayer().getUniqueId()).getId(), CLIPBOARD_SCHEMNAME, null);
|
||||||
newSchem = true;
|
newSchem = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren