/ deep dives

Lessons & Reference Guides

Complete guides for the tools every server admin needs. Click a lesson below or scroll through.

Permissions

LuckPerms — Complete Command Reference

LuckPerms is the industry-standard permission plugin for Minecraft. Every serious server uses it. This guide covers every command you'll ever need.

Quick Start

First install: drop the LuckPerms jar in your plugins folder, restart the server. That's it. The plugin works out of the box with sensible defaults.

Creating & Managing Groups

CommandWhat It Does
/lp creategroup <name>Create a new permission group (e.g. Member, Mod, Admin)
/lp deletegroup <name>Permanently delete a group
/lp listgroupsList all existing groups on the server
/lp group <group> infoView all info about a group — permissions, parents, meta
/lp group <group> setdisplayname <name>Set a display name shown in tab/list (supports color codes)
/lp group <group> setweight <number>Higher weight = higher priority when a player has multiple groups

Setting Permissions

CommandWhat It Does
/lp group <group> permission set <node> trueGrant a permission to a group
/lp group <group> permission set <node> falseExplicitly deny a permission (overrides parent groups)
/lp group <group> permission unset <node>Remove a permission entry
/lp group <group> permission clearRemove ALL permissions from a group (use carefully)
/lp group <group> permission infoList all permissions a group has
/lp user <player> permission set <node> trueGrant a permission directly to a specific player (overrides group)
/lp user <player> permission infoSee all permissions a specific player has (includes inherited)

Parent Groups (Group Inheritance)

CommandWhat It Does
/lp group <child> parent add <parent>Make child group inherit all permissions from parent group
/lp group <child> parent remove <parent>Remove inheritance link
/lp group <child> parent infoShow all parent groups this group inherits from

Example: /lp group Mod parent add Member — Mods inherit all Member permissions automatically.

Adding Players to Groups

CommandWhat It Does
/lp user <player> parent add <group>Add a player to a group (they inherit all its permissions)
/lp user <player> parent remove <group>Remove a player from a group
/lp user <player> parent set <group>Set a player's ONLY group (removes all others)
/lp user <player> parent infoList all groups a player belongs to
/lp user <player> promote <track>Promote player to next group on a track
/lp user <player> demote <track>Demote player to previous group on a track

Temporary Permissions & Groups

CommandWhat It Does
/lp user <player> parent add <group> <duration>Add to a group temporarily (e.g. 7d, 24h, 30m)
/lp user <player> permission set <node> true <duration>Grant a permission for a limited time
/lp user <player> permission expirecheckCheck when a temp permission expires

Duration format: 30m (30 minutes), 2h (2 hours), 7d (7 days), 1mo (1 month).

Tracks (Promotion Ladders)

CommandWhat It Does
/lp createtrack <name>Create a new promotion track
/lp track <track> append <group>Add a group to the end of the track
/lp track <track> insert <group> <position>Insert a group at a specific position (1 = first)
/lp track <track> remove <group>Remove a group from the track
/lp track <track> infoShow the full track order

Example — create a staff track: /lp createtrack staff, then /lp track staff append Helper, /lp track staff append Mod, /lp track staff append Admin. Then promote with /lp user PlayerName promote staff.

Contextual Permissions

Permissions can be scoped to specific worlds, servers, or times. This is incredibly powerful:

CommandWhat It Does
/lp group <g> permission set <node> true server=<name>Permission only applies on a specific proxy server
/lp group <g> permission set <node> true world=<name>Permission only applies in a specific world
/lp user <p> permission set <node> true server=<s> world=<w>Combine contexts for precise control

Example: give fly only in the hub world: /lp group Member permission set essentials.fly true world=hub

Meta & Prefixes/Suffixes

CommandWhat It Does
/lp group <g> meta setprefix <value>Set prefix shown before player name (supports & color codes)
/lp group <g> meta setsuffix <value>Set suffix after player name
/lp group <g> meta add <key> <value>Add custom metadata (used by other plugins)
/lp group <g> meta remove <key>Remove metadata entry
/lp group <g> meta infoView all metadata for a group

