Gamble Plugin
✨ Main Features
🔐 Authentication System
-
Account Registration - every player must create an account using the
/register <password>command -
Login - account protection against unauthorized access (
/login <password>) -
Automatic Premium Login - players with a purchased Minecraft account (premium) are automatically logged in every time they join the server (starting from the second join)
-
Movement Block - unauthenticated players cannot move, interact with blocks, or pick up items
-
Invincibility - unauthenticated players are immune to damage
-
Admin Password Reset -
/resetpassword <nick>command forces a player to re-register
💰 Vault System
-
Deposit Diamonds -
/gamble deposit <amount | all | half>- safely store diamonds -
Withdraw Diamonds -
/gamble withdraw <amount | all | half>- withdraw diamonds from the vault -
Check Balance -
/gamble balance- displays diamond count in vault and inventory -
Convenient Options - ability to deposit/withdraw all diamonds (
all) or half (half)
🛠️ Commands
| Command | Aliases | Description |
|---|---|---|
/register <password> |
/reg |
Register a new account |
/login <password> |
/l |
Login to the server |
/gamble <deposit|withdraw|balance> |
/vault, /money |
Manage the vault |
/resetpassword <nick> |
/resetpass, /resetpwd, /rp |
Reset player password (admin) |
🔧 Permissions
| Permission | Default | Description |
|---|---|---|
gamble.user |
true | Basic permissions (register, login, vault) |
gamble.premium |
false | Automatic premium login |
gamble.admin |
op | Full administrative access |
gamble.resetpassword |
op | Ability to reset passwords |
📦 Requirements
-
Server: Spigot/Paper 1.13+
-
Database: MySQL 5.7+
-
Java: 8 or newer
🗄️ Database Structure
The vault table contains the following columns:
-
uuid- unique player identifier -
player_name- player nickname -
password- hashed password (BCrypt) -
diamonds- number of diamonds in the vault -
is_premium- premium player status -
logged_in- login status -
needs_password_reset- forced password reset flag
🔒 Security
-
Passwords are stored in the database using the BCrypt algorithm (12 salt rounds)
-
All database queries use PreparedStatement (protection against SQL Injection)
-
Asynchronous database operations do not block the main server thread
-
Movement and interaction blocking for unauthenticated players
Comments