Skip to content

Commit

Permalink
Rebrand to Extenstom
Browse files Browse the repository at this point in the history
  • Loading branch information
Protonull committed May 1, 2024
1 parent 383203b commit e1bf762
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 23 deletions.
23 changes: 12 additions & 11 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
# BasicMinestomServer
# Extenstom

[![GitHub](https://img.shields.io/github/license/Protonull/BasicMinestomServer?style=flat-square&color=b2204c)](https://github.com/Protonull/BasicMinestomServer/blob/master/LICENSE)
[![GitHub Repo stars](https://img.shields.io/github/stars/Protonull/BasicMinestomServer?style=flat-square)](https://github.com/Protonull/BasicMinestomServer/stargazers)
[![GitHub](https://img.shields.io/github/license/Protonull/Extenstom?style=flat-square&color=b2204c)](https://github.com/Protonull/Extenstom/blob/master/LICENCE.txt)
[![GitHub Repo stars](https://img.shields.io/github/stars/Protonull/Extenstom?style=flat-square)](https://github.com/Protonull/Extenstom/stargazers)

BasicMinestomServer is an ***EXTREMELY*** basic [Minestom](https://github.com/Minestom/Minestom) server in that it produces a jar that'll run... and that's it.
Extenstom is an ***EXTREMELY*** barebones implementation of [Minestom](https://github.com/Minestom/Minestom) that defers
any and all custom behaviour to extensions.

## Install

You can either use the provided latest build [here](https://github.com/Protonull/BasicMinestomServer/releases/tag/latest) or you can compile it yourself with JDK 21 by doing:
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 --recursive https://github.com/Protonull/BasicMinestomServer.git
cd BasicMinestomServer
git clone --recursive https://github.com/Protonull/Extenstom.git
cd Extenstom
./gradlew applyPatches
./gradlew build
```
The resulting jar will be located at: `build/libs/BasicMinestomServer-<VERSION>.jar`
The resulting jar will be located at: `build/libs/Extenstom-<VERSION>.jar`

## Usage

You'll need Java 21 or above to run BasicMinestomServer. You need only execute it like so:
You'll need Java 21 or above to run Extenstom. You need only execute it like so:
```shell
java -jar BasicMinestomServer-<VERSION>.jar
java -jar Extenstom-<VERSION>.jar
```

You can also set the `host` and `port` values like so (otherwise they'll default to `localhost` and `25565` respectively):
```shell
java -jar -Dhost="localhost" -Dport=25565 BasicMinestomServer-<VERSION>.jar
java -jar -Dhost="localhost" -Dport=25565 Extenstom-<VERSION>.jar
```

## Extending
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "BasicMinestomServer Maven CI"
name: "Extenstom Gradle CI"

on:
push:
Expand All @@ -21,10 +21,10 @@ jobs:
distribution: "corretto"
cache: "gradle"

- name: "Apply patches"
- name: "Apply Minestom patches"
run: "./gradlew applyPatches"

- name: "Compiling BasicMinestomServer"
- name: "Compiling Extenstom"
run: "./gradlew build --no-daemon"

- uses: "marvinpinto/action-automatic-releases@latest"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ gitPatcher.patchedRepos {
tasks {
jar {
manifest {
attributes["Main-Class"] = "uk.protonull.minestom.BasicMinestomServer"
attributes["Main-Class"] = "uk.protonull.minestom.Extenstom"
}
}
build {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexander <protonull@protonmail.com>
Date: Wed, 1 May 2024 08:22:20 +0100
Subject: [PATCH] Re-add MinecraftServer.getExtensionManager()
Subject: [PATCH] Re-add extension support

Uses minestom-ce-extensions to re-add extension support, plus re-adds the missing method on MinecraftServer.

diff --git a/build.gradle.kts b/build.gradle.kts
index e1a68af1d19ac86799796083a205517d4915e06a..546c5e20fbdf9d79987b1389093c0aec84aa864b 100644
Expand All @@ -19,17 +20,17 @@ index e1a68af1d19ac86799796083a205517d4915e06a..546c5e20fbdf9d79987b1389093c0aec
testImplementation(libs.bundles.junit)
testImplementation(project(":testing"))
diff --git a/src/main/java/net/minestom/server/MinecraftServer.java b/src/main/java/net/minestom/server/MinecraftServer.java
index d8ffa960217a739ef5edd4f554459a9d92efea65..9b0671c25742b20a57ff60166b88a9f594e68ff1 100644
index d8ffa960217a739ef5edd4f554459a9d92efea65..6d180feadcd2fcb5abb6d1b13a499932cd3100e3 100644
--- a/src/main/java/net/minestom/server/MinecraftServer.java
+++ b/src/main/java/net/minestom/server/MinecraftServer.java
@@ -34,6 +34,11 @@ import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.SocketAddress;

+// BasicMinestomServer start
+// Extenstom start
+import net.hollowcube.minestom.extensions.ExtensionBootstrap;
+import net.minestom.server.extensions.ExtensionManager;
+// BasicMinestomServer end
+// Extenstom end
+
/**
* The main server class used to start the server and retrieve all the managers.
Expand All @@ -38,11 +39,11 @@ index d8ffa960217a739ef5edd4f554459a9d92efea65..9b0671c25742b20a57ff60166b88a9f5
return serverProcess.advancement();
}

+ // BasicMinestomServer start
+ // Extenstom start
+ public static ExtensionManager getExtensionManager() {
+ return ExtensionBootstrap.getExtensionManager();
+ }
+ // BasicMinestomServer end
+ // Extenstom end
+
public static TagManager getTagManager() {
return serverProcess.tag();
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rootProject.name = "BasicMinestomServer"
rootProject.name = "Extenstom"

includeBuild(File("libs/minestom/patched").also { it.mkdirs() })
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import net.hollowcube.minestom.extensions.ExtensionBootstrap;
import net.minestom.server.MinecraftServer;

public final class BasicMinestomServer {
public final class Extenstom {
public static void main(
final String[] args
) {
Expand Down

0 comments on commit e1bf762

Please sign in to comment.