A plugin which holds certificates that award players who pass them.


Commands ([] - optional ; <> - required):
  - /certificates help - Shows a friendly command help menu
  - /certificates clearCertificates [player] - Clears certificates of the sender or specified player (if such)
  - /certificates list [player] - Lists all the certificates the command sender or specified player (if such) has obtained
  - /certificates loadedCertificates - Lists the currently loaded certificates to the command sender
  - /certificates reload - Reloads the plugin configuration and certificates
  - /certificates take <certificate> - The command sender will be prompted to take the by them specified certificate (<certificate> being either a certificate name or certificate id)

Permissions (if a command has a next line with an argument and a permission it means both permissions are required):
  - /certificates clearCertificates - certificates.command.clearCertificates
  - /certificates clearCertificates [player] - certificates.command.clearCertificates.player
  - /certificates list - certificates.command.list
  - /certificates list [player] - certificates.command.list.player
  - /certificates loadedCertificates - certificates.command.listLoaded
  - /certificates reload - certificates.command.reload
  - /certificates take <certificate> - certificates.command.take
  - /certificates help -

At the time of writing this (version 1.0.0-SNAPSHOT), currently the only way to store certificate pass data is by a file in the plugin's directory. But don't worry, other ways of storing data are planned!

Default configuration:

# Certificates by MrIvanPlays

# How will the plugin store data?
# Currently the only supported way is 'flatfile', so this config option will be in action
# once more storage types are added
storage-type: "flatfile"

# Common words if translation is needed
  no: "No"
  seconds: "seconds"
  hours: "hours"
  hour: "hour"
  minutes: "minutes"
  yes: "Yes"
  days: "days"
  day: "day"
  second: "second"
  minute: "minute"

# All configurable messages
# Messages support the "MiniMessage" format and do NOT support the legacy format (e.g. '&c')
  certificatesListNoPassed: "<yellow>Unfortunately, it seems like you didn't pass any certificates."
  playerOnly: "<red>This command is player only!"
  # The unknown player message has the only exception for placeholders - that is, the placeholder
  # 'input' is not with the <> brackets but with the {} brackets.
  invalidPlayer: "<red>Unknown player {input}"
  # The no permission message is used for extremely exceptional cases (where the command
  # framework Certificates uses we cannot specify the permission directly).
  noPermission: "<red>You don't have permission to perform this command!"
  certificatesListEntry: "<yellow> - <green><certificate>"
  wrongAnswer: "<yellow>Sorry, but that's a wrong answer. Can you try again? <tryagain>. Time left before you can try again: <time>"
  cooldownNotExpired: "<red>The cooldown for <certificate> has not expired. Please try again in <time>"
  invalidCertificate: "<red>Invalid certificate <certificate>"
  certificatePassed: "<green>Certificate <certificate> has been passed successfully!"
  reloadSuccessful: "<green>Configurations reloaded successfully!"
  loadedCertificates: "<green>Loaded certificates: <certificates>"
  taken: "<yellow>The certificate <certificate> has already been taken by you and cannot be taken again."
  problemWithCertificate: "<yellow>There's a problem with this certificate. Please contact staff. Sorry for the inconvenience!"
  clearedCertificates: "<green>Successfully cleared certificates for <player>"
  certificatesList: "<yellow>List of all the obtained certificates by <player>:"

Default certificate:

# This is the default certificate (could also be used as an example)

# Certificate name (optional)
name: "Default certificate"

# A list of commands for rewards to give to the player (optional)
# Available placeholders: %player%
  - "eco give %player% 1000"

# A cool down before they can try pass the certificate again (optional)
# This is not necessary to specify if 'can-be-taken-again-if-failed' is false
# Format is: "<number>d|m|h|s" where:
# - "d" stands for days
# - "m" stands for minutes
# - "h" stands for hours
# - "s" stands for seconds
# Any other format will be counted as no countdown, with the possibility of the console yielding a warning.
coolDown: "24h"

# A way to make this certificate obtainable by players which previously failed.
can-be-taken-again-if-failed: true

# Questions that are going to be asked whenever a player is trying to get the certificate.
# Messages support the "MiniMessage" format and do NOT support the legacy format (e.g. '&c')
  - message: "Do you like playing on this server?" # The question that is going to be asked
    id: "serv-playing" # Question id
    timeout: "30s" # After how much time we shall end the conversation if this question doesn't get answered? (optional)
    answers: # The answers we expect from the player. Everything else is counted as wrong. How they're cased does not matter
      - "Yes"
      - "Yes."
      - "Yep"
      - "Yep."
      - "True"
      - "True."
  - message: "Do you approve staff's decisions?"
    id: "approve-staff"
    timeout: "45s"
      - "I do"
      - "I do."