Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
d2bbcc2d98
Commit
0162ed7d92
@ -44,16 +44,16 @@ public class Greater implements SpecialCommand {
|
||||
|
||||
Value v1 = scriptExecutor.getOrItselfValue(command[command.length - 2]);
|
||||
Value v2 = scriptExecutor.getOrItselfValue(command[command.length - 1]);
|
||||
if (!(v1 instanceof Value.LongValue)) {
|
||||
if (!(v1 instanceof Value.LongValue) && !(v1 instanceof Value.DoubleValue)) {
|
||||
BauSystem.MESSAGE.send("SCRIPT_COMMAND_ERROR_NUMBER_COMPARE", scriptExecutor.getPlayer());
|
||||
return true;
|
||||
}
|
||||
if (!(v2 instanceof Value.LongValue)) {
|
||||
if (!(v2 instanceof Value.LongValue) && !(v2 instanceof Value.DoubleValue)) {
|
||||
BauSystem.MESSAGE.send("SCRIPT_COMMAND_ERROR_NUMBER_COMPARE", scriptExecutor.getPlayer());
|
||||
return true;
|
||||
}
|
||||
Value result;
|
||||
if (v1.asLong() > v2.asLong()) {
|
||||
if (v1.asDouble() > v2.asDouble()) {
|
||||
result = new Value.BooleanValue(true);
|
||||
} else {
|
||||
result = new Value.BooleanValue(false);
|
||||
|
@ -44,16 +44,16 @@ public class Less implements SpecialCommand {
|
||||
|
||||
Value v1 = scriptExecutor.getOrItselfValue(command[command.length - 2]);
|
||||
Value v2 = scriptExecutor.getOrItselfValue(command[command.length - 1]);
|
||||
if (!(v1 instanceof Value.LongValue)) {
|
||||
if (!(v1 instanceof Value.LongValue) && !(v1 instanceof Value.DoubleValue)) {
|
||||
BauSystem.MESSAGE.send("SCRIPT_COMMAND_ERROR_NUMBER_COMPARE", scriptExecutor.getPlayer());
|
||||
return true;
|
||||
}
|
||||
if (!(v2 instanceof Value.LongValue)) {
|
||||
if (!(v2 instanceof Value.LongValue) && !(v2 instanceof Value.DoubleValue)) {
|
||||
BauSystem.MESSAGE.send("SCRIPT_COMMAND_ERROR_NUMBER_COMPARE", scriptExecutor.getPlayer());
|
||||
return true;
|
||||
}
|
||||
Value result;
|
||||
if (v1.asLong() < v2.asLong()) {
|
||||
if (v1.asDouble() < v2.asDouble()) {
|
||||
result = new Value.BooleanValue(true);
|
||||
} else {
|
||||
result = new Value.BooleanValue(false);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren