use 32 chunks for opped players
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
package cc.fascinated.renderdistance;
|
||||
|
||||
import cc.fascinated.account.Account;
|
||||
import cc.fascinated.config.Lang;
|
||||
import cc.fascinated.utils.Manager;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
|
||||
public class RenderDistanceManager extends Manager {
|
||||
|
||||
private final int RENDER_DISTANCE = 32;
|
||||
|
||||
@Override
|
||||
public void onPlayerJoin(Account account, PlayerJoinEvent event) {
|
||||
if (!account.isOp()) {
|
||||
return;
|
||||
}
|
||||
|
||||
account.getPlayer().setViewDistance(RENDER_DISTANCE);
|
||||
account.sendMessage(Lang.RENDER_DISTANCE_MESSAGE.getAsString()
|
||||
.replace("%distance%", RENDER_DISTANCE + "")
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user