Skip to content

Commit

Permalink
Remove indra
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Dec 18, 2024
1 parent 453d298 commit 4cf5f61
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 42 deletions.
12 changes: 10 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ plugins {

repositories {
gradlePluginPortal()
mavenCentral()
}

dependencies {
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.0.0-beta4")
implementation("net.kyori:indra-common:3.1.3")
}

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

kotlin {
jvmToolchain(17)
}
77 changes: 40 additions & 37 deletions buildSrc/src/main/kotlin/pq.java-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
plugins {
`java-library`
`maven-publish`
id("net.kyori.indra")
id("net.kyori.indra.publishing")
}

java {
Expand All @@ -29,41 +27,6 @@ tasks.withType<JavaCompile> {
options.compilerArgs.add("-Xlint:all,-serial,-processing")
}

indra {
github("AlexProgrammerDE", "PistonQueue") {
ci(true)
}

gpl3OnlyLicense()
publishReleasesTo("codemc-releases", "https://repo.codemc.org/repository/maven-releases/")
publishSnapshotsTo("codemc-snapshots", "https://repo.codemc.org/repository/maven-snapshots/")

configurePublications {
pom {
name.set("PistonQueue")
url.set("https://pistonmaster.net/PistonQueue")
organization {
name.set("AlexProgrammerDE")
url.set("https://pistonmaster.net")
}
developers {
developer {
id.set("AlexProgrammerDE")
timezone.set("Europe/Berlin")
url.set("https://pistonmaster.net")
}
}
}
}

javaVersions {
target(21)
strictVersions()
testWith(21)
minimumToolchain(21)
}
}

val repoName = if (version.toString().endsWith("SNAPSHOT")) "maven-snapshots" else "maven-releases"
publishing {
repositories {
Expand All @@ -73,4 +36,44 @@ publishing {
name = "codemc"
}
}
publications {
register<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name = "PistonQueue"
description = rootProject.description
url = "https://github.com/AlexProgrammerDE/PistonQueue"
organization {
name = "AlexProgrammerDE"
url = "https://pistonmaster.net"
}
developers {
developer {
id = "AlexProgrammerDE"
timezone = "Europe/Berlin"
url = "https://pistonmaster.net"
}
}
licenses {
license {
name = "GNU General Public License v3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.html"
}
}
scm {
connection = "scm:git:https://github.com/AlexProgrammerDE/PistonQueue.git"
developerConnection = "scm:git:ssh://[email protected]/AlexProgrammerDE/PistonQueue.git"
url = "https://github.com/AlexProgrammerDE/PistonQueue"
}
ciManagement {
system = "GitHub Actions"
url = "https://github.com/AlexProgrammerDE/PistonQueue/actions"
}
issueManagement {
system = "GitHub"
url = "https://github.com/AlexProgrammerDE/PistonQueue/issues"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.bukkit.event.entity.FoodLevelChangeEvent;
import org.bukkit.event.player.*;
import org.bukkit.scoreboard.Scoreboard;
import org.bukkit.scoreboard.ScoreboardManager;
import org.bukkit.scoreboard.Team;

import java.util.Objects;
Expand Down Expand Up @@ -67,8 +68,9 @@ public void onPlayerJoin(PlayerJoinEvent event) {
});
}

if (plugin.isTeam()) {
Scoreboard scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
ScoreboardManager manager = Bukkit.getScoreboardManager();
if (plugin.isTeam() && manager != null) {
Scoreboard scoreboard = manager.getNewScoreboard();

Team team = scoreboard.registerNewTeam(plugin.getTeamName()
.replace("%player_name%", player.getName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

@Getter
public final class PistonQueueBungee extends Plugin implements PistonQueuePlugin {
@Getter
private final QueueListenerBungee queueListenerBungee = new QueueListenerBungee(this);

@Override
Expand Down

0 comments on commit 4cf5f61

Please sign in to comment.