Skip to content

Repository files navigation

Nebula Alpha

A server mod for Minecraft Alpha 1.0.15, inspired by hey0's hMod and Llamacraft.

Nebula patches the original server JAR using ASM bytecode transformation to inject hooks for plugins, commands, anti-grief, and permissions — without modifying the original source code.

Features

  • Plugin API — Load plugins from JAR files with event listeners and commands
  • Event System — Cancellable events: chat, join, quit, block break/place, server tick
  • Command System — Extensible command registry with permissions and aliases
  • Anti-Grief — Configurable protection: disable TNT, fire, lava; spawn protection radius
  • Permissions — Group-based permission system with colored prefixes
  • Built-in Commands/help, /kick, /ban, /tp, /give, /list, /setrank, /antigrief, /stop, /say, /home, /msg

Requirements

  • Java 8 JDK (e.g., Amazon Corretto 8). Make sure your JAVA_HOME environment variable is set to your JDK 8 installation directory.
  • Minecraft Alpha 1.0.15 server JAR (a0.1.0.jar)

Setup

  1. Build the patcher:

    gradlew fatJar
    

    This produces build/libs/nebula-alpha.jar.

  2. Create a server directory and place both files:

    server/
    ├── a0.1.0.jar          (original Alpha server)
    └── nebula-alpha.jar     (Nebula patcher)
    
  3. Run the patcher:

    java -jar nebula-alpha.jar
    

    This creates server-nebula.jar — the patched server.

  4. Launch the patched server:

    java -jar server-nebula.jar
    

    Or use auto-launch:

    java -jar nebula-alpha.jar --launch
    

Configuration

On first run, Nebula creates nebula.json:

Note: Minecraft uses the § character for color codes. You can customize prefixes and messages with these codes.

{
  "antiGriefEnabled": true,
  "disableFire": true,
  "disableTNT": true,
  "disableLavaGrief": true,
  "spawnProtectionRadius": 16,
  "maxPlayers": 20,
  "motd": "Welcome to Nebula Alpha!",
  "announceJoinQuit": true,
  "groups": {
    "admin": { "prefix": "[Admin]§f ", "permissions": ["*"] },
    "moderator": { "prefix": "[Mod]§f ", "permissions": ["nebula.kick", "nebula.ban", "nebula.tp", "nebula.give", "nebula.antigrief"] },
    "default": { "prefix": "", "permissions": ["nebula.home", "nebula.list", "nebula.help"] }
  },
  "bannedPlayers": [],
  "bannedIPs": [],
  "ops": []
}

Commands

Command Permission Description
/help Show available commands
/list List online players
/home Teleport to spawn
/msg <player> <message> Private message
/kick <player> [reason] nebula.kick Kick a player
/ban <player> nebula.ban Ban/unban a player
/tp <player> or /tp <x> <y> <z> nebula.tp Teleport
/give <player> <id> [amount] nebula.give Give items
/setrank <player> <group> nebula.setrank Set permission group
/antigrief [fire|tnt|lava|all] [on|off] nebula.antigrief Toggle anti-grief
/say <message> nebula.say Broadcast server message
/stop nebula.stop Stop the server

Writing Plugins

  1. Create a JAR with a class extending dev.gura1.nebula.api.Plugin
  2. Include a plugin.json in the JAR root:
    {
      "name": "MyPlugin",
      "version": "1.0",
      "main": "com.example.MyPlugin"
    }
  3. Place the JAR in the plugins/ directory

Example Plugin

import dev.gura1.nebula.Nebula;
import dev.gura1.nebula.api.Plugin;
import dev.gura1.nebula.api.event.*;

public class MyPlugin extends Plugin {
    @Override
    public void onEnable() {
        getLogger().info("MyPlugin enabled!");
        Nebula.getInstance().getEventBus().register(this);
    }

    @EventHandler
    public void onChat(PlayerChatEvent event) {
        if (event.getMessage().contains("hello")) {
            event.getPlayer().sendMessage("§aHello there!");
        }
    }

    @Override
    public void onDisable() {
        getLogger().info("MyPlugin disabled!");
    }
}

Architecture

nebula-alpha.jar (patcher)
  ├── NebulaPatcher         — Reads server JAR, applies ASM transforms, injects Nebula classes
  ├── ASM Transformers      — Inject hooks into MinecraftServer, hm (player handler), fg (player manager)
  ├── NebulaHooks           — Default-package bridge between obfuscated classes and Nebula
  ├── Nebula                — Main singleton: events, commands, plugins, config, permissions
  ├── Event System          — EventBus, Event, Cancellable, @EventHandler
  ├── Command System        — CommandRegistry, CommandExecutor, @CommandInfo
  ├── Plugin API            — Plugin lifecycle, PluginLoader
  ├── Config                — NebulaConfig (JSON via Gson)
  ├── Permissions           — PermissionManager, PlayerData, group-based
  └── Anti-Grief            — AntiGriefManager (TNT, fire, lava, spawn protection)

License

MIT

About

Minecraft alpha 1.0.15 server patcher that adds compatibility to plugins and various helpful commands

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages