Skip to content

Commit

Permalink
Add support for 1.20.5 and 1.20.6 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverSchlueter authored May 7, 2024
1 parent 4de65ca commit ae3fb6d
Show file tree
Hide file tree
Showing 13 changed files with 355 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It is lightweight and fast (using [packets](https://wiki.vg/Protocol)).

PlaceholderAPI and MiniPlaceholders is supported.

**Only for minecraft server versions 1.19.4 - 1.20.4**<br>
**Only for minecraft server versions 1.19.4 - 1.20.6**<br>
_Using [paper](https://papermc.io/downloads) is highly recommended_

## Get the plugin
Expand Down
2 changes: 1 addition & 1 deletion api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("java-library")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.github.goooler.shadow") version "8.1.7"
}

dependencies {
Expand Down
35 changes: 22 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@ plugins {
id("java-library")
id("maven-publish")

id("xyz.jpenilla.run-paper") version "2.2.2"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("xyz.jpenilla.run-paper") version "2.2.4"
id("io.github.goooler.shadow") version "8.1.7"
}

runPaper.folia.registerTask()

allprojects {
group = "de.oliver"
val buildId = System.getenv("BUILD_ID")
version = "2.0.6" + (if (buildId != null) ".$buildId" else "")
version = "2.1.0-SNAPSHOT" + (if (buildId != null) ".$buildId" else "")
description = "Simple, lightweight and fast hologram plugin using display entities"


repositories {
mavenCentral()

maven(url = "https://papermc.io/repo/repository/maven-public/")
maven(url = "https://repo.papermc.io/repository/maven-public/")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")

maven(url = "https://repo.fancyplugins.de/snapshots")
maven(url = "https://repo.smrt-1.com/releases")
Expand All @@ -33,6 +34,7 @@ dependencies {
compileOnly("io.papermc.paper:paper-api:${findProperty("minecraftVersion")}-R0.1-SNAPSHOT")

implementation(project(":api"))
implementation(project(":implementation_1_20_6", configuration = "reobf"))
implementation(project(":implementation_1_20_4", configuration = "reobf"))
implementation(project(":implementation_1_20_2", configuration = "reobf"))
implementation(project(":implementation_1_20_1", configuration = "reobf"))
Expand All @@ -54,20 +56,21 @@ tasks {

dependsOn(":api:shadowJar")

relocate("me.dave.chatcolorhandler", "de.oliver.fancyholograms.libs.chatcolorhandler")
// relocate("me.dave.chatcolorhandler", "de.oliver.fancyholograms.libs.chatcolorhandler")
relocate("io.sentry", "de.oliver.fancyholograms.libs.sentry")
}

runServer {
minecraftVersion(findProperty("minecraftVersion").toString())
// minecraftVersion(findProperty("minecraftVersion").toString())
minecraftVersion("1.20.6")

downloadPlugins {
hangar("FancyNpcs", findProperty("fancyNpcsVersion").toString())
hangar("PlaceholderAPI", "2.11.5")
modrinth("miniplaceholders", "M6gjRuIx")

hangar("ViaVersion", "4.9.3-SNAPSHOT+216")
hangar("ViaBackwards", "4.9.2-SNAPSHOT+131")
// hangar("FancyNpcs", findProperty("fancyNpcsVersion").toString())
// hangar("PlaceholderAPI", "2.11.5")
// modrinth("miniplaceholders", "M6gjRuIx")
//
// hangar("ViaVersion", "4.9.3-SNAPSHOT+216")
// hangar("ViaBackwards", "4.9.2-SNAPSHOT+131")
}
}

Expand Down Expand Up @@ -124,11 +127,17 @@ tasks {
expand(props)
}
}

compileJava {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
options.release = 21
}

}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(21))
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion implementation_1_19_4/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-library")
id("io.papermc.paperweight.userdev") version "1.5.11"
id("io.papermc.paperweight.userdev") version "1.6.2"
}


Expand Down
2 changes: 1 addition & 1 deletion implementation_1_20_1/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-library")
id("io.papermc.paperweight.userdev") version "1.5.11"
id("io.papermc.paperweight.userdev") version "1.6.2"
}


Expand Down
2 changes: 1 addition & 1 deletion implementation_1_20_2/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-library")
id("io.papermc.paperweight.userdev") version "1.5.11"
id("io.papermc.paperweight.userdev") version "1.6.2"
}


Expand Down
2 changes: 1 addition & 1 deletion implementation_1_20_4/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-library")
id("io.papermc.paperweight.userdev") version "1.5.11"
id("io.papermc.paperweight.userdev") version "1.6.2"
}


Expand Down
35 changes: 35 additions & 0 deletions implementation_1_20_6/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
plugins {
id("java-library")
id("io.papermc.paperweight.userdev") version "1.6.2"
}


val minecraftVersion = "1.20.6"

paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION


dependencies {
paperweight.paperDevBundle("$minecraftVersion-R0.1-SNAPSHOT")

implementation(project(":api"))
implementation("de.oliver:FancyLib:${findProperty("fancyLibVersion")}")
compileOnly("com.viaversion:viaversion-api:${findProperty("viaversionVersion")}")
}


tasks {
named("assemble") {
dependsOn(named("reobfJar"))
}

javadoc {
options.encoding = Charsets.UTF_8.name()
}

compileJava {
options.encoding = Charsets.UTF_8.name()

options.release.set(21)
}
}
Loading

0 comments on commit ae3fb6d

Please sign in to comment.