Fixed rotating warhub at restart after /warcfg.

Stops the warhub from rotating upon restart after a call to /warcfg -
sorry for the mess.  Still have to convert config files and fix
commands.
This commit is contained in:
taoneill 2013-01-10 22:29:26 -05:00
parent 0245476130
commit bff034a299
2 changed files with 10 additions and 5 deletions

View File

@ -17,6 +17,7 @@ import com.tommytony.war.Warzone;
import com.tommytony.war.job.RestoreYmlWarhubJob;
import com.tommytony.war.job.RestoreYmlWarzonesJob;
import com.tommytony.war.structure.WarHub;
import com.tommytony.war.utility.Direction;
public class WarYmlMapper {
@ -147,17 +148,21 @@ public class WarYmlMapper {
String orientationStr = "";
switch (hub.getOrientation()) {
case SOUTH:
orientationStr = "south";
if (Direction.isLegacy) orientationStr = "south";
else orientationStr = "west"; // temp fix for rotating warhub
break;
case EAST:
orientationStr = "east";
if (Direction.isLegacy) orientationStr = "east";
else orientationStr = "south";
break;
case NORTH:
orientationStr = "north";
if (Direction.isLegacy) orientationStr = "north";
else orientationStr = "east";
break;
case WEST:
default:
orientationStr = "west";
if (Direction.isLegacy) orientationStr = "west";
else orientationStr = "north";
break;
}

View File

@ -4,7 +4,7 @@ import org.bukkit.block.BlockFace;
public class Direction {
private static boolean isLegacy = BlockFace.NORTH.getModX() == -1;
public final static boolean isLegacy = BlockFace.NORTH.getModX() == -1;
public static BlockFace NORTH() {
if (!isLegacy) {