Skip to main content
The Maintenance plugin supports SpongeAPI 8.0+ for Sponge-powered Minecraft servers.

Requirements

  • SpongeAPI 8.0.0 or higher
  • Java 17 or higher
  • Sponge server (SpongeVanilla or SpongeForge)

Installation

  1. Download the latest version from Hangar
  2. Place the JAR file in your server’s mods/ directory (not plugins/)
  3. Restart your server
  4. Configure the plugin in config/maintenance/config.yml
Unlike Bukkit-based servers, Sponge plugins are loaded from the mods/ directory.

Sponge-Specific Differences

Configuration Location

Sponge uses a different directory structure:
  • Config: config/maintenance/config.yml
  • Languages: config/maintenance/language/
  • Icon: config/maintenance/maintenance-icon.png

Plugin Loading

Sponge plugins use a different metadata format defined in META-INF/sponge_plugins.json:
{
  "loader": {
    "name": "java_plain",
    "version": "1.0"
  },
  "plugins": [
    {
      "id": "maintenance",
      "name": "Maintenance",
      "version": "${version}",
      "entrypoint": "eu.kennytv.maintenance.sponge.MaintenanceSpongePlugin"
    }
  ]
}

Features

Custom Server List

Customize your server list appearance during maintenance:
  • Custom MOTD - Display maintenance messages
  • Custom Icon - Show a different favicon (64x64 PNG)
  • Player Count - Customize player count display

Maintenance Whitelist

Allow specific players to join during maintenance:
/maintenance add <player>
/maintenance remove <player>

Scheduled Maintenance

Schedule maintenance with timers:
/maintenance start 1h    # Enable maintenance in 1 hour
/maintenance end 30m     # Disable maintenance in 30 minutes
Use %TIMER% placeholder in your MOTD to show countdown.

Player Kick

When maintenance is enabled:
  • Players without bypass permission are kicked
  • Whitelisted players can join
  • Custom kick message is displayed

Plugin Integrations

ServerListPlus

Optional integration - Automatically detected. Maintenance integrates with ServerListPlus for enhanced server list customization.

LuckPerms

Optional integration - Context support planned. LuckPerms integration is prepared but currently disabled in the codebase. Future versions may enable maintenance context support.

Configuration

The configuration file is located at config/maintenance/config.yml:
# Enable or disable maintenance mode
maintenance: false

# Show custom MOTD during maintenance
enable-pingmessages: true

# Kick players when enabling maintenance
kick-players: true

# Custom kick message
kick-message: "The server is currently under maintenance!"

# Whitelisted player UUIDs
whitelisted-players: []

# Custom server icon during maintenance
custom-icon: true

# MOTD configuration
motd:
  maintenance:
    - "Server is under maintenance"
    - "Check back soon!"

Icon Setup

Place your maintenance icon at config/maintenance/maintenance-icon.png:
  • Must be 64x64 pixels
  • PNG format
  • Automatically loaded on server start

Permissions

Sponge uses its built-in permissions system:
PermissionDescription
maintenance.commandAccess to /maintenance command
maintenance.bypassJoin server during maintenance
maintenance.adminFull administrative access
maintenance.joinnotificationReceive join attempt notifications
Configure permissions using Sponge’s permission plugins (e.g., LuckPerms).

Commands

All commands use /maintenance or /mt:
/maintenance on              # Enable maintenance mode
/maintenance off             # Disable maintenance mode
/maintenance add <player>    # Add player to whitelist
/maintenance remove <player> # Remove from whitelist
/maintenance start <time>    # Schedule maintenance start
/maintenance end <time>      # Schedule maintenance end
/maintenance reload          # Reload configuration

Unsupported Features

The following features are only available on proxy platforms (BungeeCord/Velocity):
  • Redis integration - Multi-proxy synchronization
  • Per-server maintenance - Sponge runs single servers
  • Fallback servers - Proxy-only feature
  • Waiting server - Proxy-only feature
  • Player count message customization - Limited in single-server context
  • Timer-specific player count - Proxy feature
  • Single maintenance commands - Requires proxy
These features require a proxy architecture and are not applicable to single Sponge servers.

SpongeForge vs SpongeVanilla

SpongeForge

Maintenance works on SpongeForge servers (Sponge + Forge mods):
  • Place JAR in mods/ directory
  • Compatible with Forge mods
  • Config in config/maintenance/

SpongeVanilla

Maintenance works on SpongeVanilla servers (pure Sponge):
  • Place JAR in mods/ directory
  • No Forge required
  • Config in config/maintenance/
Functionality is identical on both platforms.

API Usage

For Sponge plugin developers:
import eu.kennytv.maintenance.api.Maintenance;
import eu.kennytv.maintenance.api.MaintenanceProvider;
import org.spongepowered.plugin.builtin.jvm.Plugin;

@Plugin("yourplugin")
public class YourPlugin {
    private Maintenance maintenance;

    public void onEnable() {
        // Get Maintenance API
        maintenance = MaintenanceProvider.get();
        
        // Check if maintenance is enabled
        boolean isMaintenance = maintenance.isMaintenance();
        
        // Enable/disable maintenance
        maintenance.setMaintenance(true);
        
        // Add player to whitelist
        UUID playerUUID = UUID.fromString("...");
        maintenance.getSettings().addWhitelistedPlayer(playerUUID);
    }
}
See the API documentation for complete details.

Event System

Maintenance fires events through Sponge’s event system:
import eu.kennytv.maintenance.api.event.MaintenanceChangedEvent;
import org.spongepowered.api.event.Listener;

@Listener
public void onMaintenanceChange(MaintenanceChangedEvent event) {
    if (event.isMaintenance()) {
        // Maintenance was enabled
    } else {
        // Maintenance was disabled
    }
}

Troubleshooting

Plugin not loading

Check:
  1. JAR is in mods/ directory (not plugins/)
  2. SpongeAPI 8.0+ is installed
  3. Java 17+ is being used
  4. Check server logs for errors

Players can still join

Verify:
  1. Maintenance is actually enabled: /maintenance on
  2. Players don’t have maintenance.bypass permission
  3. Players aren’t on whitelist: /maintenance remove <player>
  4. Configuration is correct in config/maintenance/config.yml

Custom icon not showing

Ensure:
  1. Icon is 64x64 pixels PNG format
  2. Located at config/maintenance/maintenance-icon.png
  3. custom-icon: true in config
  4. Server was restarted after adding icon

Commands not working

Check:
  1. You have maintenance.command permission
  2. Using correct syntax: /maintenance <on|off>
  3. No conflicting plugins with same command
  4. Check console for error messages

Performance

Maintenance is lightweight and optimized for Sponge:
  • Minimal CPU usage
  • Efficient event handling
  • No impact on TPS
  • Async operations where possible

Limitations

Due to Sponge’s architecture:
  1. No game reload support - Must restart server to reload (commented out in code)
  2. Limited plugin file access - Some operations throw UnsupportedOperationException
  3. No proxy features - Single server only
These are platform limitations, not plugin bugs.

Migration from Bukkit/Spigot

If migrating from Bukkit to Sponge:
  1. Export whitelist from old server
  2. Copy UUIDs from old config.yml
  3. Place in new config at config/maintenance/config.yml
  4. Update permissions in LuckPerms or your permission plugin
  5. Move icon to new location
Configuration format is compatible across platforms.

Build docs developers (and LLMs) love