String index out of range error
zachthedev opened this issue · 4 comments
Problem
See console error below
Details
Plugin version: 5.4.9
Software version:
Paper Build 288
MC 1.16.4
Relevant plugins:
AFKPlus, ChatItemDisplay, dynmap*, eBackup, FastChunkPregenerator, HexNicks, LuckPerms, OpenInv, PlugMan, ProtocolLib, ServerListPlus, SpectatorMode, Sudo*, ViaBackwards, ViaVersion, WarpSystem, WorldEdit
Console error
[23:47:35 WARN]: [TabList] Plugin TabList v5.4.9 generated an exception while executing task 651 [2345/4935]
java.lang.StringIndexOutOfBoundsException: String index out of range: 5
at java.lang.String.substring(String.java:1963) ~[?:1.8.0_275]
at hu.montlikadani.tablist.bukkit.utils.operators.OperatorNodes.parse(OperatorNodes.java:113) ~[?:?]
at hu.montlikadani.tablist.bukkit.utils.Variables.parseExpression(Variables.java:310) ~[?:?]
at hu.montlikadani.tablist.bukkit.utils.Variables.formatTPS(Variables.java:303) ~[?:?]
at hu.montlikadani.tablist.bukkit.utils.Variables.tpsDot(Variables.java:281) ~[?:?]
at hu.montlikadani.tablist.bukkit.utils.Variables.replaceVariables(Variables.java:226) ~[?:?]
at hu.montlikadani.tablist.bukkit.tablist.TabHandler.sendTab(TabHandler.java:308) ~[?:?]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_275]
at hu.montlikadani.tablist.bukkit.tablist.TabManager.lambda$0(TabManager.java:71) ~[?:?]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:99) ~[patched_1.16.4.jar:git-Paper-288]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.4.jar:git-Paper-288]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.4.jar:git-Paper-288]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_275]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_275]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]
Configuration file(s)
configuration file:
tablist.yml
config.yml
@montlikadani That fixed it!
One small thing, when the tps is at 20, it doesn't have two decimals, so when it goes to 19.99, the tablist gets wider.
Any way to force it to always be at two decimals?
@montlikadani That worked!
Thanks so much, you are doing awesome work, keep it up man.
You can download the fixed version from here: https://github.com/montlikadani/TabList/actions/runs/377467697
In the Artifacts section