Skip to content

Commit

Permalink
feat: basic stuff added
Browse files Browse the repository at this point in the history
 still early stage of developement

Closes #41
  • Loading branch information
Yann151924 committed Mar 24, 2024
1 parent bd71ca2 commit f1e5a6d
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,10 @@ gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignoring this two files. 1.7 version of minecraft - save in the repo for testing purpose.
# This is old version so better to be safe and commit this file
!spigot-1.7.10-SNAPSHOT-b1657.jar
!Thermos-1.7.10-1614-server.jar

# Cache of project
.gradletasknamecache
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'fabric-loom' version '1.1-SNAPSHOT' apply false
id 'com.github.johnrengelman.shadow' version '8.1.1'
id "de.undercouch.download" version "5.6.0"
id 'java'
}

Expand All @@ -20,7 +21,7 @@ def getWorkingBranch() {
return "-" + gitBranch
}

subprojects {
subprojects { subProject ->
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
Expand Down
59 changes: 59 additions & 0 deletions bukkit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,63 @@ shadowJar {
relocate 'org.slf4j', 'com.mineaurion.aurionchat.lib.slf4j'
relocate 'net.kyori.adventure', 'com.mineaurion.aurionchat.lib.adventure'
relocate 'net.kyori.event', 'com.mineaurion.aurionchat.lib.eventbus'
}


def urls = [
[
url: "https://download.getbukkit.org/spigot/spigot-1.20.4.jar",
folder: 'spigot-1.20',
],
[
url: "https://github.com/IzzelAliz/Arclight/releases/download/Trials%2F1.0.5/arclight-forge-1.20.1-1.0.5.jar",
folder: "arclight"
]
]

task downloadServerJar{
urls.forEach {server ->
download.run {
src server.url
dest "${projectDir}/run/" + server.folder + "/server.jar"
}
copy {
from "${projectDir}/libs/start.sh"
into "${projectDir}/run/" + server.folder
}
copy {
from "${projectDir}/libs/start.bat"
into "${projectDir}/run/" + server.folder
}
}
}

def localServerJar = [
[
file: "${projectDir}/libs/spigot-1.7.10-SNAPSHOT-b1657.jar",
folder: "spigot-1.7"
],
[
file: "${projectDir}/libs/Thermos-1.7.10-1614-server.jar",
folder: "thermos-1.7"
]
]

task copyLocalServerJar {
dependsOn downloadServerJar
localServerJar.forEach { server ->
copy {
from server.file
into "${projectDir}/run/" + server.folder
rename { "server.jar" }
}
copy {
from "${projectDir}/libs/start.sh"
into "${projectDir}/run/" + server.folder
}
copy {
from "${projectDir}/libs/start.bat"
into "${projectDir}/run/" + server.folder
}
}
}
Binary file added bukkit/libs/Thermos-1.7.10-1614-server.jar
Binary file not shown.
Binary file added bukkit/libs/spigot-1.7.10-SNAPSHOT-b1657.jar
Binary file not shown.
1 change: 1 addition & 0 deletions bukkit/libs/start.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar server.jar
2 changes: 2 additions & 0 deletions bukkit/libs/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar server.jar

0 comments on commit f1e5a6d

Please sign in to comment.