File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/main/java/me/wyzebb/playerviewdistancecontroller/utility Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,13 @@ public static void optimisePing(Player player) {
3535 maxAllowed = Math .min (playerDataHandler .getChunksOthers (), luckpermsDistance );
3636 }
3737
38- int pingOptimisedChunks = comparePingToConfig (maxAllowed , player .getPing ());
38+ int pingOptimisedChunks = Math .max (maxAllowed , plugin .getPingOptimiserConfig ().getInt ("min" ));
39+ pingOptimisedChunks = Math .min (pingOptimisedChunks , plugin .getPingOptimiserConfig ().getInt ("max" ));
40+
41+ pingOptimisedChunks = comparePingToConfig (pingOptimisedChunks , player .getPing ());
3942
4043 if (dynamicModeEnabled ) {
41- pingOptimisedChunks = comparePingToConfig (maxAllowed - dynamicReducedChunks , player .getPing ());
44+ pingOptimisedChunks = comparePingToConfig (pingOptimisedChunks - dynamicReducedChunks , player .getPing ());
4245 }
4346
4447 if (pingOptimisedChunks == 1000 ) {
@@ -47,9 +50,6 @@ public static void optimisePing(Player player) {
4750 return ;
4851 }
4952
50- pingOptimisedChunks = Math .max (pingOptimisedChunks , plugin .getPingOptimiserConfig ().getInt ("min" ));
51- pingOptimisedChunks = Math .min (pingOptimisedChunks , plugin .getPingOptimiserConfig ().getInt ("max" ));
52-
5353 if (dynamicModeEnabled && (maxAllowed - dynamicReducedChunks != pingOptimisedChunks )) {
5454 DataProcessorUtility .processPingChunks (player , pingOptimisedChunks );
5555 return ;
You can’t perform that action at this time.
0 commit comments