Skip to content

๐Ÿ”Œ MySQL-powered allowlist Spigot/Paper plugin

License

Notifications You must be signed in to change notification settings

alteamc/allowdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

49 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AllowDB

MySQL-powered allowlist Spigot/Paper plugin

Workflow status Codacy grade Java version Latest release License Discord chat

Basic usage

Installation

  1. Download the most recent release from releases page.
  2. Move downloaded JAR to plugins/ folder.
  3. Restart (or reload) your server.
  4. Configure MySQL connection in plugins/AllowDB/config.yml config file.
  5. Restart (or reload) your server again, or restart AllowDB plugin if you have any plugin management utilities installed.

Configuring plugin

Locale

Currently AllowDB ships with two locales bundled: English (en) and Russian (ru.)

For creating/editing locales see creating/editing locales section.

MySQL connection URL

MySQL connection URL has the following format:

jdbc:mysql://user:password@127.0.0.1:3306/allows

In this reference connection string:

  • jdbc:mysql:// prefix is a mandatory part of URL
  • user is a sample username of database user
  • password is a sample password of database user
  • 127.0.0.1 is IP address to MySQL database host
  • 3306 is default MySQL port
  • allows is name of MySQL database to use

Note! If username or password contain special characters (out of alphanumeric character set, e.g. !@#$%^&*()), you will need to URL-encode its value.

Kick message

You can configure server kick message (that unallowed users will see when they will try to connect) with messages.not-listed parameter. Color codes are also supported with ยง (section sign.)

Managing allowlist

AllowDB lets you manage your allowlist with /adb add <nickname or UUID> or /adb remove <nickname or UUID> commands with username or UUID (with or without dashes).

Reloading configuration

AllowDB provides /adb reload command for reloading configuration from disk and reconnecting to database.

Configuring permissions

AllowDB has clear and concise permission nodes for every command as well as wildcard permissions for full access to every command (allowdb.command.* and allowdb.*.)

However, you will still need allowdb.command permission (note that it does not end with .*) for players to use any of /adb commands (and for it to appear in command list when you type it.)

Command Permission node
/adb add allowdb.command.add
/adb remove allowdb.command.remove
/adb reload allowdb.command.reload
/adb help allowdb.command.help

Advanced usage

Creating/editing locales

Locales are stored in files messages_LANG.yml files in JAR file root (where LANG is two-letter locale code, e.g. en or ru.) If you want to edit existing locales or add your own, edit one of these files or copy one of them for reference and edit it for your own needs.

Localized strings use standard String.format(...) formatting placeholders (e.g. %1$s, %2$s where digit is positional placeholder index.)