Color code example: &a[Member]&r shows a green [Member] prefix. Use /lp group Member meta setprefix "&8[&aMember&8]&r "

Verification & Debugging

CommandWhat It Does
/lp user <player> checkpermission <node>Check why a player has or doesn't have a permission — shows the source group
/lp verbose onToggle permission check logging — see every permission check in real-time in console
/lp verbose record <player>Record all permission checks for a player, then replay with /lp verbose replay
/lp search <query>Search all groups and users for a permission node
/lp syncForce-sync permissions across all servers (if using a messaging service)
/lp infoView LuckPerms version, storage type, and server info
/lp reloadReload config files without restarting the server

Useful Permission Nodes for Common Plugins

PluginNodeEffect
EssentialsXessentials.flyAllow /fly
EssentialsXessentials.gamemodeAllow /gamemode
EssentialsXessentials.banAllow /ban
EssentialsXessentials.kickAllow /kick
EssentialsXessentials.warpAllow using warps
CoreProtectcoreprotect.inspectAllow /co inspect
CoreProtectcoreprotect.rollbackAllow /co rollback
WorldEditworldedit.*All WorldEdit commands
WorldGuardworldguard.region.defineCreate regions
GriefPreventiongriefprevention.claimAllow claiming land
Vaultvault.*Economy/admin commands

Best Practices

  • Never use OP — use LuckPerms instead. OP bypasses everything and can't be tracked.
  • Create a group hierarchy: Member → Mod → Admin → Owner. Each group inherits from the one below.
  • Use contexts for multi-world servers — give fly only in the hub, not in survival.
  • Test with /lp verbose before rolling out big permission changes.
  • Backup your LuckPerms folder — it contains all your permission data.
Integration

Discord Integration with DiscordSRV

DiscordSRV bridges your Minecraft server and Discord server. Chat sync, status updates, console alerts, and more.

Installation

  1. Download DiscordSRV from SpigotMC and put it in your plugins folder
  2. Restart the server — a config folder is created at plugins/DiscordSRV/config.yml
  3. Create a Discord bot at discord.com/developers/applications
  4. Copy the bot token and paste it into config.yml under BotToken: "your-token-here"
  5. Invite the bot to your Discord server with the generated invite link
  6. Run /discordsrv reload on your Minecraft server
  7. Run /discordsrv link to link your Minecraft account to Discord

Setting Up Channels

In config.yml, find the DiscordChannels section. Set Discord channel IDs for each function:

DiscordChannels: GlobalChat: "123456789012345678" # main chat sync channel StaffChannel: "123456789012345679" # staff alerts ConsoleChannel: "123456789012345680" # console output

To get a channel ID, enable Developer Mode in Discord settings (Advanced → Developer Mode), then right-click a channel → Copy ID.

Key Features & Commands

CommandWhat It Does
/discordsrv linkLink your Minecraft account to Discord
/discordsrv unlinkUnlink your accounts
/discordsrv reloadReload config without restart
/discordsrv statusCheck if DiscordSRV is connected to Discord
/discordsrv broadcast <msg>Send a message to the linked Discord channel from in-game
/discordsrv toggledeathmessagesToggle death message sync for yourself

Useful Config Tweaks

# config.yml — recommended settings UseModernEmbed: true UseEmbeddedMessages: false DiscordChatEventFilterLink: true DiscordChatEventFilterInvite: true ConsoleChannelIncludeRcon: false EnableAutoLink: false
  • UseModernEmbed — prettier embed messages in Discord
  • DiscordChatEventFilterLink — blocks discord invite links in chat
  • EnableAutoLink — set to true if you want players with the same Discord/MC email to auto-link

Alert Configuration

Set up specific events to post to your staff channel:

DiscordChannelEvent: StaffChannel - player_join - player_leave - server_start - server_stop - watchdog_command - ban - kick

Linking Commands (Advanced)

You can run Minecraft commands from Discord using /console <command> if the bot has admin. Great for checking server status, running backups, or whitelisting players from your phone.

Development

Making a Discord Bot for Your Server

