Dantevg / WebStats

Spigot plugin to display the scoreboard, PlaceholderAPI and other plugin statistics on the web
https://dantevg.nl/mods-plugins/WebStats
MIT License
19 stars 10 forks source link

No data displayed #100

Closed josuens closed 2 weeks ago

josuens commented 2 weeks ago

I installed the WebStats plugin, and it installed correctly, I changed the default port but it doesn't show data, I have the default parameters, I don't know if I need some extra plugin or something else.

Captura de pantalla 2024-08-23 223615

# Configuration file for WebStats
# See https://github.com/Dantevg/WebStats/wiki/Config-file for more info

# Port to use for the web server. Make sure that this port corresponds
# to the one set in the web page js script.
port: 8124

# A list of tables to show on the webpage. Default is to show a single unnamed
# table which contains all columns, sorted by player name in ascending order.
tables:
  - # The name of the table. This will be displayed above it on the webpage.
    # Leave empty for no title / name.
    name:

    # Only these columns will appear, in the order specified.
    # When commented out, all columns will be displayed, in alphabetical order (default).
    # The 'Player' column will always be displayed, as the first column.
    #columns: [Mine Diamond, Biome, Deaths]

    # Which column to sort by
    #sort-column: Player

    # Whether to sort ascending (smallest first) or descending (largest first)
    #sort-direction: ascending

# These columns will not be displayed on individual player's rows, but on a
# separate 'Server' row.
server-columns: []

# When displaying the server row defined above, use this name instead of "Server".
# You can use PlaceholderAPI placeholders here. (uncomment to use)
#server-name: ""

# Specify the unit in which data from a column is *stored*. WebStats will use
# this information to automatically adjust the *displayed* units.
# Units you can use here:
# - time (duration, not wall clock time): milliseconds/ms, ticks, seconds/s, minutes/min, hours/h, days/d
# - distance: blocks/metres/meters/m, kilometres/kilometers/km
# - date: formatted date, timestamp
# - item count: items, items16 (for 16-stackables)
column-units:
#  Column Name: source unit

# HTTPS configuration. Uncomment to enable HTTPS.
# See https://github.com/Dantevg/WebStats/wiki/HTTPS for how to set up.
#https:
#  # The path to the keystore file, relative to the plugin config folder.
#  keystore-file: webstats.p12
#  # The password of the keystore file.
#  keystore-password: ""

# Whether to store IP to player name mapping in 'ip-to-names.yml',
# used for matching your IP to your player name
store-player-ips: true

# Whether to keep old statistics in stats.csv when executing '/webstats export'.
# Disabling this will override older saved statistics in stats.csv when exporting.
export-cumulative: true

# The interval in which to export all stats to stats.csv, in minutes.
# Set to 0 to disable (default).
export-interval: 0

# Whether to also serve the web page from within the plugin. (not only the stats)
# Disable this when you want to use your own external web server, enable this
# when you do not have one.
serve-webpage: true

# A list of additional files to serve (index.html, WebStats-dist.js etc. are
# implicitly part of this list). For this list to have effect, `serve-webpage`
# must be enabled in the config. Paths are relative to `plugins/WebStats/web/`.
additional-resources: []

# When serve-webpage is enabled, this is the tab title of the webpage.
#webpage-title: "Pachavice"

# Scoreboard objectives to use. When '*' is present, uses all objectives.
# (make sure to enclose the '*' in quotes)
objectives:
  - '*'

# Database credentials for MySQL database connectivity and placeholder storage
#database:
#  hostname: localhost
#  username: DATABASE USERNAME
#  password: DATABASE PASSWORD
#  config: # uncomment from here to use MySQL database connectivity
#    - database: DATABASE NAME
#      table: TABLE NAME
#      convert: # Some examples, refer to documentation for explanations
#        - [rename, from-column, to-column]
#        - [json, column]
#        - [key-value, key-column, value-column]
#        - [uuid, column]

# Configuration for the PlaceholderAPI connectivity (uncomment to use)
# If you want to use a `.`, you need to replace it by `[dot]`
# placeholders:
#   '%placeholder_name%': displayed name

# Set to true to store placeholders in a file, for when players go offline. (uncomment to use)
# Mutually exclusive with `store-placeholders-database`
store-placeholders-in-file: true

# Alternatively, the database name to store placeholders in. (uncomment to use)
# Make sure to specify the database hostname, username and password above
# Mutually exclusive with `store-placeholders-in-file`
#store-placeholders-database: WebStats_placeholders

# Configuration for the Discord webhook function (uncomment to use)
# Make sure to set the webhook URL
#discord-webhook:
#  # The webhook URL. Get this from Discord
#  url: ""
#  
#  # The update interval, in minutes
#  update-interval: 5
#  
#  # Show the top n rows/players
#  display-count: 10
#  
#  # Message title, text to be displayed before the embeds
#  title:
#  
#  # Disable if you want to set your own icon and name in Discord's settings.
#  # When enabled, WebStats will provide its own name and icon for the webhook.
#  override-icon-and-name: true
#  
#  # Each item in this list is one embed
#  embeds:
#    - # The title of the embed. Leave empty for no title
#      title:
#      
#      # Which column to sort by
#      sort-column: Player
#      
#      # Whether to sort ascending (smallest first) or descending (largest first)
#      sort-direction: ascending
#      
#      # Which columns to display. Defaults to using the columns defined at the
#      # top of this file in a single embed, or all columns otherwise.
#      # Note that Discord displays max 3 columns next to each other (including
#      # the "Player" column which is always present)
#      columns: [Deaths]
#      
#      # A further example
#    - title: Best miners
#      sort-column: Mine All Diamond
#      sort-direction: ascending
#      columns: [Mine All Diamond, Mine Ancient Debris]

# Whether to save placeholders before any plugins are disabled on server shutdown
# This is a fix for error "java.lang.IllegalStateException: zip file closed."
# You can leave this off if you don't experience this error.
save-placeholders-on-plugin-disable: false
Dantevg commented 2 weeks ago

By default it gathers all scoreboard statistics that are present (that's the objectives: - '*' part). These are different from the client-side statistics screen, you need to have some plugin or datapack that creates them. If you don't have anything installed, then the webpage will be empty like you have.

josuens commented 2 weeks ago

@Dantevg and what plugin do you recommend?

Dantevg commented 2 weeks ago

We use the VanillaTweaks "Track (raw) statistics" datapacks on our server. It adds a lot of scoreboard objectives, for instance for deaths, kills, blocks mined etc.