Guest User

Untitled

a guest
Sep 7th, 2025
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. plugins {
  2. id("java")
  3. id("io.papermc.paperweight.userdev") version "2.0.0-beta.18"
  4. id("xyz.jpenilla.run-paper") version "2.3.1"
  5. }
  6.  
  7. group = 'org.ohhi3368'
  8. version = '0.1-SNAPSHOT'
  9.  
  10. repositories {
  11. mavenCentral()
  12. maven {
  13. name = "papermc-repo"
  14. url = "https://repo.papermc.io/repository/maven-public/"
  15. }
  16. }
  17.  
  18. dependencies {
  19. compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
  20. paperweight.paperDevBundle("1.21.8-R0.1-SNAPSHOT")
  21. }
  22.  
  23. tasks {
  24. runServer {
  25. // Configure the Minecraft version for our task.
  26. // This is the only required configuration besides applying the plugin.
  27. // Your plugin's jar (or shadowJar if present) will be used automatically.
  28. minecraftVersion("1.21")
  29. }
  30. }
  31.  
  32. def targetJavaVersion = 21
  33. java {
  34. def javaVersion = JavaVersion.toVersion(targetJavaVersion)
  35. sourceCompatibility = javaVersion
  36. targetCompatibility = javaVersion
  37. if (JavaVersion.current() < javaVersion) {
  38. toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
  39. }
  40. }
  41.  
  42. tasks.withType(JavaCompile).configureEach {
  43. options.encoding = 'UTF-8'
  44.  
  45. if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
  46. options.release.set(targetJavaVersion)
  47. }
  48. }
  49.  
  50. processResources {
  51. def props = [version: version]
  52. inputs.properties props
  53. filteringCharset 'UTF-8'
  54. filesMatching('plugin.yml') {
  55. expand props
  56. }
  57. }
  58.  
Advertisement
Add Comment
Please, Sign In to add comment