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 By: Andrew Ardill <andrew.ardill@gmail.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user