https://github.com/Protonull/Extenstom
Barebones Microtus server
https://github.com/Protonull/Extenstom
microtus microtus-implementation microtus-server minecraft minecraft-server minestom minestom-implementation minestom-server
Last synced: 15 days ago
JSON representation
Barebones Microtus server
- Host: GitHub
- URL: https://github.com/Protonull/Extenstom
- Owner: Protonull
- License: mit
- Created: 2021-05-13T01:17:30.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-22T16:41:33.000Z (2 months ago)
- Last Synced: 2025-04-12T20:30:02.462Z (about 1 month ago)
- Topics: microtus, microtus-implementation, microtus-server, minecraft, minecraft-server, minestom, minestom-implementation, minestom-server
- Language: Java
- Homepage:
- Size: 229 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: .github/README.md
Awesome Lists containing this project
- awesome-minestom - BasicMinestomServer - Barebones extension-only server jar. (Implementations)
README
# Extenstom
[](https://github.com/Protonull/Extenstom/blob/master/LICENCE.txt)
[](https://github.com/Protonull/Extenstom/stargazers)Extenstom is an ***EXTREMELY*** barebones implementation of [Microtus](https://github.com/OneLiteFeatherNET/Microtus)
that defers any and all custom behaviour to extensions.## Install
You can either use the latest build [here](https://github.com/Protonull/Extenstom/releases/tag/latest) or you can
compile it yourself with JDK 21 by doing:
```shell
git clone https://github.com/Protonull/Extenstom.git
cd Extenstom
./gradlew build
```
The resulting jar will be located at: `dist/Extenstom-.jar`## Usage
You'll need Java 21 or above to run Extenstom. You need only execute it like so:
```shell
java -jar Extenstom-.jar
```You can also set the hostname and port values like so (otherwise they'll default to `localhost` and `25565` respectively):
```shell
java -jar -Dextenstom.host="localhost" -Dextenstom.port=25565 Extenstom-.jar
```## Extending
Any and all custom behaviour MUST be handled by [extensions](https://wiki.microtus.dev/extension-system/extensions).
```java
package example.extension;import net.minestom.server.MinecraftServer;
import net.minestom.server.coordinate.Pos;
import net.minestom.server.entity.Player;
import net.minestom.server.event.player.AsyncPlayerConfigurationEvent;
import net.minestom.server.extensions.Extension;
import net.minestom.server.extras.bungee.BungeeCordProxy;
import net.minestom.server.instance.InstanceContainer;
import net.minestom.server.instance.block.Block;public class ExampleExtension extends Extension {
// This method should be used for things that ought to be done as soon as possible.
@Override
public void preInitialize() {
MinecraftServer.setBrandName("BestServerEverMC");
}// This method is for other things that occur prior to server start.
@Override
public void initialize() {
BungeeCordProxy.enable();
}// This method is for anything you want to do after the server has started.
// This is based on the "Your first server" wiki page: https://wiki.microtus.dev/getting-started/your-first-server
@Override
public void postInitialize() {
// Create a new instance
final InstanceContainer instanceContainer = MinecraftServer.getInstanceManager().createInstanceContainer();// Set the ChunkGenerator
instanceContainer.setGenerator((unit) -> {
unit.modifier().fillHeight(0, 0, Block.BEDROCK);
unit.modifier().fillHeight(1, 39, Block.DIRT);
unit.modifier().fillHeight(40, 40, Block.GRASS_BLOCK);
});// Listen for player logins and put them in the instance
MinecraftServer.getGlobalEventHandler().addListener(AsyncPlayerConfigurationEvent.class, (event) -> {
final Player player = event.getPlayer();
event.setSpawningInstance(instanceContainer);
player.setRespawnPoint(new Pos(0, 42, 0));
});
}// This method is called when your extension is disabled, like during shutdown
@Override
public void terminate() {}
}
```