Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable minestom (again) #416

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ include (
'spark-fabric',
'spark-nukkit',
'spark-waterdog',
//'spark-minestom', // disabled until minestom publish their maven artifacts to a proper repo
'spark-minestom'
)
8 changes: 5 additions & 3 deletions spark-minestom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ plugins {
}

tasks.withType(JavaCompile) {
// override, compile targeting J17
options.release = 17
// override, compile targeting J21
options.release = 21
}

dependencies {
implementation project(':spark-common')
compileOnly 'com.github.Minestom.Minestom:Minestom:master-SNAPSHOT'

compileOnly 'net.minestom:minestom-snapshots:f1d5940855'
compileOnly 'dev.hollowcube:minestom-ce-extensions:1.2.0'
implementation 'com.google.guava:guava:19.0'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
package me.lucko.spark.minestom;

import me.lucko.spark.common.sampler.source.ClassSourceLookup;

import net.minestom.server.MinecraftServer;
import net.hollowcube.minestom.extensions.ExtensionBootstrap;
import net.minestom.server.extensions.Extension;
import net.minestom.server.extensions.ExtensionClassLoader;

Expand All @@ -34,7 +33,7 @@ public class MinestomClassSourceLookup extends ClassSourceLookup.ByClassLoader {

public MinestomClassSourceLookup() {
this.classLoaderToExtensions = new HashMap<>();
for (Extension extension : MinecraftServer.getExtensionManager().getExtensions()) {
for (Extension extension : ExtensionBootstrap.getExtensionManager().getExtensions()) {
this.classLoaderToExtensions.put(extension.getClass().getClassLoader(), extension.getOrigin().getName());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
package me.lucko.spark.minestom;

import me.lucko.spark.common.command.sender.AbstractCommandSender;

import net.kyori.adventure.text.Component;
import net.minestom.server.command.CommandSender;
import net.minestom.server.command.ConsoleSender;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
package me.lucko.spark.minestom;

import me.lucko.spark.common.platform.PlatformInfo;

import net.minestom.server.MinecraftServer;

public class MinestomPlatformInfo implements PlatformInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
package me.lucko.spark.minestom;

import com.google.common.collect.ImmutableMap;

import me.lucko.spark.common.monitor.ping.PlayerPingProvider;

import net.minestom.server.MinecraftServer;
import net.minestom.server.entity.Player;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import me.lucko.spark.common.sampler.source.SourceMetadata;
import me.lucko.spark.common.tick.TickHook;
import me.lucko.spark.common.tick.TickReporter;

import net.hollowcube.minestom.extensions.ExtensionBootstrap;
import net.minestom.server.MinecraftServer;
import net.minestom.server.command.CommandSender;
import net.minestom.server.command.builder.Command;
Expand All @@ -41,7 +41,6 @@
import net.minestom.server.command.builder.suggestion.SuggestionEntry;
import net.minestom.server.extensions.Extension;
import net.minestom.server.timer.ExecutionType;

import org.jetbrains.annotations.NotNull;

import java.nio.file.Path;
Expand Down Expand Up @@ -122,7 +121,7 @@ public ClassSourceLookup createClassSourceLookup() {
@Override
public Collection<SourceMetadata> getKnownSources() {
return SourceMetadata.gather(
MinecraftServer.getExtensionManager().getExtensions(),
ExtensionBootstrap.getExtensionManager().getExtensions(),
extension -> extension.getOrigin().getName(),
extension -> extension.getOrigin().getVersion(),
extension -> String.join(", ", extension.getOrigin().getAuthors())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
package me.lucko.spark.minestom;

import me.lucko.spark.common.tick.AbstractTickHook;

import net.minestom.server.MinecraftServer;
import net.minestom.server.timer.Task;
import net.minestom.server.timer.TaskSchedule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
package me.lucko.spark.minestom;

import me.lucko.spark.common.tick.AbstractTickReporter;

import net.minestom.server.MinecraftServer;
import net.minestom.server.event.Event;
import net.minestom.server.event.EventNode;
Expand Down