View Distance Tweaks
Dynamic per-world view distances, giving a better balance of gameplay and performance.

This plugin will dynamically adjust the view distance of each world in order to meet a condition: You can either set a threshold for the total number of chunks you want to be loaded at any given time, or set thresholds for the server's TPS. You can also set minimum and maximum view distances for each world. In effect, this means higher view distances with lower player counts, and lower view distances with higher player counts.

Installation
To install the plugin simply place the downloaded jar file into your server's plugin directory.

Since different servers have different capabilities / preferences, you will be required to configure the plugin before it is enabled. To configure the plugin, edit the config.yml which is found in the ViewDistanceTweaks folder within your server's plugin directory. When you are happy with the changes you have made you can set the 'enabled' option in the config.yml to true and restart or reload the server.

Compatibility
This plugin will not work with CraftBukkit - you must be using Spigot (or a fork of Spigot). Due to changes in the chunk system, it is not viable to add support to versions under 1.14.

Commands
To access the base command, users will need the viewdistancetweaks.command.vdt permission node.

/vdt reload - Reload the plugin's configuration .
Permission: viewdistancetweaks.vdt.command.reload

/vdt status - Display information about the worlds' view distances and more.
Permission: viewdistancetweaks.vdt.command.status

/vdt set <view distance> [world] [--duration <minutes>] - Set the view distance of the given world (all worlds is not specified) for the given duration.
Permission: viewdistancetweaks.vdt.command.set

/vdt set-no-tick <view distance> [world] [--duration <minutes>] - Set the no-tick view distance of the given world (all worlds is not specified) for the given duration.
Permission: viewdistancetweaks.vdt.command.set-no-tick

Metrics
This plugin uses bStats to collect some (non-identifying) data about the servers running this plugin. You can opt-out by editing the config.yml in the bStats folder located within your server's plugin directory.