Code (Text):
# RankGift Plugin Configuration
# This file controls all plugin settings, messages, and GUI layouts
# ========================================
# DATABASE SETTINGS
# ========================================
database:
# Storage type: 'file' (local storage) or 'mysql' (database)
type: "file"
# MySQL settings (only used if type is 'mysql')
mysql:
host: "localhost"
port: 3306
database: "rankgift"
username: "root"
password: "password"
# Connection pool settings
pool:
maximum_pool_size: 10
minimum_idle: 5
connection_timeout: 30000
idle_timeout: 600000
# ========================================
# BUNGEE CORD SETTINGS
# ========================================
bungee:
# Enable BungeeCord support for cross-server gifting
enabled: false
# Server name for this instance
server_name: "hub"
# Redis settings for cross-server communication
redis:
host: "localhost"
port: 6379
password: ""
database: 0
# ========================================
# CURRENCY SETTINGS
# ========================================
currency:
# Currency type: 'gold' (built-in) or 'playerpoints' (PlayerPoints plugin)
type: "gold"
# Currency name shown in messages and GUIs
name: "Gold"
# ========================================
# UPDATE CHECKER SETTINGS
# ========================================
update_checker:
# Enable automatic update checking
enabled: true
# Check for updates when opped players join
check_on_join: true
# Update check URL (leave default unless you have a custom update server)
update_url: "https://api.spigotmc.org/legacy/update.php?resource=126384"
# Current plugin version (auto-updated by plugin)
current_version: "1.4"
# ========================================
# GIFT SETTINGS
# ========================================
gift:
# Gift expiration time in seconds (0 = never expire)
expiration_time: 60
# Chat fallback time in seconds (if book GUI is not used)
chat_fallback_time: 15
# Gift interaction type: 'book' (book GUI) or 'chat' (chat messages)
interaction_type: "book"
# Show fireworks when gift is accepted
fireworks_enabled: true
# Enable rank upgrade discounts
upgrade_discounts: true
# Whitelisted worlds where gift command and book GUI work
# Leave empty to allow all worlds
whitelisted_worlds:
- "world"
- "world_nether"
- "world_the_end"
# ========================================
# MESSAGES
# ========================================
messages:
# Error messages
errors:
no_target: "&cNo target player found. Please use /gift <player> again."
not_online: "&cTarget player is no longer online."
not_same_world: "&cTarget player must be in the same world to gift a rank."
no_permission: "&cYou do not have permission to gift this rank."
already_has_rank: "&c{player} already has this rank or higher!"
already_has_rank_self: "&cYou already have this rank or higher!"
not_enough_currency: "&cYou do not have enough {currency} to gift this rank!"
cannot_gift_self: "&cYou cannot gift yourself!"
player_not_found: "&cPlayer not found."
no_pending_gift: "&cYou have no pending gifts."
gift_expired: "&cYour gift has expired!"
only_players: "&cOnly players can use this command."
invalid_value: "&cInvalid value."
luckperms_missing: "&c&l[WARNING] &cLuckPerms is not installed! RankGiftPlugin requires LuckPerms to function properly."
luckperms_missing_admin: "&c&l[ADMIN] &cLuckPerms is not installed! RankGiftPlugin requires LuckPerms to function properly. Please install LuckPerms for full functionality."
# Success messages
success:
gift_sent: "&aYou have sent a gift to {target_prefix}{target_name}&a!"
gift_received: "&a{sender_prefix}{sender_name} &ahas gifted you the {rank_display}&a!"
gift_accepted: "&aYou have accepted the gift!"
gift_denied: "&cYou have denied the gift."
reload: "&aRankGiftPlugin config and data reloaded!"
update_available: "&a&l[UPDATE] &aA new version of RankGiftPlugin is available: &e{new_version}&a! Current: &e{current_version}"
update_latest: "&a&l[UPDATE] &aRankGiftPlugin is up to date! Version: &e{current_version}"
# Gift response messages
gift_response:
denied_sender: "&c{target_name} has chosen to deny your gift of {rank_display}&c!"
denied_target: "&cYou have denied the gift from {sender_prefix}{sender_name}&c."
waiting: "&aGift sent! Waiting for {target_prefix}{target_name} &ato respond..."
# Currency messages
currency:
balance: "&aYou have &6{balance} {currency}&a."
balance_other: "{target_prefix}{target_name} &ahas &6{balance} {currency}&a."
gave: "&aGave &6{value} {currency} &ato {target_prefix}{target_name}&a."
took: "&cTook &6{value} {currency} &cfrom {target_prefix}{target_name}&c."
set: "&aSet {target_prefix}{target_name}&a's {currency} to &6{value}&a."
# Usage messages
usage:
gift: "&cUsage: /gift <player>"
gold: "&cUsage: /gold <give|take|set|check> <player> [value]"
giftresponse: "&cUsage: /giftresponse <accept|deny>"
# ========================================
# GUI CONFIGURATION
# ========================================
# Each GUI is defined with a name, title, size, and items
# Available actions: open_gui, gift_rank, close, none
# Placeholders: {target_name}, {target_prefix}, {sender_name}, {sender_prefix}, {currency}, {cost}, {balance}, {ranks_gifted}
guis:
# Main gift selection GUI
main:
title: "&8Send a Gift"
size: 36
items:
present:
slot: 13
material: PLAYER_HEAD
skull: "pasha500k"
display-name: "&aGift a Rank"
lore:
- "&7Gift a rank to {target_prefix}{target_name}&7."
- ""
- "&eClick to gift!"
action: open_gui
opens: rank_select
close:
slot: 31
material: BARRIER
display-name: "&cClose"
action: close
# Rank selection GUI
rank_select:
title: "&8Select a Gift"
size: 54
items:
# VIP Rank
vip:
slot: 27
material: EMERALD
display-name: "&aVIP Rank"
lore:
- "&7A premium rank with special perks"
- ""
- "&7Cost: &a{cost} {currency}"
action: gift_rank
rank: VIP
cost: 100
# VIP+ Rank
vipplus:
slot: 29
material: EMERALD
display-name: "&aVIP&6+ &aRank"
lore:
- "&7Enhanced VIP with additional features"
- ""
- "&7Cost: &a{cost} {currency}"
action: gift_rank
rank: "VIP+"
cost: 200
enchanted: true
# MVP Rank
mvp:
slot: 31
material: DIAMOND
display-name: "&bMVP Rank"
lore:
- "&7Most Valuable Player rank"
- ""
- "&7Cost: &a{cost} {currency}"
action: gift_rank
rank: MVP
cost: 300
# MVP+ Rank
mvpplus:
slot: 33
material: DIAMOND
display-name: "&bMVP&c+ &bRank"
lore:
- "&7Enhanced MVP with premium features"
- ""
- "&7Cost: &a{cost} {currency}"
action: gift_rank
rank: "MVP+"
cost: 400
enchanted: true
# MVP++ Rank (opens duration selection)
mvpplusplus:
slot: 35
material: GOLD_INGOT
display-name: "&6MVP&c++ &6Rank"
lore:
- "&7Ultimate rank with temporary options"
- ""
- "&eClick to choose duration"
action: open_gui
opens: mvpplusplus_durations
# Navigation buttons
back:
slot: 48
material: ARROW
display-name: "&aGo Back"
action: open_gui
opens: main
close:
slot: 49
material: BARRIER
display-name: "&cClose"
action: close
# Info items
currency:
slot: 53
material: GOLD_NUGGET
display-name: "&e{currency} Wallet: &6{balance}"
lore:
- "&eRanks Gifted: &6{ranks_gifted}"
action: none
player_head:
slot: 13
material: PLAYER_HEAD
display-name: "&b{target_prefix}{target_name}"
lore:
- "&7You are sending a gift to this player!"
action: none
# MVP++ Duration selection GUI
mvpplusplus_durations:
title: "&8MVP++ Durations"
size: 54
items:
# Target player info
player_head:
slot: 13
material: PLAYER_HEAD
skull: "{target_name}"
display-name: "&b{target_prefix}{target_name}"
lore:
- "&7You are sending a gift to this player!"
action: none
# Duration options
one_month:
slot: 28
material: GOLD_INGOT
enchanted: true
display-name: "&61 Month MVP++"
lore:
- "&7Gift 1 month of MVP++"
- "&7Cost: &a{cost} {currency}"
action: gift_rank
rank: mvpplusplus
cost: 500
temprank: true
duration: 30d
six_months:
slot: 31
material: GOLD_INGOT
enchanted: true
display-name: "&66 Months MVP++"
lore:
- "&7Gift 6 months of MVP++"
- "&7Cost: &a{cost} {currency}"
action: gift_rank
rank: mvpplusplus
cost: 2500
temprank: true
duration: 180d
one_year:
slot: 34
material: GOLD_INGOT
enchanted: true
display-name: "&61 Year MVP++"
lore:
- "&7Gift 1 year of MVP++"
- "&7Cost: &a{cost} {currency}"
action: gift_rank
rank: mvpplusplus
cost: 5000
temprank: true
duration: 1y
# Navigation
back:
slot: 48
material: ARROW
display-name: "&aGo Back"
action: open_gui
opens: rank_select
close:
slot: 49
material: BARRIER
display-name: "&cClose"
action: close
# Info
currency:
slot: 53
material: GOLD_NUGGET
display-name: "&e{currency} Wallet: &6{balance}"
lore:
- "&eRanks Gifted: &6{ranks_gifted}"
action: none