mirror of
https://github.com/taoneill/war.git
synced 2024-11-30 06:03:23 +01:00
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:
parent
0245476130
commit
bff034a299
@ -17,6 +17,7 @@ import com.tommytony.war.Warzone;
|
|||||||
import com.tommytony.war.job.RestoreYmlWarhubJob;
|
import com.tommytony.war.job.RestoreYmlWarhubJob;
|
||||||
import com.tommytony.war.job.RestoreYmlWarzonesJob;
|
import com.tommytony.war.job.RestoreYmlWarzonesJob;
|
||||||
import com.tommytony.war.structure.WarHub;
|
import com.tommytony.war.structure.WarHub;
|
||||||
|
import com.tommytony.war.utility.Direction;
|
||||||
|
|
||||||
public class WarYmlMapper {
|
public class WarYmlMapper {
|
||||||
|
|
||||||
@ -147,17 +148,21 @@ public class WarYmlMapper {
|
|||||||
String orientationStr = "";
|
String orientationStr = "";
|
||||||
switch (hub.getOrientation()) {
|
switch (hub.getOrientation()) {
|
||||||
case SOUTH:
|
case SOUTH:
|
||||||
orientationStr = "south";
|
if (Direction.isLegacy) orientationStr = "south";
|
||||||
|
else orientationStr = "west"; // temp fix for rotating warhub
|
||||||
break;
|
break;
|
||||||
case EAST:
|
case EAST:
|
||||||
orientationStr = "east";
|
if (Direction.isLegacy) orientationStr = "east";
|
||||||
|
else orientationStr = "south";
|
||||||
break;
|
break;
|
||||||
case NORTH:
|
case NORTH:
|
||||||
orientationStr = "north";
|
if (Direction.isLegacy) orientationStr = "north";
|
||||||
|
else orientationStr = "east";
|
||||||
break;
|
break;
|
||||||
case WEST:
|
case WEST:
|
||||||
default:
|
default:
|
||||||
orientationStr = "west";
|
if (Direction.isLegacy) orientationStr = "west";
|
||||||
|
else orientationStr = "north";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import org.bukkit.block.BlockFace;
|
|||||||
|
|
||||||
public class Direction {
|
public class Direction {
|
||||||
|
|
||||||
private static boolean isLegacy = BlockFace.NORTH.getModX() == -1;
|
public final static boolean isLegacy = BlockFace.NORTH.getModX() == -1;
|
||||||
|
|
||||||
public static BlockFace NORTH() {
|
public static BlockFace NORTH() {
|
||||||
if (!isLegacy) {
|
if (!isLegacy) {
|
||||||
|
Loading…
Reference in New Issue
Block a user