Skip to content

A plugin that allows you to restart your papermc server without interfering your cpu usage, as well as with Rich-Premium features

License

Notifications You must be signed in to change notification settings

DemonZDevelopment/-DMZ-ReStart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔄 DMZ ReStart Plugin

Professional Minecraft Server Restart Management

GitHub release GitHub build License Java Minecraft

Advanced server restart plugin with timezone support, performance monitoring, and rich integrations

📖 Documentation⬇️ Download🐛 Issues💬 Discord


Key Features

🕐 Smart Scheduled Restarts

  • Multiple daily restarts with precise timing
  • Global timezone support (Asia/Kolkata, UTC, America/New_York, etc.)
  • Day-specific scheduling (weekdays, weekends, custom days)
  • Intelligent countdown system with configurable warnings

📊 Performance Monitoring

  • Real-time TPS tracking with automatic restart triggers
  • Memory usage monitoring to prevent memory leaks
  • Smart debug logging (every 5 hours to prevent spam)
  • Emergency restart system for critical server conditions

🔔 Rich Alert System

  • Multi-channel alerts: Chat messages, titles, action bars, sounds
  • Customizable formatting with full color code support
  • Player permission filtering for notification control
  • Emergency alerts with distinct styling and priority

🔗 Professional Integrations

  • PlaceholderAPI: 8+ placeholders for MOTDs, scoreboards, tab lists
  • LuckPerms: Advanced permission system integration
  • Paper/Spigot: Optimized for modern server software
  • Developer API: Full API for other plugins to integrate

🚀 Quick Start

📋 Requirements

  • Minecraft Server: Paper 1.19+ (Spigot compatible)
  • Java Version: Java 17 or higher
  • Optional: PlaceholderAPI, LuckPerms

⬇️ Installation

  1. Download the latest release from GitHub Releases
  2. Place DMZ-ReStart-x.x.x.jar in your plugins/ folder
  3. Start your server to generate configuration files
  4. Configure the plugin in plugins/DMZ-ReStart/config.yml
  5. Reload with /dmzrestart reload or restart your server

⚙️ Basic Configuration

scheduled-restarts:
  enabled: true
  timezone: "Asia/Kolkata"  # Your server timezone
  times:
    - "00:00"  # Midnight
    - "06:00"  # Morning  
    - "12:00"  # Noon
    - "18:00"  # Evening
  days:
    - "ALL"    # Every day

🎮 Commands & Permissions

Commands

Command Description Permission
/dmzrestart Show plugin status dmzrestart.use
/dmzrestart now <seconds> Restart server immediately dmzrestart.restart.now
/dmzrestart schedule <seconds> Schedule a restart dmzrestart.restart.schedule
/dmzrestart cancel Cancel pending restart dmzrestart.restart.cancel
/dmzrestart reload Reload configuration dmzrestart.config.reload
/dmzrestart status Detailed server status dmzrestart.status

Key Permissions

  • dmzrestart.admin - Full access to all features
  • dmzrestart.notify - Receive restart notifications
  • dmzrestart.use - Basic plugin usage

📊 PlaceholderAPI Integration

Perfect for MOTDs, scoreboards, tab lists, and more!

Placeholder Output Example Use Case
%dmzrestart_next_restart% 2023-12-25 18:00:00 Asia/Kolkata MOTD, Info displays
%dmzrestart_time_until% 2h 30m Scoreboards, Tab lists
%dmzrestart_tps% 19.8 Performance monitors
%dmzrestart_memory% 67.3% Server status displays
%dmzrestart_status% Normal operation Status indicators

Example: Scoreboard Integration

# FeatherBoard config
board:
  title: "&6&lServer Info"  
  lines:
    - "&eNext restart: &c%dmzrestart_time_until%"
    - "&eTPS: &c%dmzrestart_tps% &8| &eMemory: &c%dmzrestart_memory%"
    - "&7Status: &c%dmzrestart_status%"

📈 Performance Monitoring

Automatic Performance Restarts

monitoring:
  enabled: true
  tps-threshold: 18.0        # Restart if TPS drops below 18
  memory-threshold: 85.0     # Restart if memory exceeds 85%
  consecutive-checks: 3      # Require 3 bad readings
  check-interval: 30         # Check every 30 seconds

Emergency System

emergency:
  enabled: true
  tps-threshold: 12.0        # Critical TPS (immediate restart)
  memory-threshold: 95.0     # Critical memory (immediate restart)  
  delay: 30                  # Warning period before restart
  emergency-cooldown-minutes: 5  # Prevent restart spam

🔧 Advanced Features

Developer API

// Get plugin instance
DMZRestartPlugin plugin = (DMZRestartPlugin) Bukkit.getPluginManager()
    .getPlugin("DMZ-ReStart");

// Schedule custom restart
plugin.getRestartManager().scheduleRestart(300, RestartReason.API, "MyPlugin");

// Monitor performance
double tps = plugin.getServerLoadMonitor().getLastTPS();
boolean healthy = plugin.getServerLoadMonitor().isHealthy();

// Listen for restart events
@EventHandler
public void onRestart(RestartEvent event) {
    getLogger().info("Restart triggered: " + event.getReason().getDisplayName());
}

Smart Debug System

  • Debug messages appear every 5 hours (configurable) to prevent console spam
  • Detailed performance summaries with uptime, player count, world count
  • Emergency condition tracking and analysis
  • Restart history and statistics

🛠️ Troubleshooting

Common Issues & Solutions

❌ Scheduled restarts not working?

  • Ensure times are in ascending order (00:00, 06:00, 12:00, 18:00)
  • Check timezone setting matches your server location
  • Verify scheduled-restarts.enabled: true

❌ Emergency restarts spamming?

  • Update to latest version (includes spam protection)
  • Check emergency thresholds aren't too sensitive
  • Increase emergency-cooldown-minutes

❌ Placeholders not working?

  • Install PlaceholderAPI plugin
  • Enable placeholders: placeholders.enabled: true
  • Use /papi reload after changes

🔍 Enable debug mode for detailed diagnostics:

general:
  debug-mode: true
logging:  
  debug-logging: true

📸 Screenshots

Plugin Status Display

Plugin Status

Alert System in Action

Alert System

PlaceholderAPI Integration

PlaceholderAPI

🏆 Why Choose DMZ ReStart?

Professional Grade: Built for production servers with enterprise-level reliability
Zero Spam: Smart logging and emergency cooldowns prevent console flooding
Global Ready: Full timezone support for international servers
Rich Integrations: Works seamlessly with PlaceholderAPI, LuckPerms, and more
Performance Focused: Lightweight with async operations and optimized monitoring
Developer Friendly: Full API with events and hooks for other plugins
Actively Maintained: Regular updates with community-driven features
Comprehensive Docs: Complete wiki with examples and troubleshooting


📊 Statistics

GitHub Stars GitHub Forks Downloads


🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📞 Support & Community


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by DemonZ Development

Professional Minecraft server solutions for the modern era

GitHub Website

About

A plugin that allows you to restart your papermc server without interfering your cpu usage, as well as with Rich-Premium features

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages