mirror of
https://github.com/GayPizzaSpecifications/concrete.git
synced 2025-08-05 06:01:34 +00:00
Allocate PaperVersionClient closer to time of use.
This commit is contained in:
@ -18,8 +18,6 @@ open class SetupPaperServer : SetupMinecraftServer() {
|
|||||||
@set:Option(option = "update", description = "Update Paper Server")
|
@set:Option(option = "update", description = "Update Paper Server")
|
||||||
var shouldUpdatePaperServer = true
|
var shouldUpdatePaperServer = true
|
||||||
|
|
||||||
private val paperVersionClient = PaperVersionClient()
|
|
||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
fun setupPaperServer() {
|
fun setupPaperServer() {
|
||||||
val concrete = project.extensions.getByType<ConcreteExtension>()
|
val concrete = project.extensions.getByType<ConcreteExtension>()
|
||||||
@ -31,6 +29,7 @@ open class SetupPaperServer : SetupMinecraftServer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun downloadLatestBuild(paperVersionGroup: String, paperJarFile: File) {
|
private fun downloadLatestBuild(paperVersionGroup: String, paperJarFile: File) {
|
||||||
|
val paperVersionClient = PaperVersionClient()
|
||||||
if (project.gradle.startParameter.isOffline) {
|
if (project.gradle.startParameter.isOffline) {
|
||||||
if (!paperJarFile.exists()) {
|
if (!paperJarFile.exists()) {
|
||||||
throw RuntimeException("Offline mode is enabled and Paper has not been downloaded.")
|
throw RuntimeException("Offline mode is enabled and Paper has not been downloaded.")
|
||||||
|
Reference in New Issue
Block a user