mirror of
https://github.com/taoneill/war.git
synced 2024-11-13 05:54:31 +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.logging.Level;
|
||||
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import bukkit.tommytony.war.War;
|
||||
@ -273,14 +272,20 @@ public class WarMapper {
|
||||
WarHub hub = War.war.getWarHub();
|
||||
if (hub != null) {
|
||||
String orientationStr = "";
|
||||
if (BlockFace.SOUTH == hub.getOrientation()) {
|
||||
orientationStr = "south";
|
||||
} else if (BlockFace.EAST == hub.getOrientation()) {
|
||||
orientationStr = "east";
|
||||
} else if (BlockFace.NORTH == hub.getOrientation()) {
|
||||
orientationStr = "north";
|
||||
} else {
|
||||
orientationStr = "west";
|
||||
switch (hub.getOrientation()) {
|
||||
case SOUTH:
|
||||
orientationStr = "south";
|
||||
break;
|
||||
case EAST:
|
||||
orientationStr = "east";
|
||||
break;
|
||||
case NORTH:
|
||||
orientationStr = "north";
|
||||
break;
|
||||
case WEST:
|
||||
default:
|
||||
orientationStr = "west";
|
||||
break;
|
||||
}
|
||||
hubStr = hub.getLocation().getBlockX() + "," + hub.getLocation().getBlockY() + "," + hub.getLocation().getBlockZ() + ","
|
||||
+ hub.getLocation().getWorld().getName() + "," + orientationStr;
|
||||
|
Loading…
Reference in New Issue
Block a user