Skip to content

Latest commit

 

History

53 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardcore Multiplayer (Spigot Plugin)

Overview

HardcoreMP turns your server into a shared hardcore run. Everybody plays the same world and everybody shares the same pool of lives: when the group runs out of them, the overworld, the nether and the end are wiped and a brand new world is generated with a random seed.

No Multiverse, no world management plugin, no manual setup — the plugin creates, links, backs up and deletes its own worlds.

Features

  • Shared hardcore mode — one world, one group of players, one shared run.
  • Lives system — configure how many deaths the group gets (max-lives) before the world is reset. Lives survive server restarts.
  • Random world generation — every run uses a new random seed.
  • Async world generation — the worlds are prepared in the background, so the server stays responsive while the next run is created.
  • Limbo world — while a world is being generated, players wait in an internal void world in spectator mode instead of being kicked.
  • Built-in dimension linking — nether and end portals (players and entities) are routed to the session worlds. No Multiverse required.
  • World backups — old worlds are zipped into plugins/HardcoreMP/old_worlds/ before being deleted, unless you ask for them to be removed.
  • Crash-safe state — the run (seed, lives, reset counter) is stored in data.yml, so a restart never gets mistaken for a world reset.
  • Offline player handling — players who were offline during a reset are detected and optionally cleaned up when they come back.
  • MOTD integration — the server list shows whether the world is ready.
  • Fully translatable — every message lives in lang.yml.
  • Developer API — trigger resets and listen to GameWorldResetEvent.

Installation

  1. Download the plugin .jar and drop it in your server's plugins directory.
  2. Restart the server to generate config.yml, lang.yml and data.yml.
  3. Set lobby-world in config.yml to the world players wait in (defaults to world) and run /hcmp reload.

Requires Java 8+ and a Spigot/Paper server on API 1.20 or newer.

Usage

Commands

All commands require the hardcoremp.command permission. Aliases: /hardcoremp, /hmp.

Command Description
/hcmp help Show the command list.
/hcmp info Show details of the world you are in: seed, difficulty, your position, spawn, time, weather, world type and remaining lives.
/hcmp reload Reload config.yml and lang.yml without restarting the server.

How a run works

  1. Startup. The plugin loads the recorded run from disk. If there is none, the worlds are generated in the background while players wait in the lobby.
  2. Playing. Once the worlds are ready, everyone is moved into the shared hardcore session (overworld, nether and end, all linked to each other).
  3. A death. The group loses one life. Players listed in user-bypass-list do not consume lives, and deaths in the lobby never count.
  4. No lives left. Everyone is put in spectator mode and sent to the limbo world, the session worlds are unloaded and archived, a new world is generated with a random seed, and everybody is teleported into it with fresh stats.

Worlds created by the plugin

World Purpose
hcmp_game Overworld of the current run.
hcmp_game_nether Nether of the current run.
hcmp_game_the_end End of the current run.
hcmp_limbo Void world where players wait while a world is generated.

The lobby world (lobby-world) is kept on peaceful difficulty; the game worlds are set to hard.

Configuration

config.yml holds the options you can edit:

Option Default Description
lobby-world world Name of the world players wait in while the game world is generated.
remove-old-worlds true true deletes the old world folders after a reset; false zips them into plugins/HardcoreMP/old_worlds/ first.
motd true Show the session status in the server MOTD.
user-bypass-list [] Players whose deaths do not cost a life. Keep it empty unless you really mean it.
offline-player-inventory-clear true Clear the inventory and ender chest of players who were offline during a reset.
max-lives 3 Deaths allowed before the world is reset.

lang.yml holds every message (titles, MOTD, help and /hcmp info), with colour codes and placeholders such as {player}, {lives}, {max-lives} and {seed}.

Runtime state (data.yml)

The state of the current run lives in its own file so that reinstalling or replacing the configuration never wipes a game in progress:

Key Description
data.world-seed Seed of the current game world. It is how the plugin recognises the run after a restart.
data.create-time When the current world was created (epoch millis).
data.reset-id How many resets have happened. Used to detect players who were offline during one.
data.current-lives Lives left in the current run.

Do not edit data.yml by hand while the server is running. Servers coming from an older version have these values migrated out of config.yml automatically.

Data safety

The plugin is deliberately conservative about deleting things:

  • If the world on disk does not match the recorded seed, it refuses to regenerate and tells you how to fix it, instead of silently starting a new game and emptying everybody's inventory.
  • Folders that are not the world being reset — the world container or the lobby world — are never touched.
  • Old world folders are moved aside atomically before being zipped or deleted, so a failed cleanup can never leave the new world generating on top of the old one.
  • Player inventories are only cleared based on the reset counter stored on the player, never on timestamps.

Development

To use this plugin as a dependency in your own project.

Add the JitPack repository to your build file.

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Add the dependency.

<dependency>
    <groupId>com.github.cykvta</groupId>
    <artifactId>HardcoreMP</artifactId>
    <version>{version}</version>
</dependency>

API

// Current session (overworld, nether, end, lives, creation time)
GameSession session = HardcoreWorldControl.getGameSession();

// Status of the game world: READY, GENERATING, REGENERATING, ...
WorldStatus status = HardcoreWorldControl.getStatus();

// Force a world reset
HardcoreWorldControl.regenGameWorld();

Listen for the end of a reset:

@EventHandler
public void onReset(GameWorldResetEvent event) {
    World newWorld = event.getGameWorld();
}

Metrics

HardcoreMP reports anonymous usage statistics through bStats. You can turn it off in plugins/bStats/config.yml.

Known Issues

  • The lobby world set in lobby-world must exist and be loaded, otherwise the plugin disables itself on startup.

Support

If you have any issues or feature requests, please contact me.

About

This plugin adds a shared hardcore experience for Minecraft servers. If one player dies, the entire world is deleted, and a new world is created with a random seed.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages