Update build configuration and improve server status handling
All checks were successful
Build JStom / build (push) Successful in 1m27s
All checks were successful
Build JStom / build (push) Successful in 1m27s
- Change Minestom dependency to use official snapshots - Adjust repository URLs for better clarity - Refactor server status handling to use ResponseData
This commit is contained in:
@@ -9,12 +9,13 @@ version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://jitpack.io") // For Minestom
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
||||
maven("https://jitpack.io") // For other JitPack dependencies if any
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Minestom - using master-SNAPSHOT
|
||||
implementation("com.github.Minestom:Minestom:master-SNAPSHOT")
|
||||
// Minestom - using official snapshots
|
||||
implementation("net.minestom:minestom-snapshots:dev")
|
||||
|
||||
// GraalJS for JavaScript engine
|
||||
implementation("org.graalvm.polyglot:polyglot:24.1.2")
|
||||
|
||||
@@ -13,7 +13,7 @@ import net.minestom.server.instance.InstanceContainer;
|
||||
import net.minestom.server.instance.InstanceManager;
|
||||
import net.minestom.server.instance.LightingChunk;
|
||||
import net.minestom.server.instance.block.Block;
|
||||
import net.minestom.server.ping.Status;
|
||||
import net.minestom.server.ping.ResponseData;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
import java.io.File;
|
||||
@@ -54,9 +54,7 @@ public class Main {
|
||||
|
||||
// MOTD
|
||||
globalEventHandler.addListener(ServerListPingEvent.class, event -> {
|
||||
event.setStatus(Status.builder(event.getStatus())
|
||||
.description(Component.text(Config.MOTD))
|
||||
.build());
|
||||
event.getResponseData().setDescription(Component.text(Config.MOTD));
|
||||
});
|
||||
|
||||
// Initialize Script Manager
|
||||
|
||||
Reference in New Issue
Block a user