Skip to content

Commit

Permalink
Merge pull request #7 from RappyLabyAddons/feat/versions
Browse files Browse the repository at this point in the history
Keep up with labymod template (#6)
  • Loading branch information
RappyTV authored Jun 10, 2023
2 parents bc68ade + d8b7f7f commit b96e130
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 26 deletions.
4 changes: 2 additions & 2 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ labyModProcessor {
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
8 changes: 0 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ fun configureRun(provider: net.labymod.gradle.core.minecraft.provider.VersionPro
}

provider.javaVersion = when (gameVersion) {
"1.8.9", "1.12.2", "1.16.5" -> {
JavaVersion.VERSION_1_8
}

"1.17.1" -> {
JavaVersion.VERSION_16
}

else -> {
JavaVersion.VERSION_17
}
Expand Down
4 changes: 2 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ labyModProcessor {
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
19 changes: 7 additions & 12 deletions core/src/main/java/com/rappytv/toolwarn/util/ToolType.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,13 @@ else if(path.endsWith("_shovel"))
}

public int getWarnPercentage(TbwConfiguration configuration) {
switch(this) {
case Sword:
return configuration.swordPercentage().get();
case Pickaxe:
return configuration.pickAxePercentage().get();
case Axe:
return configuration.axePercentage().get();
case Shovel:
return configuration.shovelPercentage().get();
default:
return -1;
}
return switch (this) {
case Sword -> configuration.swordPercentage().get();
case Pickaxe -> configuration.pickAxePercentage().get();
case Axe -> configuration.axePercentage().get();
case Shovel -> configuration.shovelPercentage().get();
default -> -1;
};
}

public String displayName() {
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.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rootProject.name = "Toolbreak Warning"

pluginManagement {
val labyGradlePluginVersion = "0.3.20"
val labyGradlePluginVersion = "0.3.25"
plugins {
id("net.labymod.gradle") version (labyGradlePluginVersion)
}
Expand Down

0 comments on commit b96e130

Please sign in to comment.