Skip to content

Repository files navigation

RocketFlow

Release (latest by date) Workflow Status License Downloads Issues

What is RocketFlow?

RocketFlow is a lightweight RocketMod library for Unturned plugins. It gives you a clean, event-driven API with precise event-listening prioritization, so you have full control over the order in which your handlers run.

Instead of subscribing to RocketMod's raw events directly, you:

  1. Mark your methods with the [EventHandler] attribute.
  2. Register your class or plugin with EventManager.
  3. RocketFlow does the rest - it listens to Unturned/RocketMod for you and fires your handlers in priority order.

RocketFlow ships with 90+ ready-made events covering players, barricades, structures, vehicles, items, damage, the world, and more.

Features

  • Priority-based execution - control exactly when your handlers run with LOWEST, LOW, NORMAL, HIGH, and HIGHEST priorities.
  • 90+ built-in events - from player chat and damage to barricades, vehicles, and level loading.
  • Cancellation support - many events implement ICancellable. Cancel them from any handler, and lower-priority handlers are skipped automatically.
  • Attribute-based setup - no manual event wiring, no unsubscribe juggling.
  • Clean unregistration - unregister a single listener, a whole plugin, or an entire assembly with one call.
  • Fast dispatch - event invokers are compiled with expression trees, so the overhead is minimal.
  • Zero configuration - one Initialize() call sets everything up.

Requirements

  • Unturned 3.24.x or later
  • RocketMod installed on the server
  • .NET Framework 4.8

Quick Start

using Rocket.Core.Plugins;
using Tavstal.RocketFlow.Attributes;
using Tavstal.RocketFlow.Core;
using Tavstal.RocketFlow.Events.Player.Movement;

namespace MyPlugin
{
    public class Main : RocketPlugin, EventListener
    {
        protected override void Load()
        {
            RocketFlow.Initialize();
            EventManager.RegisterAll(this);
        }

        [EventHandler]
        public void OnPlayerMove(PlayerMoveEvent e)
        {
            Rocket.Core.Logging.Logger.Log($"{e.Player.CharacterName} moved to {e.Position}");
        }
    }
}

Documentation

  • Getting Started - requirements, installation, and your first event handler.
  • Event Reference - every event grouped by category, with descriptions and cancellation info.
  • API Reference - the core classes and how they work.

Building from Source

Prerequisites

  • .NET Framework 4.8 SDK / targeting pack

Build Steps

  1. Clone the repository:
    git clone https://github.com/TavstalDev/RocketFlow.git
    
  2. Open RocketFlow.sln in your IDE.
  3. Build the project:
    dotnet build -c Release
    
  4. The compiled RocketFlow.dll will be in RocketFlow/bin/Release/.

Example Plugin

A complete working example is included in the RocketFlow.Example project. Read its source alongside the Getting Started guide to see everything in action.

License

This project is licensed under the MIT license. See the LICENSE file for more details.

Contact

For issues or feature requests, please use the GitHub issue tracker.

About

RocketFlow is a lightweight RocketMod library that brings precise event-listening prioritization to Unturned plugins, giving you full control over execution order.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages