DiscordPAPIStats icon

DiscordPAPIStats -----

Show your players stats on your Discord server!



DiscordPAPIStats
DiscordPAPIStats is a plugin to allow you to show your players stats on your Discord server using PlaceholderAPI placeholders.

Bot setup
  1. Create a new application at https://discordapp.com/developers/applications/
  2. On the application's page, go to the Bot tab, click Add Bot, and confirm.
  3. Enable the SERVER MEMBERS INTENT option under Privileged Gateway Intents on the bot tab as well.
  4. Click copy button under Token on the bot tab.
  5. Stop your server, and install the plugin then open configuration file.
  6. Paste the bot token you copied earlier into the bot-token value.
  7. Click here and paste your bot's Client ID value to the page.
  8. Done! you're now created & invited a new bot and installed the plugin. You can configurie all settings in configuration file.
Usage
  1. Download your papi expansion if you need it. -> /papi ecloud download <expansion>
    **If you are not familiar with the PlaceholderAPI, you should read this topic**
    https://spigotmc.org/wiki/placeholderapi-tutorial
  2. Create new stats -> /dcstats create <name> <placeholder>
  3. Check it on your Discord server -> .stats <player>
  4. Done!
Commands
  1. /dcstats create <stats name> <placeholder>
  2. /dcstats delete <stats name>
  3. /dcstats setName <stats name> <new name>
  4. /dcstats setPlaceholder <stats name> <new placeholder>
  5. /dcstats filter <stats name>
  6. /dcstats info <player | offline player>
  7. /dcstats list
  8. /dcstats reload
  9. Only one permission required (dcpapistats.admin)
MYSQL support
Thanks to MySQL support, you may want to show the data of more than one server in the same embed message, or you can use it for another purpose.
  1. If you want to show multiple server data in one embed message
    Connect all servers to the same database
  2. If you don't want to show multiple server data in one embed message
    Create a new database for each server on MySQL like: 'discordstats_server1, discordstats_server2'
DiscordSRV support
  • If user's account is linked
[​IMG]

  • If the tagged user's account is linked
[​IMG]
  • Unlinked account
[​IMG]

Without DiscordSRV support
[​IMG]

Per-stats commands
[​IMG]

**DiscordSRV support**
[​IMG]

Config
Code (YAML):
# TOKEN
bot-token
: Your token here.

# Database settings, if set to false, SQLite is used

# 1- If you want to show multiple server data in one embed message
# Connect all servers to the same database

# 2- If you don't want to show multiple server data in one embed message
# Create a new database for each server on MySQL like: 'discordstats_server1, discordstats_server2'
# Otherwise, data may conflict
mysql
:
  enabled
: false
  host
: localhost
  port
: 3306
  database
: discordstats_server1
  username
: root
  password
: 1234
  use-ssl
: false

# The character used to separate the stats name and the stats placeholder
# You may need to use it when necessary
# DO NOT change unless necessary
stats-separator
: ' %'

# Stats added to this list are ignored. (The data are not saved)
stats-filter-list
:
 - 'Example_Stats_Name'

# DO NOT change unless necessary
avatar-api
: 'https://minotar.net/avatar/ {player }'

# Stats command "prefix + command"
stats-command
: '.stats'
stats-command-aliases
:
 - '.mcstats'

# What should display when there is no player data available
no-data-available
: ' ----'

# The online status content of the embed message
online-status
:
  # If player is online, the text to write in the embed message
  online
: Online
  online-image
: 'https://eylexlive.github.io/green.png'
  # If player is offline, the text to write in the embed message
  offline
: Offline
  offline-image
: 'https://eylexlive.github.io/red.png'

# Per-stats commands
# If you enable this option,
# A command is defined for each statistic you add
per-stats-commands
:
  enabled
: false
  command-format
: '.s- {stats_name }'
  embed
:
    description
: ' {stats_name } stats for player ` {player }`'
    author
: ' {online_status }' # It can be editable from above
    color
: gray
    fields
:
     - '** {stats_name }** %VALUE {stats_value}'

# Stats command's embed
stats-embed
:
  description
: 'Stats for player ` {player }`'
  author
: ' {online_status }' # It can be editable from above
  color
: gray
  field-format
: '** {stats_name }** %VALUE {stats_value}'
  custom-fields
:
    # Field limit: 25
    enabled
: false
    fields
:
     - '**Name** %VALUE {player_name}'
      # {stats_Kills_value} = The value of the statistic named Kills.
      - '**Kills** %VALUE {stats_Kills_value}'
      # {stats_Deaths_value} = The value of the statistic named Deaths.
      - '**Deaths** %VALUE {stats_Deaths_value}'

# {nl} = new line
discord-messages
:
  correct-usage
: '> Correct usage : ` {command } <player>`'
  # For DiscordSRV support
  account-unlinked
: '> No account linked to your Discord account. {nl }
   > Correct usage
: ` {command } <player | @mention>`'
  account-unlinked-target
: '> {target }, does not have an account linked to a Discord account.'
[​IMG]
Resource Information
Author:
----------
Total Downloads: 1,607
First Release: Jan 15, 2021
Last Update: May 6, 2021
Category: ---------------
All-Time Rating:
13 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings