mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-12-27 17:28:23 +01:00
Updated sponge build
This commit is contained in:
parent
1dcb513e9a
commit
73815323e0
@ -1,8 +1,8 @@
|
|||||||
import org.spongepowered.gradle.plugin.config.PluginLoaders
|
import org.spongepowered.gradle.plugin.config.PluginLoaders
|
||||||
import org.spongepowered.plugin.metadata.PluginDependency
|
import org.spongepowered.plugin.metadata.model.PluginDependency
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.spongepowered.gradle.plugin' version '1.1.1'
|
id 'org.spongepowered.gradle.plugin' version '2.0.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: rootProject.file('buildscript/loader.gradle')
|
apply from: rootProject.file('buildscript/loader.gradle')
|
||||||
@ -22,12 +22,16 @@ shadowJar {
|
|||||||
// buildscript/loader.gradle includes the jarinjar in the jar
|
// buildscript/loader.gradle includes the jarinjar in the jar
|
||||||
|
|
||||||
sponge {
|
sponge {
|
||||||
apiVersion('8.0.0')
|
apiVersion('8.0.0-SNAPSHOT')
|
||||||
|
license('GPLv3')
|
||||||
|
loader {
|
||||||
|
name(PluginLoaders.JAVA_PLAIN)
|
||||||
|
version('1.0')
|
||||||
|
}
|
||||||
plugin('discordsrv') {
|
plugin('discordsrv') {
|
||||||
loader(PluginLoaders.JAVA_PLAIN)
|
|
||||||
displayName('DiscordSRV')
|
displayName('DiscordSRV')
|
||||||
version(project.version)
|
version(project.version)
|
||||||
mainClass('com.discordsrv.sponge.loader.DiscordSRVSpongeLoader')
|
entrypoint('com.discordsrv.sponge.loader.DiscordSRVSpongeLoader')
|
||||||
description('')
|
description('')
|
||||||
links {
|
links {
|
||||||
homepage('https://discordsrv.com')
|
homepage('https://discordsrv.com')
|
||||||
@ -42,6 +46,7 @@ sponge {
|
|||||||
}
|
}
|
||||||
dependency('spongeapi') {
|
dependency('spongeapi') {
|
||||||
loadOrder(PluginDependency.LoadOrder.AFTER)
|
loadOrder(PluginDependency.LoadOrder.AFTER)
|
||||||
|
version('[8.0.0,)')
|
||||||
optional(false)
|
optional(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,13 +63,13 @@ public class DiscordSRVSpongeBootstrap extends AbstractBootstrap implements ISpo
|
|||||||
public void onConstruct() {
|
public void onConstruct() {
|
||||||
// Wait until dependencies ready, then initialize DiscordSRV
|
// Wait until dependencies ready, then initialize DiscordSRV
|
||||||
dependencies.join();
|
dependencies.join();
|
||||||
this.discordSRV = new SpongeDiscordSRV(logger, pluginContainer, game, classLoader, dataDirectory);
|
|
||||||
|
|
||||||
dependencies.runWhenComplete(discordSRV::invokeEnable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStarted() {
|
public void onStarted() {
|
||||||
|
this.discordSRV = new SpongeDiscordSRV(logger, pluginContainer, game, classLoader, dataDirectory);
|
||||||
|
|
||||||
|
dependencies.runWhenComplete(discordSRV::invokeEnable);
|
||||||
dependencies.runWhenComplete(discordSRV::invokeServerStarted);
|
dependencies.runWhenComplete(discordSRV::invokeServerStarted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public class SpongeScheduler extends StandardScheduler implements ServerSchedule
|
|||||||
|
|
||||||
public SpongeScheduler(SpongeDiscordSRV discordSRV) {
|
public SpongeScheduler(SpongeDiscordSRV discordSRV) {
|
||||||
super(discordSRV);
|
super(discordSRV);
|
||||||
this.service = discordSRV.game().server().scheduler().createExecutor(discordSRV.container());
|
this.service = discordSRV.game().server().scheduler().executor(discordSRV.container());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user