Removed trailing whitespaces.
This commit is contained in:
@@ -36,16 +36,16 @@ public abstract class LocalPlayer {
|
||||
* Server.
|
||||
*/
|
||||
protected ServerInterface server;
|
||||
|
||||
|
||||
/**
|
||||
* Construct the object.
|
||||
*
|
||||
*
|
||||
* @param server
|
||||
*/
|
||||
protected LocalPlayer(ServerInterface server) {
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the player is holding a pick axe.
|
||||
*
|
||||
@@ -95,10 +95,10 @@ public abstract class LocalPlayer {
|
||||
++y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the player on the ground.
|
||||
*
|
||||
*
|
||||
* @param searchPos
|
||||
*/
|
||||
public void setOnGround(WorldVector searchPos) {
|
||||
@@ -153,7 +153,7 @@ public abstract class LocalPlayer {
|
||||
++spots;
|
||||
if (spots == 2) {
|
||||
int type = world.getBlockType(new Vector(x, y - 2, z));
|
||||
|
||||
|
||||
// Don't get put in lava!
|
||||
if (type == BlockID.LAVA || type == BlockID.STATIONARY_LAVA) {
|
||||
return false;
|
||||
@@ -204,7 +204,7 @@ public abstract class LocalPlayer {
|
||||
setPosition(new Vector(x + 0.5, y + 1, z + 0.5));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
--y;
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ public abstract class LocalPlayer {
|
||||
|
||||
/**
|
||||
* Ascend to the ceiling above.
|
||||
*
|
||||
*
|
||||
* @param clearance
|
||||
* @return whether the player was moved
|
||||
*/
|
||||
@@ -230,7 +230,7 @@ public abstract class LocalPlayer {
|
||||
int y = Math.max(0, pos.getBlockY() + 2);
|
||||
int z = pos.getBlockZ();
|
||||
LocalWorld world = getPosition().getWorld();
|
||||
|
||||
|
||||
// No free space above
|
||||
if (world.getBlockType(new Vector(x, y, z)) != 0) {
|
||||
return false;
|
||||
@@ -308,7 +308,7 @@ public abstract class LocalPlayer {
|
||||
/**
|
||||
* Get the point of the block being looked at. May return null.
|
||||
* Will return the farthest away air block if useLastBlock is true and no other block is found.
|
||||
*
|
||||
*
|
||||
* @param range
|
||||
* @param useLastBlock
|
||||
* @return point
|
||||
@@ -366,7 +366,7 @@ public abstract class LocalPlayer {
|
||||
|
||||
/**
|
||||
* Returns direction according to rotation. May return null.
|
||||
*
|
||||
*
|
||||
* @param rot
|
||||
* @return
|
||||
*/
|
||||
@@ -468,38 +468,38 @@ public abstract class LocalPlayer {
|
||||
boolean firstBlock = true;
|
||||
int freeToFind = 2;
|
||||
boolean inFree = false;
|
||||
|
||||
|
||||
while ((block = hitBlox.getNextBlock()) != null) {
|
||||
boolean free = BlockType.canPassThrough(world.getBlockType(block));
|
||||
|
||||
|
||||
if (firstBlock) {
|
||||
firstBlock = false;
|
||||
|
||||
|
||||
if (!free) {
|
||||
--freeToFind;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
++searchDist;
|
||||
if (searchDist > 20) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (inFree != free) {
|
||||
if (free) {
|
||||
--freeToFind;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (freeToFind == 0) {
|
||||
setOnGround(block);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
inFree = free;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -551,29 +551,29 @@ public abstract class LocalPlayer {
|
||||
|
||||
/**
|
||||
* Get a player's list of groups.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract String[] getGroups();
|
||||
|
||||
|
||||
/**
|
||||
* Get this player's block bag.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract BlockBag getInventoryBlockBag();
|
||||
|
||||
|
||||
/**
|
||||
* Checks if a player has permission.
|
||||
*
|
||||
*
|
||||
* @param perm
|
||||
* @return
|
||||
*/
|
||||
public abstract boolean hasPermission(String perm);
|
||||
|
||||
|
||||
/**
|
||||
* Open a file open dialog.
|
||||
*
|
||||
*
|
||||
* @param extensions null to allow all
|
||||
* @return
|
||||
*/
|
||||
@@ -581,10 +581,10 @@ public abstract class LocalPlayer {
|
||||
printError("File dialogs are not supported in your environment.");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Open a file save dialog.
|
||||
*
|
||||
*
|
||||
* @param extensions null to allow all
|
||||
* @return
|
||||
*/
|
||||
@@ -592,24 +592,24 @@ public abstract class LocalPlayer {
|
||||
printError("File dialogs are not supported in your environment.");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the player can destroy bedrock.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean canDestroyBedrock() {
|
||||
return hasPermission("worldedit.override.bedrock");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send a CUI event.
|
||||
*
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
public void dispatchCUIEvent(CUIEvent event) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send the CUI handshake.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user