feat(lohub): Add complete configuration system with 6 config files
- Added messages.yml for all plugin messages with customizable prefix - Added commands.yml for custom commands (discord, website, store, rules, heal, clearinventory) - Added serverselector.yml for GUI server selector menu - Added data.yml for persistent data storage (chat_locked, spawn location) - Updated ConfigManager to load all config files - Updated ChatLockManager to use data.yml instead of chatlock.dat - Updated SpawnManager to use data.yml instead of spawn.yml - Updated all commands to use messages.yml - Updated listeners to use messages.yml - Removed duplicate config files from root directory - Added CONFIG_GUIDE.md documentation
This commit is contained in:
parent
102341bb2c
commit
1e5e8d8638
36 changed files with 1580 additions and 544 deletions
105
lohub/src/main/resources/commands.yml
Normal file
105
lohub/src/main/resources/commands.yml
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
# ╔══════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ LoHub Custom Commands Configuration ║
|
||||
# ║ Create custom commands with actions ║
|
||||
# ╚══════════════════════════════════════════════════════════════════════════════╝
|
||||
#
|
||||
# ACTIONS:
|
||||
# [MESSAGE] text - Send message to player
|
||||
# [BROADCAST] text - Broadcast to all players
|
||||
# [TITLE] title;subtitle;fadeIn;stay;fadeOut - Send title
|
||||
# [ACTIONBAR] text - Send actionbar message
|
||||
# [SOUND] sound - Play sound
|
||||
# [COMMAND] command - Execute as player
|
||||
# [CONSOLE] command - Execute as console
|
||||
# [GAMEMODE] mode - Change gamemode
|
||||
# [EFFECT] effect;level - Give potion effect
|
||||
# [CLOSE] - Close inventory
|
||||
#
|
||||
# PLACEHOLDERS:
|
||||
# %player% - Player name
|
||||
# %player_displayname% - Player display name
|
||||
# %online% - Online players count
|
||||
# %online_max% - Max players
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | CUSTOM COMMANDS |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
custom_commands:
|
||||
# Discord command
|
||||
discord:
|
||||
aliases:
|
||||
- discord
|
||||
- дискорд
|
||||
- ds
|
||||
permission: null # null = no permission required
|
||||
actions:
|
||||
- "[MESSAGE] 	B59B6Discord: &#FFFFFFdiscord.example.net"
|
||||
- "[SOUND] BLOCK_NOTE_BLOCK_PLING"
|
||||
|
||||
# Website command
|
||||
website:
|
||||
aliases:
|
||||
- website
|
||||
- site
|
||||
- сайт
|
||||
- web
|
||||
permission: null
|
||||
actions:
|
||||
- "[MESSAGE] �D4FFWebsite: &#FFFFFFwww.example.net"
|
||||
- "[SOUND] BLOCK_NOTE_BLOCK_PLING"
|
||||
|
||||
# Store command
|
||||
store:
|
||||
aliases:
|
||||
- store
|
||||
- shop
|
||||
- магазин
|
||||
- донат
|
||||
permission: null
|
||||
actions:
|
||||
- "[MESSAGE] &#FF6B6BStore: &#FFFFFFstore.example.net"
|
||||
- "[SOUND] BLOCK_NOTE_BLOCK_PLING"
|
||||
|
||||
# Clear inventory command (admin only)
|
||||
clearinventory:
|
||||
aliases:
|
||||
- ci
|
||||
- clearinv
|
||||
- очиститьинв
|
||||
permission: lohub.admin
|
||||
actions:
|
||||
- "[CONSOLE] minecraft:clear %player%"
|
||||
- "[MESSAGE] {prefix}BCB77Your inventory has been cleared!"
|
||||
- "[SOUND] ENTITY_ITEM_PICKUP"
|
||||
|
||||
# Heal command (admin only)
|
||||
heal:
|
||||
aliases:
|
||||
- heal
|
||||
- хил
|
||||
permission: lohub.admin
|
||||
actions:
|
||||
- "[CONSOLE] minecraft:effect give %player% minecraft:instant_health 1 10 true"
|
||||
- "[CONSOLE] minecraft:effect give %player% minecraft:saturation 1 10 true"
|
||||
- "[MESSAGE] {prefix}BCB77You have been healed!"
|
||||
- "[SOUND] ENTITY_PLAYER_LEVELUP"
|
||||
|
||||
# Rules command
|
||||
rules:
|
||||
aliases:
|
||||
- rules
|
||||
- правила
|
||||
permission: null
|
||||
actions:
|
||||
- "[MESSAGE] &r"
|
||||
- "[MESSAGE] &#FFD700╔═══ Server Rules ═══╗"
|
||||
- "[MESSAGE] &r"
|
||||
- "[MESSAGE] BCB771. Be respectful to all players"
|
||||
- "[MESSAGE] BCB772. No cheating or hacking"
|
||||
- "[MESSAGE] BCB773. No spam in chat"
|
||||
- "[MESSAGE] BCB774. Follow staff instructions"
|
||||
- "[MESSAGE] BCB775. Have fun!"
|
||||
- "[MESSAGE] &r"
|
||||
- "[MESSAGE] &#FFD700╚═══════════════════════╝"
|
||||
- "[SOUND] BLOCK_NOTE_BLOCK_PLING"
|
||||
|
|
@ -328,16 +328,14 @@ announcements:
|
|||
- "&#FFD700╚═══════════════════════╝"
|
||||
- "&r"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | CUSTOM COMMANDS |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# All custom commands are now in commands.yml
|
||||
# You can create custom commands with actions there
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | MESSAGES |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
messages:
|
||||
prefix: "�D4FF[�D4FFL�CAF7o�C0EEH�B7E6u�ADDDbcCC]"
|
||||
spawn-set: "BCB77Spawn set successfully!"
|
||||
spawn-teleport: "BCB77Teleporting to spawn..."
|
||||
no-spawn: "&#FF6B6BSpawn not set! Use /sethub"
|
||||
no-permission: "&#FF6B6BYou don't have permission!"
|
||||
players-only: "&#FF6B6BThis command is only for players!"
|
||||
config-reloaded: "BCB77Configuration reloaded!"
|
||||
usage: "&#FFD700Usage: /lohub reload"
|
||||
# All messages are now in messages.yml
|
||||
# You can customize the plugin prefix and all messages there
|
||||
|
|
|
|||
17
lohub/src/main/resources/data.yml
Normal file
17
lohub/src/main/resources/data.yml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# ╔══════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ LoHub Data Storage ║
|
||||
# ║ DO NOT EDIT THIS FILE MANUALLY! ║
|
||||
# ║ This file is automatically managed by the plugin ║
|
||||
# ╚══════════════════════════════════════════════════════════════════════════════╝
|
||||
|
||||
# Chat lock state
|
||||
chat_locked: false
|
||||
|
||||
# Spawn location (set via /sethub command)
|
||||
spawn:
|
||||
world: null
|
||||
x: 0.0
|
||||
y: 0.0
|
||||
z: 0.0
|
||||
yaw: 0.0
|
||||
pitch: 0.0
|
||||
84
lohub/src/main/resources/messages.yml
Normal file
84
lohub/src/main/resources/messages.yml
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
# ╔══════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ LoHub Messages Configuration ║
|
||||
# ║ All plugin messages in one place ║
|
||||
# ╚══════════════════════════════════════════════════════════════════════════════╝
|
||||
|
||||
# Plugin prefix (used in all messages with {prefix} placeholder)
|
||||
prefix: "�D4FF[�D4FFL�CAF7o�C0EEH�B7E6u�ADDDbcCC] "
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | GENERAL MESSAGES |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
general:
|
||||
no-permission: "{prefix}&#FF6B6BYou don't have permission!"
|
||||
players-only: "{prefix}&#FF6B6BThis command is only for players!"
|
||||
config-reloaded: "{prefix}BCB77Configuration reloaded!"
|
||||
invalid-player: "{prefix}&#FF6B6BPlayer %player% not found!"
|
||||
cooldown-active: "{prefix}&#FF6B6BPlease wait %time%s before using this again!"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | SPAWN MESSAGES |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
spawn:
|
||||
set: "{prefix}BCB77Spawn set successfully!"
|
||||
teleport: "{prefix}BCB77Teleporting to spawn..."
|
||||
no-spawn: "{prefix}&#FF6B6BSpawn not set! Use /sethub"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | CHAT LOCK MESSAGES |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
chat:
|
||||
locked: "{prefix}&#FF6B6BChat is currently locked!"
|
||||
lock-enabled: "{prefix}BCB77Chat has been locked!"
|
||||
lock-disabled: "{prefix}&#FF6B6BChat has been unlocked!"
|
||||
lock-broadcast-enabled: "{prefix}&#FFD700%player% &#AAAAAAhas locked the chat!"
|
||||
lock-broadcast-disabled: "{prefix}&#FFD700%player% &#AAAAAAhas unlocked the chat!"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | PLAYER HIDER MESSAGES |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
player-hider:
|
||||
hidden: "{prefix}&#FF6B6BPlayers are now hidden!"
|
||||
shown: "{prefix}BCB77Players are now visible!"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | WORLD PROTECTION MESSAGES |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
protection:
|
||||
item-drop: "{prefix}&#FF6B6BYou cannot drop items here!"
|
||||
item-pickup: "{prefix}&#FF6B6BYou cannot pickup items here!"
|
||||
block-place: "{prefix}&#FF6B6BYou cannot place blocks here!"
|
||||
block-break: "{prefix}&#FF6B6BYou cannot break blocks here!"
|
||||
block-interact: "{prefix}&#FF6B6BYou cannot interact with this!"
|
||||
player-pvp: "{prefix}&#FF6B6BPVP is disabled here!"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | DOUBLE JUMP MESSAGES |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
double-jump:
|
||||
cooldown: "{prefix}&#FF6B6BWait %time%s before double jumping again!"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | COMMAND MESSAGES |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
commands:
|
||||
usage-lohub: "{prefix}&#FFD700Usage: /lohub reload"
|
||||
usage-hub: "{prefix}&#FFD700Usage: /hub"
|
||||
usage-sethub: "{prefix}&#FFD700Usage: /sethub"
|
||||
usage-chatlock: "{prefix}&#FFD700Usage: /chatlock"
|
||||
command-blocked: "{prefix}&#FF6B6BThis command is blocked!"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | ANTI-SWEAR MESSAGES |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
anti-swear:
|
||||
blocked: "{prefix}&#FF6B6BYour message contains inappropriate language!"
|
||||
admin-notify: "{prefix}&#FFD700%player% &#AAAAAAattempted to say: &#FF6B6B%word%"
|
||||
|
|
@ -27,6 +27,12 @@ commands:
|
|||
description: LoHub admin command
|
||||
usage: /lohub [reload]
|
||||
permission: lohub.admin
|
||||
|
||||
chatlock:
|
||||
description: Lock/unlock chat
|
||||
usage: /chatlock
|
||||
permission: lohub.chatlock
|
||||
aliases: [ lockchat, чатлок ]
|
||||
|
||||
permissions:
|
||||
lohub.hub:
|
||||
|
|
@ -38,3 +44,9 @@ permissions:
|
|||
lohub.bypass.protection:
|
||||
description: Bypass world protection
|
||||
default: op
|
||||
lohub.chatlock:
|
||||
description: Can lock/unlock chat
|
||||
default: op
|
||||
lohub.chatlock.bypass:
|
||||
description: Can bypass chat lock
|
||||
default: op
|
||||
|
|
|
|||
139
lohub/src/main/resources/serverselector.yml
Normal file
139
lohub/src/main/resources/serverselector.yml
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
# ╔══════════════════════════════════════════════════════════════════════════════╗
|
||||
# ║ LoHub Server Selector Configuration ║
|
||||
# ║ GUI menu for server selection ║
|
||||
# ╚══════════════════════════════════════════════════════════════════════════════╝
|
||||
#
|
||||
# This file defines the server selector GUI that players can open
|
||||
# You can customize the items, layout, and actions
|
||||
#
|
||||
# ITEM ACTIONS:
|
||||
# [MESSAGE] text - Send message to player
|
||||
# [BROADCAST] text - Broadcast to all players
|
||||
# [TITLE] title;subtitle;fadeIn;stay;fadeOut - Send title
|
||||
# [ACTIONBAR] text - Send actionbar message
|
||||
# [SOUND] sound - Play sound
|
||||
# [COMMAND] command - Execute as player
|
||||
# [CONSOLE] command - Execute as console
|
||||
# [PROXY] server - Send player to BungeeCord/Velocity server
|
||||
# [CLOSE] - Close inventory
|
||||
#
|
||||
# ITEM FLAGS:
|
||||
# - HIDE_ATTRIBUTES
|
||||
# - HIDE_DESTROYS
|
||||
# - HIDE_ENCHANTS
|
||||
# - HIDE_PLACED_ON
|
||||
# - HIDE_POTION_EFFECTS
|
||||
# - HIDE_UNBREAKABLE
|
||||
#
|
||||
# PLAYER HEADS:
|
||||
# material: PLAYER_HEAD
|
||||
# username: <player_name> # OR
|
||||
# base64: <base64_texture>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | SERVER SELECTOR GUI |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
# GUI settings
|
||||
gui:
|
||||
# Title of the inventory
|
||||
title: "&#FFD700S&#FFC700e&#FFB700r&#FFA700v&#FF9700e&#FF8700r &#FF7700S&#FF6700e&#FF5700l&#FF4700e&#FF3700c&#FF2700t&#FF1700o&#FF0700r"
|
||||
|
||||
# Number of rows (1-6, each row = 9 slots)
|
||||
rows: 3
|
||||
|
||||
# Auto-update GUI (for placeholders)
|
||||
refresh:
|
||||
enabled: false
|
||||
rate: 40 # In ticks (20 ticks = 1 second)
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
# | GUI ITEMS |
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
|
||||
|
||||
items:
|
||||
# Filler item (decorative glass)
|
||||
filler:
|
||||
material: GRAY_STAINED_GLASS_PANE
|
||||
slot: -1 # -1 = fill all empty slots
|
||||
amount: 1
|
||||
display_name: " "
|
||||
item_flags:
|
||||
- HIDE_ATTRIBUTES
|
||||
|
||||
# Survival server
|
||||
survival:
|
||||
material: GRASS_BLOCK
|
||||
slot: 11
|
||||
amount: 1
|
||||
glow: true
|
||||
display_name: "BCB77S>C973uAC76Fr3C56Bv1C367i(C163v&BF5FaFBD5Bl"
|
||||
lore:
|
||||
- ""
|
||||
- "&#AAAAAAClassic survival experience"
|
||||
- "&#AAAAAABuild, mine, and survive!"
|
||||
- ""
|
||||
- "&#FFD700Click to join!"
|
||||
actions:
|
||||
- "[CLOSE]"
|
||||
- "[MESSAGE] {prefix}BCB77Connecting to Survival..."
|
||||
- "[SOUND] ENTITY_ENDERMAN_TELEPORT"
|
||||
# For BungeeCord/Velocity:
|
||||
# - "[PROXY] survival"
|
||||
# For Multiverse-Core (multi-world):
|
||||
# - "[CONSOLE] mvtp %player% survival_world"
|
||||
|
||||
# Creative server
|
||||
creative:
|
||||
material: COMMAND_BLOCK
|
||||
slot: 13
|
||||
amount: 1
|
||||
glow: true
|
||||
display_name: "&#FF6B6BC&#FF5757r&#FF4343e&#FF2F2Fa&#FF1B1Bt&#FF0707i&#F30000v&#DF0000e"
|
||||
lore:
|
||||
- ""
|
||||
- "&#AAAAAAUnlimited creativity!"
|
||||
- "&#AAAAAABuild anything you imagine"
|
||||
- ""
|
||||
- "&#FFD700Click to join!"
|
||||
actions:
|
||||
- "[CLOSE]"
|
||||
- "[MESSAGE] {prefix}&#FF6B6BConnecting to Creative..."
|
||||
- "[SOUND] ENTITY_ENDERMAN_TELEPORT"
|
||||
# For BungeeCord/Velocity:
|
||||
# - "[PROXY] creative"
|
||||
# For Multiverse-Core:
|
||||
# - "[CONSOLE] mvtp %player% creative_world"
|
||||
|
||||
# Minigames server
|
||||
minigames:
|
||||
material: DIAMOND_SWORD
|
||||
slot: 15
|
||||
amount: 1
|
||||
glow: true
|
||||
display_name: "	B59B6ME4FB0iῑAAnA3BA4iD319Eg򓚖aȔD92m񰸵e餝Fs"
|
||||
lore:
|
||||
- ""
|
||||
- "&#AAAAAAFun minigames and competitions"
|
||||
- "&#AAAAAAPlay with friends!"
|
||||
- ""
|
||||
- "&#FFD700Click to join!"
|
||||
actions:
|
||||
- "[CLOSE]"
|
||||
- "[MESSAGE] {prefix}	B59B6Connecting to Minigames..."
|
||||
- "[SOUND] ENTITY_ENDERMAN_TELEPORT"
|
||||
# For BungeeCord/Velocity:
|
||||
# - "[PROXY] minigames"
|
||||
|
||||
# Close button
|
||||
close:
|
||||
material: BARRIER
|
||||
slot: 22
|
||||
amount: 1
|
||||
display_name: "&#FF6B6BClose"
|
||||
lore:
|
||||
- ""
|
||||
- "&#AAAAAAClick to close this menu"
|
||||
actions:
|
||||
- "[CLOSE]"
|
||||
- "[SOUND] BLOCK_CHEST_CLOSE"
|
||||
Loading…
Add table
Add a link
Reference in a new issue