Removing unused wars

This commit is contained in:
Tim Düsterhus 2011-07-17 10:22:27 +02:00
parent ba1a0fef3a
commit 38b93ce16d

View File

@ -15,9 +15,9 @@ import com.tommytony.war.volumes.BlockInfo;
import com.tommytony.war.volumes.Volume;
/**
*
* @author tommytony
*
*
* @author tommytony, Tim Düsterhus
* @package com.tommytony.war
*/
public class WarHub {
private final War war;
@ -31,7 +31,7 @@ public class WarHub {
this.location = location;
this.volume = new Volume("warhub", war, location.getWorld());
if (hubOrientation.equals("south")) {
this.setOrientation(BlockFace.SOUTH);
this.setOrientation(BlockFace.SOUTH);
} else if (hubOrientation.equals("north")) {
this.setOrientation(BlockFace.SOUTH);
} else if (hubOrientation.equals("east")) {
@ -39,7 +39,7 @@ public class WarHub {
} else {
this.setOrientation(BlockFace.WEST);
}
}
// Use when creating from player location (with yaw)
@ -47,7 +47,7 @@ public class WarHub {
this.war = war;
this.location = location;
this.volume = new Volume("warhub", war, location.getWorld());
setLocation(location);
}
@ -64,20 +64,16 @@ public class WarHub {
} else {
yaw = (int) (360 + (location.getYaw() % 360));
}
BlockFace facing = null;
BlockFace opposite = null;
if ((yaw >= 0 && yaw < 45) || (yaw >= 315 && yaw <= 360)) {
facing = BlockFace.WEST;
opposite = BlockFace.EAST;
} else if (yaw >= 45 && yaw < 135) {
facing = BlockFace.NORTH;
opposite = BlockFace.SOUTH;
} else if (yaw >= 135 && yaw < 225) {
facing = BlockFace.EAST;
opposite = BlockFace.WEST;
} else if (yaw >= 225 && yaw < 315) {
facing = BlockFace.SOUTH;
opposite = BlockFace.NORTH;
}
this.setOrientation(facing);
}
@ -112,7 +108,7 @@ public class WarHub {
int halfHubWidth = hubWidth / 2;
int hubDepth = 6;
int hubHeigth = 4;
BlockFace left;
BlockFace right;
BlockFace front = this.getOrientation();
@ -193,32 +189,26 @@ public class WarHub {
public void resetZoneSign(Warzone zone) {
BlockFace left;
BlockFace right;
BlockFace front = this.getOrientation();
BlockFace back;
byte data;
if (this.getOrientation() == BlockFace.SOUTH) {
data = (byte) 4;
left = BlockFace.EAST;
right = BlockFace.WEST;
back = BlockFace.NORTH;
} else if (this.getOrientation() == BlockFace.NORTH) {
data = (byte) 12;
left = BlockFace.WEST;
right = BlockFace.EAST;
back = BlockFace.SOUTH;
} else if (this.getOrientation() == BlockFace.EAST) {
data = (byte) 0;
left = BlockFace.NORTH;
right = BlockFace.SOUTH;
back = BlockFace.WEST;
} else {
data = (byte) 8;
left = BlockFace.SOUTH;
right = BlockFace.NORTH;
back = BlockFace.EAST;
}
Block zoneGate = this.zoneGateBlocks.get(zone.getName());
Block block = zoneGate.getFace(left).getFace(back, 1);
if (block.getType() != Material.SIGN_POST) {