Dantevg/WebStats

There's nothing on the page except: Compact Hide offline players Prev Next

valenvaio opened this issue · 2 comments

This server is running Purpur version git-Purpur-1449 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: 91e3be5 on HEAD)

There's nothing on the page except:
Compact Hide offline players Prev Next

An error appears in the console:
[20:18:56 WARN]: Exception in thread "WebStats" java.lang.IllegalStateException: @NotNull method nl/dantevg/webstats/placeholder/PlaceholderStorer.getScore must not return null
[20:18:56 WARN]: at WebStats-1.6.0.jar//nl.dantevg.webstats.placeholder.PlaceholderStorer.$$$reportNull$$$0(PlaceholderStorer.java)
[20:18:56 WARN]: at WebStats-1.6.0.jar//nl.dantevg.webstats.placeholder.PlaceholderStorer.getScore(PlaceholderStorer.java:158)
[20:18:56 WARN]: at WebStats-1.6.0.jar//nl.dantevg.webstats.placeholder.PlaceholderSource.lambda$getScores$0(PlaceholderSource.java:64)
[20:18:56 WARN]: at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)
[20:18:56 WARN]: at WebStats-1.6.0.jar//nl.dantevg.webstats.placeholder.PlaceholderSource.getScores(PlaceholderSource.java:56)
[20:18:56 WARN]: at WebStats-1.6.0.jar//nl.dantevg.webstats.placeholder.PlaceholderSource.getStats(PlaceholderSource.java:90)
[20:18:56 WARN]: at WebStats-1.6.0.jar//nl.dantevg.webstats.Stats.getStats(Stats.java:23)
[20:18:56 WARN]: at WebStats-1.6.0.jar//nl.dantevg.webstats.Stats.getAll(Stats.java:34)
[20:18:56 WARN]: at WebStats-1.6.0.jar//nl.dantevg.webstats.HTTPConnection.route(HTTPConnection.java:50)
[20:18:56 WARN]: at WebStats-1.6.0.jar//nl.dantevg.webstats.HTTPConnection.start(HTTPConnection.java:25)
[20:18:56 WARN]: at WebStats-1.6.0.jar//nl.dantevg.webstats.WebStats.run(WebStats.java:115)
[20:18:56 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)

The plugin gets the information and writes it to SQL

webstats debug
[20:24:11 INFO]: WebStats 1.6.0
Active sources: scoreboard, PlaceholderAPI
Thread status: dead
Socket status: open
Placeholder storer database connection: connected
Loaded placeholders:
81ada1cc-0334-4d7d-8806-0e8e78cc2a7f (Fandorin): balance = 823.3333333333333
81ada1cc-0334-4d7d-8806-0e8e78cc2a7f (Fandorin): displayed name = Fandorin
81ada1cc-0334-4d7d-8806-0e8e78cc2a7f (Fandorin): uuid = 81ada1cc-0334-4d7d-8806-0e8e78cc2a7f

Config:

port: 8989
columns: [uuid, balance]
objectives:

  • '*'
    database:
    hostname: localhost:3306
    username: MineFS_WebStat
    password: xxxxxxx
    placeholders:
    '%cmi_user_name%': displayed name
    '%cmi_user_uuid%': uuid
    '%cmi_user_balance%': balance
    store-placeholders-database: MineFS_WebStat

Thank you for the extensive bug report! I can see where I went wrong, didn't test it properly... Will see whether I can release a fixed version "tomorrow" 😀

Happy new year btw 😄

Should be fixed in the latest version, thanks again!