3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

Made handling of non-right angles in getDirection() return more relevant errors.

Dieser Commit ist enthalten in:
sk89q 2011-01-09 11:22:42 -08:00
Ursprung 010a1c84fd
Commit 2f411fa838

Datei anzeigen

@ -1701,8 +1701,12 @@ public class WorldEditController {
LocalPlayer.DIRECTION dir = null;
dirStr = dirStr.toLowerCase();
boolean wasDetected = false;
if (dirStr.equals("me")) {
dir = player.getCardinalDirection();
wasDetected = true;
}
if (dirStr.charAt(0) == 'w' || dir == LocalPlayer.DIRECTION.WEST) {
@ -1718,7 +1722,11 @@ public class WorldEditController {
} else if (dirStr.charAt(0) == 'd') {
ym -= 1;
} else {
throw new UnknownDirectionException(dirStr);
if (wasDetected) {
throw new UnknownDirectionException(dir.name());
} else {
throw new UnknownDirectionException(dirStr);
}
}
return new Vector(xm, ym, zm);