Code Monkey home page Code Monkey logo

bestviewdistance's People

Contributors

graywolf336 avatar lxct avatar sgdc3 avatar sofianedjerbi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bestviewdistance's Issues

ClassCastException: class org.bukkit.craftbukkit.v1_13_R2.CraftWorld cannot be cast to class com.sk89q.worldedit.world.World

Paper dev 588 (Spigot 1.13.2)
BestViewDistance compiled as of commit 8e335e8
WorldGuard dev 1828
WorldEdit dev 4106

Config
https://paste.ubuntu.com/p/prQjMy2Qvk/

This error is spamming for every player who logs in and moves.

[13:56:21] [Craft Scheduler Thread - 124/WARN]: [BestViewDistance] Plugin BestViewDistance v11.9 generated an exception while executing task 143
java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_13_R2.CraftWorld cannot be cast to class com.sk89q.worldedit.world.World (org.bukkit.craftbukkit.v1_13_R2.CraftWorld is in unnamed module of loader 'app'; com.sk89q.worldedit.world.World is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @24c03b1e)
	at me.lxct.bestviewdistance.functions.hooks.WorldGuardHook.getPlayerRegions(WorldGuardHook.java:21) ~[?:?]
	at me.lxct.bestviewdistance.functions.BVDPlayer.getCurrentMaxLimit(BVDPlayer.java:98) ~[?:?]
	at me.lxct.bestviewdistance.functions.BVDPlayer.setScheduledViewDistance(BVDPlayer.java:149) ~[?:?]
	at me.lxct.bestviewdistance.functions.util.Calculations.calculatePlayersBestViewDistance(Calculations.java:35) ~[?:?]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.13.2.jar:git-Paper-588]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-588]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-588]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

generated an exception

[20:56:40] [Server thread/INFO]: Severu[/127.0.0.1:57192] logged in with entity id 30 at ([world]118.0, 63.0, 143.0) [20:56:46] [Craft Scheduler Thread - 50/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:56:57] [Craft Scheduler Thread - 56/INFO]: [AuthMe] Severu logged in! [20:56:57] [Server thread/INFO]: [AuthMe] Severu registered 127.0.0.1 [20:57:00] [Craft Scheduler Thread - 52/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:57:15] [Craft Scheduler Thread - 56/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:57:30] [Craft Scheduler Thread - 52/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:57:31] [Server thread/WARN]: [CraftBook] Warning! You have no mechanics enabled, the plugin will appear to do nothing until a feature is enabled! [20:57:45] [Craft Scheduler Thread - 52/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:58:00] [Craft Scheduler Thread - 57/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:58:16] [Craft Scheduler Thread - 52/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:58:31] [Craft Scheduler Thread - 57/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:58:46] [Craft Scheduler Thread - 58/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:59:01] [Craft Scheduler Thread - 52/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:59:16] [Craft Scheduler Thread - 59/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191] [20:59:31] [Craft Scheduler Thread - 58/WARN]: [BestViewDistance] Plugin BestViewDistance v6.1 generated an exception while executing task 74 java.lang.NoSuchMethodError: org.bukkit.entity.Player.getClientViewDistance()I at me.lxct.bestviewdistance.functions.Get.getViewDistance(Get.java:28) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setClientSettingLimit(Set.java:29) ~[?:?] at me.lxct.bestviewdistance.functions.Set.setPlayersBestViewDistance(Set.java:77) ~[?:?] at me.lxct.bestviewdistance.BestViewDistance.lambda$new$0(BestViewDistance.java:93) ~[?:?] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.2.jar:git-Paper-411] at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-411] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-411] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_191] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_191] at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]

NullPointerException: null at start-up when loading NPCs.

Paper dev 588 (Spigot 1.13.2)
BestViewDistance compiled as of commit 8e335e8

This exception occurs at start-up for every NPC loaded with Citizens. Need to ignore all players with the meta 'NPC' from affecting view distance checks?

Config
https://paste.ubuntu.com/p/prQjMy2Qvk/

[13:48:32] [Server thread/ERROR]: Could not pass event PlayerTeleportEvent to BestViewDistance v11.9
java.lang.NullPointerException: null
	at me.lxct.bestviewdistance.event.OnTeleport.onPlayerTeleport(OnTeleport.java:25) ~[?:?]
	at com.destroystokyo.paper.event.executor.StaticMethodHandleEventExecutor.execute(StaticMethodHandleEventExecutor.java:38) ~[patched_1.13.2.jar:git-Paper-588]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.13.2.jar:git-Paper-588]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) ~[patched_1.13.2.jar:git-Paper-588]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:520) ~[patched_1.13.2.jar:git-Paper-588]
	at org.bukkit.craftbukkit.v1_13_R2.entity.CraftPlayer.teleport(CraftPlayer.java:722) ~[patched_1.13.2.jar:git-Paper-588]
	at org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity.teleport(CraftEntity.java:334) ~[patched_1.13.2.jar:git-Paper-588]
	at net.citizensnpcs.npc.CitizensNPC.spawn(CitizensNPC.java:233) ~[?:?]
	at net.citizensnpcs.npc.CitizensNPC.load(CitizensNPC.java:143) ~[?:?]
	at net.citizensnpcs.api.npc.SimpleNPCDataStore.loadInto(SimpleNPCDataStore.java:59) ~[?:?]
	at net.citizensnpcs.Citizens$3.run(Citizens.java:331) ~[?:?]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.13.2.jar:git-Paper-588]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:449) ~[patched_1.13.2.jar:git-Paper-588]
	at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1003) ~[patched_1.13.2.jar:git-Paper-588]
	at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[patched_1.13.2.jar:git-Paper-588]
	at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:938) ~[patched_1.13.2.jar:git-Paper-588]
	at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:836) ~[patched_1.13.2.jar:git-Paper-588]
	at java.lang.Thread.run(Thread.java:834) [?:?]

Chunks Constantly unloading and reloading when afk

Describe the bug
Render distance will drop down to 3 when afk (expected) then will randomly go back up to 16 and load in more chunks when still afk then it will drop back down to 3 and repeat until user is not afk

Paper: 1.13.2 Build 625

Expected behavior
When the user is afk the render distance is brought down to 3 and stays there until the user is no longer afk

Timings
https://timings.aikar.co/?id=65eb239592344fb59e2b89ed6d3d3581

Additional Context
You are able to see this bug visually in 1.8.9 with the chunks unloading and then reloading

1.14.1 console eror

[18:03:22 WARN]: [BestViewDistance] Plugin BestViewDistance v11.9 generated an exception while executing task 4370
org.apache.commons.lang.NotImplementedException: Per-Player View Distance APIs need further understanding to properly implement
at org.bukkit.craftbukkit.v1_14_R1.entity.CraftPlayer.getViewDistance(CraftPlayer.java:1968) ~[patched_1.14.1.jar:git-Paper-42]
at me.lxct.bestviewdistance.functions.Other.applyViewDistance(Other.java:83) ~[?:?]
at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.14.1.jar:git-Paper-42]
at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.14.1.jar:git-Paper-42]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.14.1.jar:git-Paper-42]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

Crash report in new version 12.1

**Describe the bug
I think it happen when player logging in

To Reproduce
Login to server

Expected behavior

Timings

Additional context
Here is the stack trace

me.lxct.bestviewdistance.functions.hooks.ProtocolLibHook$1.onPacketReceiving(ProtocolLibHook.java:26) ~[?:?]
at com.comphenix.protocol.injector.SortedPacketListenerList.invokeReceivingListener(SortedPacketListenerList.java:114) ~[?:?]
at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketRecieving(SortedPacketListenerList.java:67) ~[?:?]
at com.comphenix.protocol.injector.PacketFilterManager.handlePacket(PacketFilterManager.java:590) ~[?:?]
at com.comphenix.protocol.injector.PacketFilterManager.invokePacketRecieving(PacketFilterManager.java:557) ~[?:?]
at com.comphenix.protocol.injector.netty.ProtocolInjector.packetReceived(ProtocolInjector.java:352) ~[?:?]
at com.comphenix.protocol.injector.netty.ProtocolInjector.onPacketReceiving(ProtocolInjector.java:317) ~[?:?]
at com.comphenix.protocol.injector.netty.ChannelInjector.decode(ChannelInjector.java:509) ~[?:?]
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.12.2.jar:git-Paper-1617]
at com.comphenix.protocol.injector.netty.ChannelInjector$2.channelRead(ChannelInjector.java:248) ~[?:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:404) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304) ~[patched_1.12.2.jar:git-Paper-1617]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) ~[patched_1.12.2.jar:git-Paper-1617]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
[18:46:17 ERROR]: Parameters:
net.minecraft.server.v1_12_R1.PacketPlayInSettings@3fb389a2[
a=en_us
b=12
c=FULL
d=true
e=127
f=Right
]

Ghost chunks appearing when flying through a pre-loaded world forcing chunks to load.

BestViewDistance compiled as of commit 8e335e8 with all 5 active pull requests as of 4/4.
Paper dev (Spigot 1.13.2)
ProtocolSupport dev 374

Config
https://paste.ubuntu.com/p/kvhNdtyZ3c/

Flying around in a pre-generate world with /vdist showing I have a full active 16 chunk render distance, I seem to occasionally come across chunk rendering corruptions.

https://imgur.com/a/380YROc

Flying near / through it and rotating my camera around, the corruption flickers. Sometimes the ghost chunk is in large areas, other times it's just a single 1x1 chunk in the middle of nowhere. Teleporting away and back again, the chunks re-send and display perfectly fine.

Many players in my community are also reporting a noticeable occurrence of these ghost chunks since BVD was implemented.

@graywolf336 Do you perhaps have any ideas in how to lessen the impact of these ghost chunks?

UseTeleportView causes ghost chunks rarely and can get stuck forcing to a view distance of 4.

BetterViewDistance compiled as of commit 8e335e8 with all 4 currently active pull requests as of 04/04.

Config
https://paste.ubuntu.com/p/km3H9C24Q5/

With UseTeleportView enabled, I noticed my view distance not expanding on a certain teleport back to spawn.

link

When I turned around, a full 16 chunk distance rendered.
link2

Going to the area in front of me, chunks did not load and were invisible until I broke a block. Upon breaking a block, only a single chunk radius extra rendered. Teleporting away and back, the chunks loaded again.

NullPointerException: null - async.UnsetAfk.run

Paper dev 588 (Spigot 1.13.2)
BestViewDistance compiled as of commit 8e335e8

Config
https://paste.ubuntu.com/p/prQjMy2Qvk/

[23:34:35] [Craft Scheduler Thread - 560/WARN]: [BestViewDistance] Plugin BestViewDistance v11.9 generated an exception while executing task 565545
java.lang.NullPointerException: null
	at me.lxct.bestviewdistance.functions.async.UnsetAfk.run(UnsetAfk.java:16) ~[?:?]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.13.2.jar:git-Paper-597]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-597]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-597]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

Tab-Complete java.lang.ArrayIndexOutOfBoundsException

Describe the bug
Tab Complete Exception

To Reproduce
Steps to reproduce the behavior:
1. Type '/view ping''
2. See Error
image

Version
Plugin: 6.1
Server: git-Paper-440 & git-Paper-441

Error Log

[17:09:36] [Netty Server IO #2/ERROR]: Exception when B4TT3RY__ attempted to tab complete view ping
org.bukkit.command.CommandException: Unhandled exception during tab completion for command '/view ping' in plugin BestViewDistance v6.1
	at org.bukkit.command.PluginCommand.tabComplete(PluginCommand.java:144) ~[patched_1.13.2.jar:git-Paper-440]
	at org.bukkit.command.Command.tabComplete(Command.java:91) ~[patched_1.13.2.jar:git-Paper-440]
	at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:227) ~[patched_1.13.2.jar:git-Paper-440]
	at org.bukkit.craftbukkit.v1_13_R2.CraftServer.tabCompleteCommand(CraftServer.java:1772) ~[patched_1.13.2.jar:git-Paper-440]
	at org.bukkit.craftbukkit.v1_13_R2.CraftServer.tabComplete(CraftServer.java:1744) ~[patched_1.13.2.jar:git-Paper-440]
	at org.bukkit.craftbukkit.v1_13_R2.command.BukkitCommandWrapper.getSuggestions(BukkitCommandWrapper.java:49) ~[patched_1.13.2.jar:git-Paper-440]
	at com.mojang.brigadier.tree.ArgumentCommandNode.listSuggestions(ArgumentCommandNode.java:68) ~[patched_1.13.2.jar:git-Paper-440]
	at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:379) ~[patched_1.13.2.jar:git-Paper-440]
	at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:547) ~[patched_1.13.2.jar:git-Paper-440]
	at net.minecraft.server.v1_13_R2.PacketPlayInTabComplete.a(SourceFile:36) ~[patched_1.13.2.jar:git-Paper-440]
	at net.minecraft.server.v1_13_R2.PacketPlayInTabComplete.a(SourceFile:9) ~[patched_1.13.2.jar:git-Paper-440]
	at net.minecraft.server.v1_13_R2.NetworkManager.a(NetworkManager.java:147) ~[patched_1.13.2.jar:git-Paper-440]
	at net.minecraft.server.v1_13_R2.NetworkManager.a(NetworkManager.java:136) ~[patched_1.13.2.jar:git-Paper-440]
	at net.minecraft.server.v1_13_R2.NetworkManager.channelRead0(NetworkManager.java:358) ~[patched_1.13.2.jar:git-Paper-440]
	at net.minecraft.server.v1_13_R2.NetworkManager.channelRead0(NetworkManager.java:31) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:288) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.13.2.jar:git-Paper-440]
	at com.comphenix.protocol.injector.netty.ChannelInjector$2.channelRead(ChannelInjector.java:248) ~[?:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:647) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:582) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:461) ~[patched_1.13.2.jar:git-Paper-440]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) ~[patched_1.13.2.jar:git-Paper-440]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
	at me.lxct.bestviewdistance.event.OnTabComplete.onTabComplete(OnTabComplete.java:26) ~[?:?]
	at org.bukkit.command.PluginCommand.tabComplete(PluginCommand.java:132) ~[patched_1.13.2.jar:git-Paper-440]
	... 64 more

Entity view distance remains unchanged from server.properties

Describe the bug
Entity (in particular, mobs) view distance remains stuck at server.properties/spigot.yml value of 3 even though player view distance is 12. ie. players cannot see mobs for very far, they pop out of view.

To Reproduce
Steps to reproduce the behavior:
1. Start server with server.properties/spigot.yml view-distance of 3
2. Observe how far you can view mobs before they pop out of view
3. Change this value to 12/16/etc
4. See the view distance for seeing other entities has massively increased

Expected behavior
Mobs should be visible at the same distance as chunks.

Additional context
Possibly the same as #28

Version: BestViewDistance-12.1.jar

ViewDistance OnFlying won't increase

I have set OnFlying ViewDistance (10) to be more than the ViewDistance Max (6) so I can give /fly to people so they can take screenshots, but its not increasing, I assume as it can't be more than the max? but I don't want everyone to have more than 6 max! I just want to increase the fly render distance when people are put into fly. For now I have got around this by using the override permission in a rank that I can temp-set instead, but it would be nice to have the fly functionality. Im using essentailsX for fly (If this makes a difference)

I am using Paper version git-Paper-1596 (MC: 1.12.2)
with BestViewDistance 11.9

Config:
https://gist.github.com/FrozenBeard/b70e663eb70a1e68f7bb48f4776074c7

Chunk distance calculation breaks when teleporting too fast.

Paper dev 598 (Spigot 1.13.2)
ProtocolSupport dev 372
BestViewDistance compiled as of commit 8e335e8

Config
https://paste.ubuntu.com/p/8zGBJJRjMf/

Not sure if it's a symptom due to all the other issues, but noticed that view distance setting sometimes breaks when players teleport too quickly between different areas and worlds. The calculations stop calculating for players and they get stuck at the absolute minimum chunk distance configured.

Unless there is perhaps also an incompatibility with ProtocolSupport? RE: ProtocolSupport/ProtocolSupport#1047 (comment)

BestViewDistance v12 generated an exception while executing task 27

Describe the bug
A message that appears in my console every few seconds.

To Reproduce
Steps to reproduce the behavior:
Turn on the server and look at the console.

Expected behavior
Nothing

Timings
https://timings.aikar.co/?id=afa0f97a84084338a6cb0ba3bd33c6d9

Additional context
[19:17:15 WARN]: [BestViewDistance] Plugin BestViewDistance v12 generated an exception while executing task 27
org.apache.commons.lang.NotImplementedException: Per-Player View Distance APIs need further understanding to properly implement
at org.bukkit.craftbukkit.v1_14_R1.entity.CraftPlayer.getViewDistance(CraftPlayer.java:1989) ~[patched_1.14.3.jar:git-Paper-121]
at me.lxct.bestviewdistance.functions.BVDPlayer.getCurrentViewDistance(BVDPlayer.java:156) ~[?:?]
at me.lxct.bestviewdistance.functions.util.Calculations.applyViewDistance(Calculations.java:54) ~[?:?]
at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.14.3.jar:git-Paper-121]
at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.14.3.jar:git-Paper-121]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.14.3.jar:git-Paper-121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

Latest version has a bug causing some players to be invisible

Describe the bug

Latest version has a bug causing some playewrs to be invisible

To Reproduce

Steps to reproduce the behavior:
1. Join server
2. Join server with a 2nd account and 2nd client
3. Use one of the accounts to look at the other player vice versa
4. See bug

Expected behavior

To not make any players invisible

NullPointerException: null - UnsetTeleport.run

RE: #19

Similar issue to unsetAFK I believe. Error occurred when someone disconnected.

[01:36:25] [Craft Scheduler Thread - 107/WARN]: [BestViewDistance] Plugin BestViewDistance v11.9 generated an exception while executing task 140209
java.lang.NullPointerException: null
	at me.lxct.bestviewdistance.functions.async.UnsetTeleport.run(UnsetTeleport.java:16) ~[?:?]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.13.2.jar:git-Paper-600]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-600]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-600]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

UseTeleportView client lag on UnsetTeleportViewDelay occurrence.

BestViewDistance compiled as of commit 8e335e8 with all 5 active pull requests as of 4/4.
Paper dev (Spigot 1.13.2)
ProtocolSupport dev 374

Config
https://paste.ubuntu.com/p/kvhNdtyZ3c/

I noticed that on each teleport, the client lags after 3 seconds when the UnsetTeleportViewDelay occurs - when raising the teleport view distance from 4 to the full 16. Is there any way to lessen this impact and gradually load a larger view distance? As with this occurrence is a sudden client lag spike 3 seconds after each teleport.

Re-send entities on chunk expansion to prevent invisible players / mobs / entities (i.e. arrows)

BestViewDistance compiled as of commit 8e335e8 with all 5 active pull requests as of 4/8.
Paper dev (Spigot 1.13.2)
ProtocolSupport dev 374

Config
https://paste.ubuntu.com/p/pMH6kFr4RG/

Spigot View Distance: 3

I've been receiving reports of invisible players, mobs, and entities (such as shooting arrows) ever since adding BVD. If it's not done so already, can entities be re-sent to the client when the view distance is expanded to prevent invisible issue?

Add reason Placeholder for /vdist Write reason they are lower than normal

Create a Placeholder to say the reason for their reduction, a category that tells the user why they are currently in that view distance.
%REASON% Could say "TPS/AFK/Login/Fly/Teleport/Ping/Perm"

Players know the normal view distance, but when they are shown lower for teleporting, or just spawning and they instantly do the /vdist im constantly having to explain, can you please re-format /vdist to be better formatted, heres a basic example:

Your current view distance: %VIEWDISTANCE% (%REASON%)
Default view distance by your ping: %PINGVIEW%
Client set view distance: %SETTINGS%
Your view distance is reduced by&d %REDUCTIONINDICE%

Doesn't drop viewdistance

Version: 3.5-SNAPSHOT
Environment: Paperspigot

Scenario: max view distance set to 16, minimum 7. Had roughly 7 players online, and tps stared tanking, dropping as low as 11. Using /view the output stated that viewdistance was dropping for each player including myself, however when I went to a high place, it was obvious that my own viewdistance was still 16, as I could see very far, same as when 1 - 3 players were on and all our viewdistance were still at 16. Before adding this plugin to the server, I've had 15+ players online with viewdistance hardcoded to 9 in the spigot jar, and tps never went as low as 11.

Is it unloading already unloaded chunks? If not, is this possible?

ClassCastException

Versions:

  • WorldEdit v7.0.0-beta-05;6bbf29b
  • BestViewDistance v11.9
  • Paper version git-Paper-588 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)
[15:24:01] [Craft Scheduler Thread - 1/WARN]: [BestViewDistance] Plugin BestViewDistance v11.9 generated an exception while executing task 13
java.lang.ClassCastException: org.bukkit.craftbukkit.v1_13_R2.CraftWorld cannot be cast to com.sk89q.worldedit.world.World
	at me.lxct.bestviewdistance.functions.hooks.WorldGuardHook.getPlayerRegions(WorldGuardHook.java:21) ~[?:?]
	at me.lxct.bestviewdistance.functions.BVDPlayer.getCurrentMaxLimit(BVDPlayer.java:98) ~[?:?]
	at me.lxct.bestviewdistance.functions.BVDPlayer.setScheduledViewDistance(BVDPlayer.java:149) ~[?:?]
	at me.lxct.bestviewdistance.functions.util.Calculations.calculatePlayersBestViewDistance(Calculations.java:35) ~[?:?]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.13.2.jar:git-Paper-588]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-588]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-588]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_201]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_201]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_201]

PlaceholderAPI update.

08.05 06:52:39 [Server] WARN BestViewDistance is currently using a deprecated method to hook into PlaceholderAPI. This will be disabled after the next update. Please consult [Lxct] and urge them to update it ASAP.

I believe PAPI has already been updated, so BestViewDistance is probably not compatible with the new version.

NPE when running /view as a player

[15:41:02 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'view' in plugin BestViewDistance v11.9
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:48) ~[patched_1.13.2.jar:git-Paper-588]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151) ~[patched_1.13.2.jar:git-Paper-588]

        at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:734) ~[patched_1.13.2.jar:git-Paper-588]
        at net.minecraft.server.v1_13_R2.PlayerConnection.handleCommand(PlayerConnection.java:1782) ~[patched_1.13.2.jar:git-Paper-588]
        at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1590) ~[patched_1.13.2.jar:git-Paper-588]
        at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[patched_1.13.2.jar:git-Paper-588]
        at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.13.2.jar:git-Paper-588]
        at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:15) ~[patched_1.13.2.jar:git-Paper-588]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_201]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_201]
        at net.minecraft.server.v1_13_R2.SystemUtils.a(SystemUtils.java:108) ~[patched_1.13.2.jar:git-Paper-588]
        at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1011) ~[patched_1.13.2.jar:git-Paper-588]
        at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[patched_1.13.2.jar:git-Paper-588]
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:938) ~[patched_1.13.2.jar:git-Paper-588]
        at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:836) ~[patched_1.13.2.jar:git-Paper-588]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_201]
Caused by: java.lang.NullPointerException
        at me.lxct.bestviewdistance.functions.util.Misc.replacePlaceHolders(Misc.java:22) ~[?:?]
        at me.lxct.bestviewdistance.commands.Commands.commandHelp(Commands.java:26) ~[?:?]
        at me.lxct.bestviewdistance.commands.ViewCommand.onCommand(ViewCommand.java:19) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[patched_1.13.2.jar:git-Paper-588]
        ... 15 more

Paper 1.14.x errors

Describe the bug
Console errors when join, using command and periodically

To Reproduce
Steps to reproduce the behavior:

  1. Run server with BVD and depencies
  2. Join to server
  3. Wait

Expected behavior
Work without errors

Timings
No need

Additional context
Paper 1.14.3 build 119
BVD dev build 35
Errors: https://pastebin.com/JFkb2PSk

And update dev builds link

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.