Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for NikSne

Authorization system for servers

Report PacketAuth?

Configuration

Client

All configuration is stored in tokens.yml file into config/PacketAuth directory, but I recommend you using token field on the "Add (Edit) server" screen

Server

Default configuration (config.yml)

config.version: "1.6.2"

kick.outdated: "&cYou need &aPacket Auth %version% or never &cto play on this server!"
kick.message: "&cAuthorization error!"
kick.delay: "%ping% + 200"

storage.mode: "file"

tokenDisabling.enabled: "false"

tokengen.enabled: "true"
tokengen.length: "4096"
tokengen.symbols: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"

All possible fields with my comments

# DON'T TOUCH IT!
config.version: "1.6.2"

# You can use placeholder %name% in any message

# Message that's displayed when player don't have compatible mod version. Available placeholders: %name%, %version%
kick.outdated: "&cYou need &aPacket Auth %version% or never &cto play on this server!"
# Message that's displayed when player's token is incorrect
kick.message: "&cAuthorization error!"
# Delay between login and version & token check. If You're having previous messages but your token is valid just increase it
kick.delay: "%ping% + 200"

# These lines are hidden if tokenDisabling.enabled is "false"
# Message that's displayed when player's token is disabled. It'll be displayed in 1st row (by default)
kick.disabled: "&cYour token has been disabled!"
# Message that's displayed when player's token is disabled and reason is given. It'll be displayed in 2nd ro (by default). Available placeholders: %name%, %reason%
kick.disabled.reason: "&cReason: %reason%"
  
  
# Possible types: "file" (default) and "mysql". If you selected "mysql" then you can delete files token.yml and disabled_tokens.yml
storage.mode: "mysql"
# These lines are hidden if storage.mode is "file"
# MySQL server address
storage.mysql.host: "localhost"
# MySQL port
storage.mysql.port: "3306"
# Database name for PacketAuth
storage.mysql.databaseName: "PacketAuth"
# Tokens table name
storage.mysql.tableName: "Tokens"
# MySQL user login. I recommend you creation of user with permissions for just PacketAuth table
storage.mysql.user: "PacketAuth"
# MySQL user password.
storage.mysql.password: "PacketAuthPluginPassword1234"

# This is disabled by default. Allows you to disable any player's token
tokenDisabling.enabled: "true"
# This line is hidden if storage.mode is "file"
# DisabledTokens table name
tokenDisabling.tableName: "disabledTokens"

# If enabled, generates random token for player that don't have it
tokengen.enabled: "true"
# Generated token length
tokengen.length: "4096"
# Symbols that the token consists of
tokengen.symbols: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"