mirror of
https://github.com/GayPizzaSpecifications/concrete.git
synced 2025-08-03 05:10:56 +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")
|
||||
var shouldUpdatePaperServer = true
|
||||
|
||||
private val paperVersionClient = PaperVersionClient()
|
||||
|
||||
@TaskAction
|
||||
fun setupPaperServer() {
|
||||
val concrete = project.extensions.getByType<ConcreteExtension>()
|
||||
@ -31,6 +29,7 @@ open class SetupPaperServer : SetupMinecraftServer() {
|
||||
}
|
||||
|
||||
private fun downloadLatestBuild(paperVersionGroup: String, paperJarFile: File) {
|
||||
val paperVersionClient = PaperVersionClient()
|
||||
if (project.gradle.startParameter.isOffline) {
|
||||
if (!paperJarFile.exists()) {
|
||||
throw RuntimeException("Offline mode is enabled and Paper has not been downloaded.")
|
||||
|
Reference in New Issue
Block a user