HomeJavaModsMonoceros | With Fluxon scripts driving everything
Monoceros | With Fluxon scripts driving everything
ModsJava

Monoceros | With Fluxon scripts driving everything

⬇ Download on Spigot
upload_2026-7-1_18-26-21.png

Monoceros
A Minecraft Server Mechanics and Gameplay Platform

Cross-version server infrastructure built on TabooLib, covering Minecraft 1.12.2 through 26.1.2, with Fluxon scripts driving everything.

[​IMG]
[​IMG]



What Is Monoceros?

Monoceros is designed for Minecraft server gameplay development. It provides a complete infrastructure layer for building custom server mechanics:


Stop rebuilding the same foundation for every mechanic. Put your time back into gameplay design.



Core Features

1. Fluxon Scripting Engine

Monoceros uses Fluxon as its unified scripting runtime. Event listeners, commands, scheduled tasks, and workflow nodes can all be driven by scripts.

Scripts are loaded from the file system and support incremental hot reload, precompiled caching, SHA-256 change detection, and real-time FileWatcher monitoring.

Code (Text):
// script/dispatcher/player-join.fs
// Automatically runs when a player joins
print("Player ${&?player} joined the server")
Code (Text):
// script/action/combat.hit-feedback.fs
// Combat hit feedback
dmg = &?damage ?: 0
print("[Combat] Hit feedback: damage=${&dmg}")
Reserved system variables: sender, player, source, scriptId, now, and thread. They can be used directly in scripts.

Monoceros automatically imports cc.bkhk.monoceros.*, cc.bkhk.monoceros.api.*, org.bukkit.*, org.bukkit.entity.*, and org.bukkit.inventory.*, so manual imports are usually not required.

Scripts can directly access the Monoceros API through static calls. Relevant methods are annotated with @JvmStatic:

Code (Text):
api = static cc.bkhk.monoceros.Monoceros.api()
plugin = static cc.bkhk.monoceros.Monoceros.plugin()
session = &api.sessions().getOrCreate(&p.getUniqueId())
Built-in Extension Functions

Monoceros registers seven categories of extension functions into the Fluxon runtime. They can be called directly from scripts without imports:


2. Event Dispatcher System

Monoceros manages event listeners through a unified Dispatcher system:

Code (Text):
# dispatcher/player-join.yml
id: player.join.welcome
listen-event: PlayerJoinEvent
listen-priority: NORMAL
weight: 20
execute:
  route: script
  value: dispatcher.player-join
variables:
  triggerSource: join

For states that Bukkit does not expose as native events, such as armor changes, Monoceros fills the gap through StateProbe.

3. Scheduler System

Monoceros supports four schedule types: delay ( DELAY), periodic ( PERIODIC), cron expression ( CRON), and conditional trigger ( CONDITIONAL).

Code (Text):
# schedule/broadcast.yml
id: world.tick.broadcast
type: periodic
delay: 20t
period: 200t
auto-start: true
async: false
max-runs: -1
execute:
  route: script
  value: schedule.world.tick.broadcast
variables:
  triggerSource: periodic

4. Action Workflows

Break complex logic into ordered node chains. Configuration becomes executable logic:

Code (Text):
# workflow/action/combat-hit.yml
id: combat.hit-feedback
failure-policy: continue
nodes:

  - id: log-hit
    type: log
    message: "Combat hit feedback triggered"
  - id: set-damage
    type: set
    key: damage
    value: 10
  - id: run-script
    type: script
    script: action.combat.hit-feedback
Monoceros includes 15 built-in action nodes:


Control flow supports Continue, Delay for asynchronous continuations without blocking, Branch for conditional branches, and Break for interruption.

5. Packet Listening with Wireshark

Low-level packet listening, filtering, tracing, interception, and rewriting:

Code (Text):
# wireshark/example.yml
id: example.packet.trace
direction:

  - send
  - receive
    matcher:
      type: packet-name
      value: PacketPlayOutChat
    tracking: true
    parse: true
    intercept: false
    route:
      type: script
      value: debug.packet.trace
Code (Text):
// script/debug/packet.trace.fs
name = &?packetName ?: "unknown"
cls = &?packetClass ?: ""
print("[Wireshark] Trace: ${&name} (${&cls})")

6. Volatility

Client-side illusion effects that do not modify the real server state:


7. Property System

A unified property read/write framework covering core Bukkit objects:




Six Extension Domains

Entity Domain

Entity operations: damage, healing, teleportation, potion effects, attribute toggles, and equipment setting.
Location operations: construction, cloning, modification, arithmetic, and distance calculation.
Vector operations: a complete 3D math library, including normalization, dot product, cross product, and rotation.

