-
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.
- Loading branch information
0 parents
commit afd0b02
Showing
7 changed files
with
100 additions
and
0 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,32 @@ | ||
# macOS | ||
.DS_Store | ||
|
||
# sbt specific | ||
dist/* | ||
target/ | ||
lib_managed/ | ||
src_managed/ | ||
project/boot/ | ||
project/plugins/project/ | ||
project/local-plugins.sbt | ||
.history | ||
.ensime | ||
.ensime_cache/ | ||
.sbt-scripted/ | ||
local.sbt | ||
|
||
# Bloop | ||
.bsp | ||
|
||
# VS Code | ||
.vscode/ | ||
|
||
# Metals | ||
.bloop/ | ||
.metals/ | ||
metals.sbt | ||
|
||
# IDEA | ||
.idea | ||
.idea_modules | ||
/.worksheet/ |
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,15 @@ | ||
# Allay Scala Plugin Template | ||
|
||
## Usage | ||
|
||
To compile the project | ||
|
||
```bash | ||
sbt compile | ||
``` | ||
|
||
To package the score with scala library (using sbt-assembly) | ||
|
||
``` bash | ||
sbt assembly | ||
``` |
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,31 @@ | ||
val scala3Version = "3.5.0" | ||
|
||
val Compilonly = config("Compilonly") hide | ||
|
||
lazy val root = project | ||
.in(file(".")) | ||
.settings( | ||
|
||
resolvers += | ||
"opencollab-repository-maven-snapshots" | ||
at "https://repo.opencollab.dev/maven-snapshots", | ||
resolvers += | ||
"opencollab-repository-maven-releases" | ||
at "https://repo.opencollab.dev/maven-releases", | ||
resolvers += | ||
"storehouse" at "https://storehouse.okaeri.eu/repository/maven-public/", | ||
resolvers += | ||
"jitpack" at "https://www.jitpack.io/", | ||
|
||
ivyConfigurations += Compilonly, | ||
|
||
name := "Scala-Plugin-For-Allay", | ||
version := "0.1.0-SNAPSHOT", | ||
scalaVersion := scala3Version, | ||
|
||
libraryDependencies += "com.github.AllayMC.Allay" % "Allay-API" % "master-SNAPSHOT" % Compilonly, | ||
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.32" % Compilonly, | ||
|
||
unmanagedClasspath in Compile ++= | ||
update.value.select(configurationFilter("Compilonly")) | ||
) |
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 @@ | ||
sbt.version=1.10.1 |
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 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.2.0") |
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,8 @@ | ||
|
||
{ | ||
"entrance": "MyPlugin", | ||
"name": "ScalaPluginTemplate", | ||
"authors": ["harryxi"], | ||
"version": "1.0.0" | ||
} | ||
|
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,12 @@ | ||
import org.allaymc.api.plugin.Plugin | ||
import org.slf4j.LoggerFactory | ||
|
||
class MyPlugin extends Plugin { | ||
val log = LoggerFactory.getLogger(getClass) | ||
override def onLoad(): Unit = | ||
log.info("onLoad") | ||
override def onEnable(): Unit = | ||
log.info("onEnable") | ||
override def onDisable(): Unit = | ||
log.info("onDisable") | ||
} |