-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-host -scripting-runtime -api -script-definition
- Loading branch information
Showing
23 changed files
with
133 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
plugins { | ||
id("common") | ||
} | ||
|
||
dependencies { | ||
compileOnly("org.spongepowered:spongeapi:8.1.0") | ||
compileOnly("net.kyori:adventure-api:4.14.0") | ||
} | ||
|
||
tasks.jar { | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
toolchain.languageVersion.set(JavaLanguageVersion.of(17)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package me.zodd | ||
|
||
import org.apache.logging.log4j.Logger | ||
import org.spongepowered.plugin.PluginContainer | ||
|
||
class API(container: PluginContainer, logger: Logger) { | ||
companion object { | ||
lateinit var container: PluginContainer | ||
lateinit var logger: Logger | ||
} | ||
|
||
init { | ||
Companion.container = container | ||
Companion.logger = logger | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...lin/me/zodd/dsl/command/CommandManager.kt → ...src/main/kotlin/me/zodd/CommandManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package me.zodd | ||
|
||
import org.apache.logging.log4j.Logger | ||
import org.spongepowered.api.Server | ||
import org.spongepowered.api.Sponge | ||
import org.spongepowered.api.command.manager.CommandManager | ||
import org.spongepowered.api.event.EventManager | ||
import org.spongepowered.api.plugin.PluginManager | ||
import org.spongepowered.api.scheduler.Scheduler | ||
import org.spongepowered.api.service.ServiceProvider | ||
import org.spongepowered.plugin.PluginContainer | ||
|
||
inline val SpongeServer: Server get() = Sponge.server() | ||
inline val SpongePluginManager: PluginManager get() = Sponge.pluginManager() | ||
inline val SpongeCommandManager: CommandManager get() = Sponge.server().commandManager() | ||
inline val SpongeEventManager: EventManager get() = Sponge.eventManager() | ||
inline val SpongeServerServiceManager: ServiceProvider.ServerScoped get() = Sponge.server().serviceProvider() | ||
inline val SpongeGameServiceManager: ServiceProvider.GameScoped get() = Sponge.serviceProvider() | ||
inline val Scheduler: Scheduler get() = Sponge.server().scheduler() | ||
inline val SpongeAsyncScheduler: Scheduler get() = Sponge.asyncScheduler() | ||
inline val Container: PluginContainer get() = API.container | ||
inline val Logger: Logger get() = API.logger | ||
inline val ScriptCommandManager: me.zodd.CommandManager get() = CommandManager() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
plugins { | ||
kotlin("jvm") | ||
} | ||
|
||
group = "me.zodd" | ||
version = "0.1.0" | ||
|
||
repositories { | ||
mavenCentral() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
host/run/config/scripting-host/scripts/serverStarted.plugin.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import me.zodd.ScriptPlugin | ||
import me.zodd.onServerStarted | ||
import me.zodd.* | ||
|
||
onServerStarted { | ||
ScriptPlugin.logger.info("Server Started!") | ||
Logger.info("Server Started!") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
plugins { | ||
id("common") | ||
id("com.github.johnrengelman.shadow") version "7.1.2" | ||
} | ||
|
||
dependencies { | ||
shadow(project(":script-definition")) | ||
shadow(kotlin("script-runtime")) | ||
shadow(project(":api")) | ||
shadow("org.spongepowered:spongeapi:8.1.0") | ||
shadow("net.kyori:adventure-api:4.14.0") | ||
} | ||
|
||
tasks.jar { | ||
enabled = false | ||
finalizedBy("shadowJar") | ||
} | ||
|
||
tasks.shadowJar { | ||
configurations.add(project.configurations.shadow.get()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters