/* * PICKSHADOW SERVER KIT SOURCE FILE * Copyright (c) 2024 The PickShadow Server Kit authors * Licensed under the GNU Affero General Public License v3 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ import io.papermc.paperweight.userdev.ReobfArtifactConfiguration // Plugins plugins { id("java") id("io.freefair.lombok") version("${pluginLombok}") id("io.papermc.paperweight.userdev") version("${pluginPaperweight}") id("io.github.goooler.shadow") version("${pluginShadow}") id("xyz.jpenilla.run-paper") version("${pluginRunTask}") } // Dependencies dependencies { // Lombok compileOnly("org.projectlombok:lombok:${dependencyLombok}") annotationProcessor("org.projectlombok:lombok:${dependencyLombok}") // JetBrains Annotations compileOnly("org.jetbrains:annotations:${dependencyJetbrainsAnnotations}") // Libraries compileOnly("de.staropensource.engine:base:${dependencyStarOpenSourceEngine}") runtimeOnly("de.staropensource.enginemc:platform-bukkit:${dependencyStarOpenSourceEngineMC}") implementation("com.google.code.gson:gson:${dependencyGson}") // Server compileOnly("io.papermc.paper:paper-api:${minecraftVersion}-${dependencyPaper}-SNAPSHOT") compileOnly("net.kyori:adventure-api:${dependencyAdventure}") paperweight.paperDevBundle("${minecraftVersion}-${dependencyPaper}-SNAPSHOT") // Plugins compileOnly("net.luckperms:api:${dependencyLuckPerms}") // Bukkit libraries implementation("fr.mrmicky:fastboard:${dependencyFastboard}") // Project implementation(project(":common")) } // Set Java version java { toolchain.languageVersion.set(JavaLanguageVersion.of("${javaTarget}")) } // Update plugin.yml processResources { filesMatching("plugin.yml") { expand project.properties } } // Configure paperweight paperweight { reobfArtifactConfiguration = ReobfArtifactConfiguration.getMOJANG_PRODUCTION() } // Configure server runServer { minecraftVersion("${minecraftVersion}") jvmArguments.addAll( "-Dfile.encoding=UTF-8", "-Dcom.mojang.eula.agree=true", "-Dsosengine.base.logLevel=diagnostic", "-Dpickshadow.extension.enabledModes=general,survival,survivalcheat" ) downloadPlugins { url("${downloadEngineMC}") url("${downloadLuckPerms}") url("${downloadSpark}") modrinth("freedomchat", "${downloadFreedomChat}") } doFirst { // Disable bStats File config = new File(runDirectory.get().getAsFile().getPath() + "/plugins/bStats/config.yml") if (!config.exists()) { config.getParentFile().mkdirs() config.createNewFile() config.write("enabled: false\n") } } }