-
Notifications
You must be signed in to change notification settings - Fork 5
Configuration
Everything in ServerTools is a self-contained feature class that gets auto-discovered at startup and flipped on or off by a single Enabled: true/false in config.yml. No feature is hard-wired. If it's off in config, its class just never gets instantiated.
Each feature lives in a package (like sh.reece.core or sh.reece.moderation). On enable, the Loader scans the plugin jar, finds the classes in those packages, and constructs them. The class itself reads its own Enabled flag from config, so toggling a feature is just editing one line.
The config groups map roughly onto feature areas. Here's what each top-level section covers:
| Section | What it covers |
|---|---|
FeaturesGUI |
In-game GUI for browsing features (off by default) |
Disabled |
Toggles that turn OFF vanilla behavior (crop trample, fall damage, phantom spawns, etc.) |
Core |
Essentials-style commands: fly, heal, tp, gamemode, enderchest, warps, spawn, messaging |
Commands |
Extra standalone commands: speed, stafflist, countdown, daily rewards, reclaim |
Chat |
Chat formatting, cooldowns, tags, colors, emojis, custom death messages |
Events |
Event-driven stuff: anti-craft, world effects, join MOTD, launchpads |
Moderation |
Staff tools: mutechat, clearchat, freeze, whitelist bypass, reports, commandspy |
Cooldowns |
Item cooldowns (ender pearls, golden/god apples) |
Economy |
Built-in Vault economy provider backed by SQLite. Pay, balance, baltop, admin eco |
Misc |
Grab bag: rename, clearlag, holograms, command aliases, visibility, scheduled tasks |
Bungee |
Bungee server-switch command |
AutoBroadcast |
Timed broadcast messages (list lives in config) |
Donation |
Donation announcement command |
FancyAnnounce |
Configurable announcement groups with argument placeholders |
ServerInfoCMDS |
Overrides server info commands |
ShopWorkAround |
Remaps clicks in another shop plugin's GUI to run commands |
Vouchers |
Redeemable voucher/bundle items |
Hoppers |
Experimental hopper optimizer (sleeps idle hoppers). Off by default |
The Loader runs through a fixed list of phases in order. Each phase names one or more packages to scan:
Commands -> sh.reece.cmds, sh.reece.bungee
Core Features -> sh.reece.core, sh.reece.core.warp, sh.reece.core.economy
Chat -> sh.reece.chat
Events -> sh.reece.events
Hoppers -> sh.reece.hoppers
Cooldowns -> sh.reece.cooldowns
Toggleable -> sh.reece.disabled
Moderation -> sh.reece.moderation
GUIs -> sh.reece.GUI
Runnables -> sh.reece.runnables
Two rules decide what actually loads:
- A class only loads if it has a constructor taking
Main(that's the "I'm a feature" signal). No such constructor, it's skipped. - Classes whose name starts with
_are skipped entirely. Handy for helpers you don't want auto-loaded.
Abstract classes are also skipped. Load order is deterministic (jar order within each package), even though the class loading itself runs in parallel for speed.
Some features need another plugin to be present. Slap @RequiresPlugin on the class and it'll silently skip loading if the named plugin isn't enabled:
@RequiresPlugin("Vault")
public class SomeEconomyThing {
public SomeEconomyThing(Main plugin) { ... }
}If Vault isn't installed here, the class just doesn't load and you get a small console note. No crash, no error. You can require multiple plugins and all of them must be enabled.
These are the plugins ServerTools softdepends on (loads after them if they're present, works fine without):
softdepend: [LuckPerms, Vault, PlaceholderAPI, TAB, WorldGuard]A few settings sit at the top of config.yml and affect everything:
-
Language-enorde. Picks which file undertranslations/gets loaded for messages. -
LoadWithTimings- whentrue, prints per-phase load timings to console on startup. Nice for debugging slow loads. -
PluginVariables- custom%NAME%variables you can drop into any message. Define once, use everywhere.
Here's the real PluginVariables block from the default config:
PluginVariables:
STORE: https://store.WEBSITE.co
DISCORD: https://discord.gg/INVITE
RULES: https://WEBSITE.co/rules
WEBSITE: https://WEBSITE.co
SERVERNAME: '&A&lCRAFT&f&lNETWORK'
SERVER: Hub-01
SUPPORT: discord.com/invite/SUPPORTSERVERSo writing %STORE% in a broadcast or MOTD line gets swapped for the store URL at send time.
You don't have to rebuild your config when you update the plugin. On a version bump, ServerTools runs ConfigUpdater, which merges any new keys from the packaged default into your existing file. Your values and comments stay put, new keys just get appended where they belong.
It also makes a backup of your config folder before touching anything when the version changes, so nothing's lost. A handful of user-owned sections (like PluginVariables, AutoBroadcast.Messages, FancyAnnounce.Groups, Cooldowns) are treated as ignored, meaning your entries there are copied over as-is and never overwritten by defaults.
ServerTools needs Minecraft 1.18+. On startup the Loader checks the server version, and if it's older than 1.18 it logs a warning, points you at the legacy build, and disables itself rather than running broken.
Getting started
Features
- Core Features
- Chat
- World and Mob Protections
- Moderation
- Events, Cooldowns and Tasks
- Utilities and Misc
- Hopper Optimization