Skip to content

Commit

Permalink
Dropped WorldEdit prefix from session and player classes; changed the…
Browse files Browse the repository at this point in the history
…m to "Local".
  • Loading branch information
sk89q committed Jan 1, 2011
1 parent ac4e6e8 commit d534432
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 66 deletions.
4 changes: 2 additions & 2 deletions src/HMPlayer.java
Expand Up @@ -20,7 +20,7 @@
import com.sk89q.worldedit.LocalWorld;
import com.sk89q.worldedit.ServerInterface;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEditPlayer;
import com.sk89q.worldedit.LocalPlayer;
import com.sk89q.worldedit.WorldVector;
import com.sk89q.worldedit.bags.BlockBag;
import com.sk89q.worldedit.blocks.BlockType;
Expand All @@ -29,7 +29,7 @@
*
* @author sk89q
*/
public class HMPlayer extends WorldEditPlayer {
public class HMPlayer extends LocalPlayer {
/**
* Stores the player.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/HMWorldEditListener.java
Expand Up @@ -224,11 +224,11 @@ public void clearSessions() {
* @param player
* @return
*/
public WorldEditSession _bridgeSession(Player player) {
public LocalSession _bridgeSession(Player player) {
return controller.getBridgeSession(wrapPlayer(player));
}

private WorldEditPlayer wrapPlayer(Player player) {
private LocalPlayer wrapPlayer(Player player) {
return new HMPlayer(server, player);
}
}
Expand Up @@ -26,7 +26,7 @@
*
* @author sk89q
*/
public abstract class WorldEditPlayer {
public abstract class LocalPlayer {
/**
* Directions.
*/
Expand All @@ -51,7 +51,7 @@ public enum DIRECTION {
*
* @param server
*/
protected WorldEditPlayer(ServerInterface server) {
protected LocalPlayer(ServerInterface server) {
this.server = server;
}

Expand Down Expand Up @@ -310,7 +310,7 @@ public WorldVector getBlockOn() {
*
* @return
*/
public WorldEditPlayer.DIRECTION getCardinalDirection() {
public LocalPlayer.DIRECTION getCardinalDirection() {
// From hey0's code
double rot = (getYaw() - 90) % 360;
if (rot < 0) {
Expand All @@ -325,25 +325,25 @@ public WorldEditPlayer.DIRECTION getCardinalDirection() {
* @param rot
* @return
*/
private static WorldEditPlayer.DIRECTION getDirection(double rot) {
private static LocalPlayer.DIRECTION getDirection(double rot) {
if (0 <= rot && rot < 22.5) {
return WorldEditPlayer.DIRECTION.NORTH;
return LocalPlayer.DIRECTION.NORTH;
} else if (22.5 <= rot && rot < 67.5) {
return WorldEditPlayer.DIRECTION.NORTH_EAST;
return LocalPlayer.DIRECTION.NORTH_EAST;
} else if (67.5 <= rot && rot < 112.5) {
return WorldEditPlayer.DIRECTION.EAST;
return LocalPlayer.DIRECTION.EAST;
} else if (112.5 <= rot && rot < 157.5) {
return WorldEditPlayer.DIRECTION.SOUTH_EAST;
return LocalPlayer.DIRECTION.SOUTH_EAST;
} else if (157.5 <= rot && rot < 202.5) {
return WorldEditPlayer.DIRECTION.SOUTH;
return LocalPlayer.DIRECTION.SOUTH;
} else if (202.5 <= rot && rot < 247.5) {
return WorldEditPlayer.DIRECTION.SOUTH_WEST;
return LocalPlayer.DIRECTION.SOUTH_WEST;
} else if (247.5 <= rot && rot < 292.5) {
return WorldEditPlayer.DIRECTION.WEST;
return LocalPlayer.DIRECTION.WEST;
} else if (292.5 <= rot && rot < 337.5) {
return WorldEditPlayer.DIRECTION.NORTH_WEST;
return LocalPlayer.DIRECTION.NORTH_WEST;
} else if (337.5 <= rot && rot < 360.0) {
return WorldEditPlayer.DIRECTION.NORTH;
return LocalPlayer.DIRECTION.NORTH;
} else {
return null;
}
Expand Down Expand Up @@ -486,10 +486,10 @@ public void setPosition(Vector pos) {
*/
@Override
public boolean equals(Object other) {
if (!(other instanceof WorldEditPlayer)) {
if (!(other instanceof LocalPlayer)) {
return false;
}
WorldEditPlayer other2 = (WorldEditPlayer)other;
LocalPlayer other2 = (LocalPlayer)other;
return other2.getName().equals(getName());
}

Expand Down
Expand Up @@ -29,7 +29,7 @@
*
* @author sk89q
*/
public class WorldEditSession {
public class LocalSession {
/**
* List of super pick axe modes.
*/
Expand Down Expand Up @@ -326,7 +326,7 @@ public boolean toggleSuperPickAxe() {
* @return position
* @throws IncompleteRegionException
*/
public Vector getPlacementPosition(WorldEditPlayer player)
public Vector getPlacementPosition(LocalPlayer player)
throws IncompleteRegionException {
if (!placeAtPos1) {
return player.getBlockIn();
Expand All @@ -350,7 +350,7 @@ public boolean togglePlacementPosition() {
* @param player
* @return
*/
public BlockBag getBlockBag(WorldEditPlayer player) {
public BlockBag getBlockBag(LocalPlayer player) {
if (!useInventory) {
return null;
}
Expand Down

0 comments on commit d534432

Please sign in to comment.