Event Domain

Event control: cancellation, ignore flags, property writing, and reply messages.
Asynchronous waiting: event.wait can wait asynchronously for a specified event to be triggered, with timeout support.

Illusion Domain


Item Domain

Full item lifecycle: build items, change names, lore, enchantments, flags, durability, colors, and tags.
Item operations: consume, destroy, drop, and give.
Inventory operations: check, count, find, switch, and take out.
Potion operations: query, set, remove, and clear.

Memory Domain

Key-value storage across six scopes: GLOBAL / PLAYER / ENTITY / WORKFLOW / SCRIPT / SESSION.
TTL expiration is supported, such as 3000ms or 3s, with automatic expiration checks and thread-safe storage.

Target Domain

Nine target selection modes: self, world, whole server, radius, cuboid, nearest N targets, ring, specified player, and line-of-sight selection.
Target operations: filter by type, filter by script condition, and execute child workflows for each target.



Five Gameplay Mechanic Domains

Combat Mechanics


Region Mechanics


Interaction Mechanics


Visual Mechanics


Session Mechanics




Command System

Main command: /monoceros, alias: /mono, permission prefix: monoceros.command.

Code (Text):
/mono reload [service]        Reload all services or a specific service
/mono version                 Show the version
/mono debug                   Toggle debug mode
/mono status                  Show all service states and the environment profile
/mono selfcheck               Run self-check and output issues and suggestions

/mono script run <id>         Run a script
/mono script debug <id>       Run a script in debug mode and return synchronous cost
/mono script stop <id>        Stop script tasks
/mono script task list        List active tasks
/mono script reload           Reload script definitions
/mono script preheat          Preheat all scripts
/mono script stats            Show cache statistics

/mono schedule start <id>     Start a schedule
/mono schedule pause <id>     Pause a schedule
/mono schedule resume <id>    Resume a schedule
/mono schedule stop <id>      Stop a schedule
/mono schedule detail [id]    View schedule details with interactive operation buttons

/mono dispatcher reload       Reload dispatchers
/mono dispatcher enable <id>  Enable a dispatcher
/mono dispatcher disable <id> Disable a dispatcher
Command definitions are also configurable. Parameter types include STRING / INT / DOUBLE / BOOLEAN / PLAYER / WORLD / MATERIAL / SCRIPT_ID.



Configuration-Driven and Hot-Reload Friendly

All core features are driven by YAML configuration. Changes can be applied immediately with /mono reload:

Code (Text):
plugins/Monoceros/
├── config.yml                 # Main configuration
├── dispatcher/                # Event dispatcher definitions
│   └── player-join.yml
├── schedule/                  # Schedule definitions
│   └── broadcast.yml
├── wireshark/                 # Packet Tap definitions
│   └── example.yml
├── workflow/
│   └── action/                # Action workflow definitions
│       └── combat-hit.yml
├── script/                    # Fluxon scripts
│   ├── dispatcher/
│   ├── schedule/
│   ├── action/
│   ├── command/
│   ├── debug/
│   └── shared/
└── lang/                      # Internationalization files
    ├── zh_CN.yml
    └── en_US.yml
File change detection is based on SHA-256 plus FileWatcher, so only files that actually changed are reloaded instead of refreshing everything.

Command reload uses delayed registration to avoid conflicts with Paper's asynchronous command-tree construction thread, keeping hot reload clean and error-free.



Cross-Version Support

Monoceros covers Minecraft 1.12.2 through 26.1.2. Version differences are handled through modular layers:




Operations and Diagnostics




AI-Assisted Development Examples

Monoceros provides a Monoceros AI Skill that can be used directly in AI coding assistants with Skill support, such as Kiro. This Skill includes knowledge of Monoceros configuration formats, mechanic services, and Fluxon scripting syntax, helping the assistant generate more accurate configurations and scripts.

The Skill files are available in the repository: https://github.com/YsGqHY/Monoceros/tree/master/.claude/skills

How to use it: place the Skill files into the corresponding directory of your AI coding assistant, then describe your requirement in a conversation. The AI will automatically call the Monoceros Skill to retrieve the relevant knowledge before generating the result.

Example 1: Writing a Fluxon Script

Code (Text):
User: Write a Fluxon script that gives a player a glowing effect and sends a warning when their health drops below 30%.

AI automatically calls Skill: Monoceros
Based on the Fluxon syntax and Monoceros context-variable knowledge provided by the Skill, the AI generates an accurate script:

Code (Text):
// script/mechanic/low-health-warning.fs
health = &?player.getHealth()
maxHealth = &?player.getMaxHealth()
ratio = &health / &maxHealth

if (&ratio < 0.3) {
    &?player.setGlowing(true)
    &?player.sendMessage("&cWarning: your health is below 30%!")
} else {
    &?player.setGlowing(false)
}
Example 2: Generating a Complete Configuration Plan

Code (Text):
User: Help me create a region guard mechanic. When a player enters a specified area, they take damage every 3 seconds. The effect stops after they leave.

AI automatically calls Skill: Monoceros
Based on the dispatcher, scheduler, and workflow configuration knowledge in the Skill, the AI generates a complete solution in one pass:

Dispatcher configuration:
Code (Text):
# dispatcher/region-guard-enter.yml
id: region.guard.enter
listen-event: PlayerMoveEvent
listen-priority: NORMAL
weight: 10
execute:
  route: action-workflow
  value: region.guard.damage-loop
rules:

  - type: script
    value: |
      loc = &?player.getLocation()
      x = &loc.getX()
      z = &loc.getZ()
      &x > 100 && &x < 200 && &z > 100 && &z < 200
    variables:
      triggerSource: region-enter
Schedule configuration:
Code (Text):
# schedule/region-guard-tick.yml
id: region.guard.tick
type: periodic
delay: 0t
period: 60t
auto-start: true
async: false
execute:
  route: script
  value: mechanic.region-guard.tick
Script:
Code (Text):
// script/mechanic/region-guard.tick.fs
// Deals 2 damage to players inside the region every 3 seconds
players = static org.bukkit.Bukkit.getOnlinePlayers()

for p in &players {
    loc = &p.getLocation()
    x = &loc.getX()
    z = &loc.getZ()
    if (&x > 100 && &x < 200 && &z > 100 && &z < 200) {
        &p.damage(2.0)
        &p.sendMessage("&cYou are taking damage from the region guard!")
    }
}
Example 3: Debugging Packets

Code (Text):
User: Help me write a Wireshark configuration that traces all entity spawn packets sent to players.

AI automatically calls Skill: Monoceros
Code (Text):
# wireshark/entity-spawn-trace.yml
id: debug.entity.spawn
direction:

  - send
    matcher:
      type: packet-name
      value: PacketPlayOutSpawnEntity
    tracking: true
    parse: true
    intercept: false
    route:
      type: script
      value: debug.entity-spawn
Code (Text):
// script/debug/entity-spawn.fs
name = &?packetName ?: "unknown"
print("[Debug] Entity spawn packet: ${&name}")
print("  Target player: ${&?player}")
print("  Timestamp: ${&?now}")
Example 4: Designing an Action Workflow

Code (Text):
User: Help me create a beginner guide workflow that sends a welcome message, gives items, and plays a sound in sequence.

AI automatically calls Skill: Monoceros
Code (Text):
# workflow/action/newbie-guide.yml
id: newbie.guide
failure-policy: continue
nodes:

  - id: welcome-title
    type: tellraw
    message: "&6&lWelcome to the server!"
  - id: wait-a-bit
    type: wait
    ticks: 40
  - id: give-item-script
    type: script
    script: action.newbie.give-starter-kit
  - id: play-sound
    type: sound
    sound: ENTITY_PLAYER_LEVELUP
    volume: 1.0
    pitch: 1.0
  - id: guide-message
    type: tellraw
    message: "&aYou have received a starter kit. Enjoy your adventure!"
Code (Text):
// script/action/newbie.give-starter-kit.fs

// Give starter kit
inv = &?player.getInventory()
sword = new org.bukkit.inventory.ItemStack(static org.bukkit.Material.IRON_SWORD)
meta = &sword.getItemMeta()
&meta.setDisplayName("&bStarter Sword")
&meta.setLore(["&7Made for new players"])
&sword.setItemMeta(&meta)

food = new org.bukkit.inventory.ItemStack(static org.bukkit.Material.COOKED_BEEF, 16)

&inv.addItem(&sword, &food)
&?player.sendMessage("&aStarter kit delivered!")


Quick Start

  1. Put the Monoceros plugin into your plugins/ directory.
  2. Start the server. Monoceros will generate the default configuration and example files automatically.
  3. Edit configuration files under dispatcher/, schedule/, script/, and related directories.
  4. Use /mono reload to hot-reload changes instantly.
  5. Use /mono status to inspect service states and /mono selfcheck to troubleshoot problems.



Why Choose Monoceros?




Links

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Monoceros | With Fluxon scripts driving everything is a free Minecraft Java mod. Compatible with Minecraft 1.12, 1.13, 1.14, 1.15 and newer. Downloaded 6 times (via Spigot). Download it and open it directly in the game.

Explore more