Interface for changing the view distance.

Can be changed server wide, per world and per player.
Only server wide changes are kept between server restarts.

Setting the server or world view distance should fail if the
view distance is not between 3 and 15
This commit is contained in:
Andrew Ardill
2011-08-12 00:19:52 +10:00
parent 7f12385332
commit 362f1163d0
3 changed files with 83 additions and 15 deletions

View File

@@ -300,4 +300,25 @@ public interface Player extends HumanEntity, CommandSender {
*/
public void resetPlayerTime();
/**
* Set the view distance for this player.
* View distance will remain constant, even between worlds, until it is changed or reset to default.
* @param viewDistance the number of chunks this player can see.
*/
void setViewDistance(int viewDistance);
/**
* @return the number of chunks this player can see
*/
int getViewDistance();
/**
* Set this players view distance back to the same as whichever world they are on.
*/
void resetViewDistance();
/**
* @return if the view distance has been set for this player specifically.
*/
boolean isViewDistanceSet();
}