Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

VelocityReconnect Plugin

Automatically reconnect players when backend servers crash or restart.

Features

  • Keeps Players Connected: Players stay in-world during server restarts
  • Visual Feedback: Animated titles and action bars with countdown
  • Fully Configurable: Customize or disable any message
  • Fallback Support: Sends players to lobby if reconnection fails

Requirements

  • Velocity 3.4.0+
  • Java 17+

Installation

mvn clean package

Copy target/VelocityReconnect-1.0.0.jar to your Velocity plugins/ folder and restart.

Configuration

Config file: plugins/velocityreconnect/config.toml

Basic Settings

max-reconnect-time = 30    # Total reconnect timeout (seconds)
countdown-duration = 15     # Visual countdown timer (seconds)
reconnect-delay = 1         # Delay between attempts (seconds)
fallback-server = "lobby"   # Where to send on failure
show-titles = true          # Enable/disable all titles

Messages (Animation)

Each message type uses frames that cycle for animation. Use [] to disable any element.

[messages]
# Title animation frames
title-frames = [
    "§e🔄 Reconnecting",
    "§e🔄 Reconnecting.",
    "§e🔄 Reconnecting..",
    "§e🔄 Reconnecting..."
]

# Subtitle frames (use %countdown% for timer)
subtitle-frames = [
    "§7Please wait... §c%countdown%s"
]

# Action bar frames
actionbar-frames = [
    "§6⏳ Reconnecting... §e%countdown%s left"
]

# When countdown reaches 0
title-countdown-end = "§c⚠ Still reconnecting..."
subtitle-countdown-end = ""
actionbar-countdown-end = ""

Disable Examples

# Title only, no subtitle/action bar
subtitle-frames = []
actionbar-frames = []

# Completely silent
title-frames = []
subtitle-frames = []
actionbar-frames = []

How It Works

  1. Server crashes → Player stays connected to proxy (not kicked!)
  2. Animated messages → Title/subtitle/action bar cycle through frames
  3. Countdown → Shows remaining time (configurable)
  4. Reconnection → Automatic attempts every second
  5. Success → Player back on server seamlessly
  6. Timeout → Redirected to fallback server
  7. Fallback fails → Kicked with message

For Developers

Project Structure

VelocityReconnectPlugin - Main plugin class
ReconnectManager - Handles reconnect logic and timers
PluginConfig - TOML configuration parser
ServerDisconnectListener - Event handlers

Key Features

  • Thread-safe task management
  • Smart kick detection (ban/whitelist vs crash)
  • Frame-based animation system
  • Independent countdown timer from actual timeout

Events Used

  • KickedFromServerEvent - Starts reconnect with RedirectPlayer
  • ServerConnectedEvent - Cancels reconnect on success
  • DisconnectEvent - Cleanup on disconnect

License

Open-source project

Inspired by Bungee-Reconnect functionality

About

Velocity port of the plugin Bungee-Reconnect with no-kick functionality to keep players online

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages