mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Curse you indentation man!
This commit is contained in:
parent
7717223686
commit
4b65cf5bea
@ -57,23 +57,23 @@ public class NavigationCommands {
|
|||||||
public static void ascend(CommandContext args, WorldEdit we,
|
public static void ascend(CommandContext args, WorldEdit we,
|
||||||
LocalSession session, LocalPlayer player, EditSession editSession)
|
LocalSession session, LocalPlayer player, EditSession editSession)
|
||||||
throws WorldEditException {
|
throws WorldEditException {
|
||||||
int levelsToAscend = 0;
|
int levelsToAscend = 0;
|
||||||
if (args.argsLength() == 0) {
|
if (args.argsLength() == 0) {
|
||||||
levelsToAscend = 1;
|
levelsToAscend = 1;
|
||||||
} else {
|
} else {
|
||||||
levelsToAscend = args.getInteger(0);
|
levelsToAscend = args.getInteger(0);
|
||||||
}
|
|
||||||
int ascentLevels = 1;
|
|
||||||
while (player.ascendLevel() && levelsToAscend != ascentLevels) {
|
|
||||||
ascentLevels++;
|
|
||||||
}
|
|
||||||
if (ascentLevels == 0) {
|
|
||||||
player.printError("No free spot above you found.");
|
|
||||||
} else {
|
|
||||||
player.print((ascentLevels != 1) ? "Ascended " + Integer.toString(ascentLevels) + " levels." : "Ascended a level.");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
int ascentLevels = 1;
|
||||||
|
while (player.ascendLevel() && levelsToAscend != ascentLevels) {
|
||||||
|
ascentLevels++;
|
||||||
|
}
|
||||||
|
if (ascentLevels == 0) {
|
||||||
|
player.printError("No free spot above you found.");
|
||||||
|
} else {
|
||||||
|
player.print((ascentLevels != 1) ? "Ascended " + Integer.toString(ascentLevels) + " levels." : "Ascended a level.");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
aliases = {"descend"},
|
aliases = {"descend"},
|
||||||
@ -92,15 +92,14 @@ public class NavigationCommands {
|
|||||||
} else {
|
} else {
|
||||||
levelsToDescend = args.getInteger(0);
|
levelsToDescend = args.getInteger(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int descentLevels = 1;
|
int descentLevels = 1;
|
||||||
while (player.descendLevel() && levelsToDescend != descentLevels) {
|
while (player.descendLevel() && levelsToDescend != descentLevels) {
|
||||||
descentLevels++;
|
descentLevels++;
|
||||||
}
|
}
|
||||||
if (descentLevels == 0) {
|
if (descentLevels == 0) {
|
||||||
player.printError("No free spot above you found.");
|
player.printError("No free spot above you found.");
|
||||||
} else {
|
} else {
|
||||||
player.print((descentLevels != 1) ? "Descended " + Integer.toString(descentLevels) + " levels." : "Descended a level.");
|
player.print((descentLevels != 1) ? "Descended " + Integer.toString(descentLevels) + " levels." : "Descended a level.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user