mirror of
https://github.com/taoneill/war.git
synced 2025-02-08 15:31:20 +01:00
A switch is more nice here
This commit is contained in:
parent
ae13d93da1
commit
e9f56967cb
@ -5,7 +5,6 @@ import java.io.IOException;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.bukkit.block.BlockFace;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import bukkit.tommytony.war.War;
|
import bukkit.tommytony.war.War;
|
||||||
@ -273,14 +272,20 @@ public class WarMapper {
|
|||||||
WarHub hub = War.war.getWarHub();
|
WarHub hub = War.war.getWarHub();
|
||||||
if (hub != null) {
|
if (hub != null) {
|
||||||
String orientationStr = "";
|
String orientationStr = "";
|
||||||
if (BlockFace.SOUTH == hub.getOrientation()) {
|
switch (hub.getOrientation()) {
|
||||||
|
case SOUTH:
|
||||||
orientationStr = "south";
|
orientationStr = "south";
|
||||||
} else if (BlockFace.EAST == hub.getOrientation()) {
|
break;
|
||||||
|
case EAST:
|
||||||
orientationStr = "east";
|
orientationStr = "east";
|
||||||
} else if (BlockFace.NORTH == hub.getOrientation()) {
|
break;
|
||||||
|
case NORTH:
|
||||||
orientationStr = "north";
|
orientationStr = "north";
|
||||||
} else {
|
break;
|
||||||
|
case WEST:
|
||||||
|
default:
|
||||||
orientationStr = "west";
|
orientationStr = "west";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
hubStr = hub.getLocation().getBlockX() + "," + hub.getLocation().getBlockY() + "," + hub.getLocation().getBlockZ() + ","
|
hubStr = hub.getLocation().getBlockX() + "," + hub.getLocation().getBlockY() + "," + hub.getLocation().getBlockZ() + ","
|
||||||
+ hub.getLocation().getWorld().getName() + "," + orientationStr;
|
+ hub.getLocation().getWorld().getName() + "," + orientationStr;
|
||||||
|
Loading…
Reference in New Issue
Block a user