A custom Discord bot can do way more than DiscordSRV — verification, suggestions, moderation, server status, custom commands, and anything else you can code.

1. Create the Bot on Discord's Developer Portal

  1. Go to discord.com/developers/applications and click New Application
  2. Give it a name (this is the app name, not the bot's username)
  3. Go to the Bot tab on the left sidebar, click Add Bot → Confirm
  4. Under the Token section, click Reset Token / Copy — this is your bot token, keep it secret
  5. Toggle SERVER MEMBERS INTENT and MESSAGE CONTENT INTENT on (most bots need these)

2. Invite the Bot to Your Server

In the OAuth2 → URL Generator tab:

  • Select bot under Scopes
  • Select permissions your bot needs — at minimum: Send Messages, Read Message History, Embed Links, Use Slash Commands
  • For moderation bots also add: Kick Members, Ban Members, Manage Messages
  • Copy the generated URL and open it in your browser — select your server and authorize

3. Bot Project Structure (Node.js / discord.js)

Basic setup with discord.js (most popular library):

# 1. Create a new folder and init mkdir my-discord-bot cd my-discord-bot npm init -y npm install discord.js dotenv # 2. Create .env file (KEEP THIS SECRET) echo "DISCORD_TOKEN=your-bot-token-here CLIENT_ID=your-bot-client-id" > .env
// index.js — minimal working bot const { Client, GatewayIntentBits } = require('discord.js'); require('dotenv').config(); const client = new Client({ intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent ] }); client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); }); client.on('messageCreate', (message) => { if (message.content === '!ping') { message.reply('Pong!'); } }); client.login(process.env.DISCORD_TOKEN);

4. Configuration Best Practices

Never hardcode tokens or server IDs. Use environment variables or a config file:

# .env — keep this in .gitignore! DISCORD_TOKEN=your-bot-token CLIENT_ID=123456789012345678 GUILD_ID=your-server-id LOG_CHANNEL_ID=123456789012345678 ROLE_MEMBER_ID=123456789012345678
// config.js require('dotenv').config(); module.exports = { token: process.env.DISCORD_TOKEN, clientId: process.env.CLIENT_ID, guildId: process.env.GUILD_ID, logChannel: process.env.LOG_CHANNEL_ID, memberRole: process.env.ROLE_MEMBER_ID };

⚠️ Add .env to your .gitignore so you never commit your bot token to GitHub.

5. Common MC Server Bot Features

FeatureHow
Server StatusPing your MC server IP using minecraft-status npm package or the mcsrvstat.us API
VerificationGenerate a code, have player run /verify <code> in-game, assign Discord role on success
SuggestionsPost submitted suggestions to a channel with embed and upvote/downvote reactions
Moderation LogsUse Discord audit logs + bot events to log kicks/bans/message deletes to a private channel
Custom CommandsSlash commands like /rules, /server-ip, /apply — useful for FAQ-style info
Whitelist via DiscordButton-click whitelisting — user clicks a button, bot sends a command to MC server via RCON

6. Slash Commands (Modern Way)

Slash commands are the modern standard. Register them with Discord's API:

// deploy-commands.js — run once to register slash commands const { REST, Routes } = require('discord.js'); require('dotenv').config(); const commands = [ { name: 'ping', description: 'Replies with Pong!', }, { name: 'status', description: 'Check if the Minecraft server is online', }, ]; const rest = new REST().setToken(process.env.DISCORD_TOKEN); (async () => { await rest.put( Routes.applicationCommands(process.env.CLIENT_ID), { body: commands } ); console.log('Commands registered!'); })();

7. Hosting Your Bot

  • Free: Replit or Railway (free tier with always-on or cron pings)
  • Cheap: A $5 VPS from Linode, DigitalOcean, or Hetzner — run the bot with pm2 so it auto-restarts
  • Same server: Run the bot on your MC server machine with a screen session or PM2
# Run with PM2 (auto-restart on crash + reboots) npm install pm2 -g pm2 start index.js --name discord-bot pm2 save pm2 startup

8. Security Tips

  • Never share your bot token — anyone with it can control your bot
  • Use environment variables (never hardcode tokens in source files)
  • Limit bot permissions — only give what it actually needs
  • Validate command inputs to prevent injection attacks
  • If your bot token leaks, regenerate it immediately in the Developer Portal
Optimization

Performance Optimization

Making your server run buttery smooth — from JVM flags to chunk loading. Every trick in the book.

1. Choose the Right Server Software

Not all Minecraft server JARs are equal:

  • Paper — the standard. Best performance for most servers, huge API support
  • Purpur — Paper fork with even more config options and features
  • Airplane — optimized for large servers (50+ players)
  • Fabric + Lithium — for modded servers, Lithium optimizes game mechanics

Don't use: Vanilla (no optimization), CraftBukkit (outdated), Spigot (Paper is strictly better).

2. JVM Flags (the big one)

These JVM arguments control how Java manages memory. Bad flags = lag. Good flags = smooth server:

java -Xms4G -Xmx4G \ -XX:+UseG1GC \ -XX:+ParallelRefProcEnabled \ -XX:MaxGCPauseMillis=200 \ -XX:+UnlockExperimentalVMOptions \ -XX:+DisableExplicitGC \ -XX:+AlwaysPreTouch \ -XX:G1HeapWastePercent=5 \ -XX:G1MixedGCCountTarget=4 \ -XX:G1MixedGCLiveThresholdPercent=90 \ -XX:G1RSetUpdatingPauseTimePercent=5 \ -XX:SurvivorRatio=32 \ -XX:+PerfDisableSharedMem \ -XX:MaxTenuringThreshold=1 \ -Daikars.flags=true \ -jar server.jar --nogui

Explanation of key flags:

  • -Xms4G -Xmx4G — allocate 4GB initial and max (set these EQUAL, never different)
  • UseG1GC — Garbage-First collector, best for Minecraft (replaces CMS)
  • MaxGCPauseMillis=200 — target max 200ms for garbage collection pauses
  • AlwaysPreTouch — allocate memory at startup instead of as needed (more consistent performance)
  • DisableExplicitGC — prevents plugins from triggering full GC cycles (those freeze the server)
  • MaxTenuringThreshold=1 — moves objects out of survivor space faster, reduces GC overhead

Memory rule of thumb: For 1-10 players, 2GB is fine. 10-30 players: 4GB. 30-80 players: 6-8GB. Never allocate more than 12GB without switching to ZGC.

3. The Spark Profiler

Spark is the #1 tool for diagnosing lag. Install it, and when your server lags, run these:

CommandWhat It Does
/spark profiler startStart recording CPU usage. Run this for 30-60 seconds during lag
/spark profiler stopStop and get a link to a detailed flamegraph showing exactly what code is using CPU
/spark healthQuick health report — CPU, memory, TPS, and disk usage
/spark tpsShow TPS (ticks per second) history — 20.0 is perfect, below 18 is lagging
/spark gcShow garbage collection stats — frequency and duration of GC pauses
/spark heapShow memory usage breakdown by plugin/feature
/spark viewOpen the web viewer for an active profiler session

4. Server Properties Tweaks

In server.properties, these settings have the biggest impact on performance:

SettingRecommendedWhy
view-distance6-8Lower = fewer chunks loaded = less CPU/RAM usage. Default 10 is heavy.
simulation-distance4-6How far entities and redstone work. Lower = huge performance gain.
max-tick-time-1Disable the watchdog crash timer. It force-kills the server if a tick takes too long.
network-compression-threshold256Compresses network packets above this size. 256 is a good balance.
max-players-1Don't limit by server.properties — use a plugin instead for better control.

5. Paper.yml Optimizations

# paper.yml — performance settings chunk-loading: autoconcurrent-save: true max-chunk-loads-per-tick: 500 entities: spawning: disable-mob-spawner-spawn-egg-transformation: true despawn-ranges: soft: 32 hard: 48 collisions: max-entity-collisions: 1 tick-rates: container-update: 1 grass-spread: 2 mob-spawner: 2 spigot-config: mob-spawner-tick-rate: 2 merge-radius: item: 3.5 exp: 4.0

6. Lag Prevention Checklist

  • Limit redstone — flying machines and clock circuits are the #1 cause of tick lag. Use WorldGuard to disable redstone in some areas.
  • Pre-generate the world — generate chunks before players explore them. Use Chunky plugin: /chunky radius 500, then /chunky start
  • Limit hoppers — hoppers check for items 8 times per second. Hundreds of hoppers = lag. Use hopper-amount: 1 in paper.yml
  • Control mob farmsentity-activation-range in paper.yml makes mobs inactive when players are far away
  • Use a proxy — BungeeCord/Velocity offloads player connections to a separate process
Essentials

EssentialsX Command Reference

EssentialsX is the swiss-army knife of Minecraft server plugins. Every command you need for moderation, economy, teleportation, and player utilities.

Teleportation

CommandWhat It Does
/homeTeleport to your home
/sethomeSet your home location
/delhome <name>Delete a named home
/tpa <player>Request to teleport to a player
/tpahere <player>Request a player teleport to you
/tpacceptAccept a teleport request
/tpdenyDeny a teleport request
/warp <name>Teleport to a warp point
/setwarp <name>Create a warp point (admin)
/delwarp <name>Delete a warp (admin)
/backTeleport to your last location (death or teleport)
/spawnTeleport to the spawn point
/setspawnSet the server spawn point

Economy

CommandWhat It Does
/balCheck your balance
/pay <player> <amount>Pay another player
/eco give <player> <amount>Give money to a player (admin)
/eco take <player> <amount>Take money from a player (admin)
/eco set <player> <amount>Set a player's balance (admin)
/baltopShow the server's richest players

Moderation

CommandWhat It Does
/kick <player> [reason]Kick a player from the server
/ban <player> [reason]Ban a player permanently
/tempban <player> <duration> [reason]Temporarily ban a player
/unban <player>Unban a player
/mute <player> [duration]Mute a player in chat
/unmute <player>Unmute a player
/warn <player> [reason]Warn a player (stored in their record)
/clearinventory <player>Clear a player's inventory
/invsee <player>View and edit a player's inventory
/socialspyToggle seeing all private messages

Player Utilities

CommandWhat It Does
/msg <player> <message>Send a private message
/r <message>Reply to the last player who messaged you
/afkToggle away-from-key status
/flyToggle flight mode (requires permission)
/godToggle god mode (requires permission)
/hatPut the item in your hand on your head
/topTeleport to the highest block at your position
/seen <player>Check when a player was last online
/listList all online players

Kits

CommandWhat It Does
/kit <name>Claim a kit (if you have permission)
/kit create <name> <delay>Create a new kit with your current inventory (delay in seconds)
/kit remove <name>Delete a kit
/kit listList all available kits

Example: stand with the items you want in your inventory, run /kit create starter 86400 — creates a starter kit with 24-hour cooldown.

World Management

Spawn Configuration

A well-designed spawn area sets the tone for your entire server. Here's how to build and protect it.

Setting the Spawn Point

  1. Walk to where you want the spawn to be
  2. Run /setspawn (EssentialsX) — this sets the exact teleport point
  3. Run /spawn to test it

Multi-World Setup with Multiverse-Core

CommandWhat It Does
/mv create <name> normalCreate a new overworld world
/mv create <name> netherCreate a new nether world
/mv create <name> endCreate a new end world
/mv tp <world>Teleport to a world
/mv listList all worlds
/mv setspawnSet spawn for a specific world
/mv import <name> normalImport an existing world folder

Example: /mv create creative normal — creates a creative world. Players can switch with /mv tp creative.

Protecting Spawn with WorldGuard

CommandWhat It Does
/region define spawnCreate a region named "spawn" (use WorldEdit wand to select area first)
/region flag spawn pvp denyDisable PvP in spawn
/region flag spawn mob-spawning denyNo mobs in spawn
/region flag spawn fire-spread denyNo fire spreading
/region flag spawn explosion denyNo explosions (creeper/TNT)
/region flag spawn build denyOnly allowed players can build
/region flag spawn use denyBlock all interactions (doors, buttons, etc.) for non-members
/region addmember spawn <group>Allow a group to bypass spawn restrictions

Recommended Spawn Setup

  • Use WorldEdit to build your spawn structure — it's way faster than building by hand
  • Set up warps with EssentialsX for key locations: /setwarp survival, /setwarp creative
  • Create information NPCs with Citizens plugin — right-click for rules, guides, or server links
  • Add a spawn shop with ChestShop or ShopGUI+ so players can buy starter gear
  • Set a server icon — put a 64x64 PNG named server-icon.png in the server root folder
Security

Security & Anti-Grief Setup

Protect your server against griefers, hackers, and general chaos. These plugins and configurations will save you countless headaches.

CoreProtect — Block Logging & Rollback

CoreProtect logs every single block change on your server. When someone griefs, you can undo everything they did in seconds.

CommandWhat It Does
/co inspectToggle inspection mode — click any block to see its history
/co rollback t:2h r:10 p:PlayerNameRollback everything a player did in the last 2 hours within 10 blocks
/co rollback t:24h a:+TNT_EXPLOSIONRestore all TNT explosion damage from the last 24 hours
/co lookup u:PlayerName a:block-breakView every block a player has broken
/co lookup u:PlayerName a:inventoryView all chest/furnace transactions by a player
/co lookup t:7d r:100See all activity within 100 blocks in the last 7 days
/co restore t:48h u:PlayerNameRESTORE (undo a rollback) — reverse a rollback if you made a mistake

Time format: t:30m = 30 minutes, t:2h = 2 hours, t:1d = 1 day, t:7d = 7 days. Action prefixes: a:+block-break = what was broken, a:-block-place = what was placed.

Anti-Cheat Setup (Grim)

Grim is the best free anti-cheat. It detects kill aura, fly, speed, scaffold, and dozens of other hacks with near-zero false positives.

CommandWhat It Does
/grim alertsToggle receiving violation alerts
/grim profile <player>View a player's detailed violation profile
/grim verboseShow all checks being tested in real-time
/grim reloadReload config

WorldGuard — Region Protection

CommandWhat It Does
/region define <name>Create a region (select area with WorldEdit wand first)
/region flag <region> <flag> <value>Set a region flag (pvp, mob-spawning, build, etc.)
/region addmember <region> <player>Add a player as region member
/region addowner <region> <player>Add a region owner (can edit flags)
/region remove <name>Delete a region
/region listList all regions
/region info <name>View region details

Example: /region flag spawn pvp deny — disables PvP in the spawn region.

WorldGuard Flag Reference

FlagValuesWhat It Controls
pvpallow / denyCan players fight each other?
mob-spawningallow / denyCan mobs spawn naturally?
explosionallow / denyCan TNT/creepers explode?
fire-spreadallow / denyCan fire spread?
buildallow / denyCan non-members build?
useallow / denyCan non-members use doors/buttons/levers?
sleepallow / denyCan players sleep in beds?
enderpearlallow / denyCan ender pearls be thrown?
vehicle-destroyallow / denyCan vehicles (boats/minecarts) be destroyed?
greetingtextMessage shown when entering the region
farewelltextMessage shown when leaving the region

NoCheatPlus (Alternative Anti-Cheat)

CommandWhat It Does
/ncpMain NoCheatPlus info command
/ncp reloadReload NCP config
/ncp player <player>Check a player's violation levels

Anti-Grief Checklist

  • CoreProtect — installed and logging to a database (use MySQL for cross-server logging)
  • WorldGuard — spawn protected, key areas flagged
  • GriefPrevention or Lands — let players claim and protect their own builds
  • Anti-cheat — Grim or NoCheatPlus running with default config (tune as needed)
  • LuckPerms — no OP on any player. Use permission groups with clear hierarchies
  • DiscordSRV — staff alerts for bans, kicks, and suspicious activity
  • Automated backups — hourly world backups stored off-server. Test restores monthly
  • Log inspection — review CoreProtect and server logs weekly for patterns

More lessons coming as I write them. If there's something specific you want covered, open a ticket and yell at me.

Back to Home