Removed unused repos, and added a new placeholder

This commit is contained in:
2025-04-04 19:11:02 -07:00
parent d256f7da4c
commit 098ce22e11
4 changed files with 20 additions and 27 deletions

34
pom.xml
View File

@@ -36,25 +36,13 @@
<id>placeholderapi-repo</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
<repository>
<id>enginehub-repo</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>essentials-releases</id>
<url>https://repo.essentialsx.net/releases/</url>
</repository>
<repository>
<id>bstats-repo</id>
<url>https://repo.codemc.io/repository/maven-public/</url>
</repository>
<repository>
<id>opencollab-snapshot</id>
<url>https://repo.opencollab.dev/main/</url>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
@@ -64,12 +52,6 @@
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.essentialsx</groupId>
<artifactId>EssentialsX</artifactId>
<version>2.21.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
@@ -77,15 +59,15 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-core</artifactId>
<version>7.3.1</version>
<groupId>net.essentialsx</groupId>
<artifactId>EssentialsX</artifactId>
<version>2.21.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.13</version>
<groupId>com.github.booksaw</groupId>
<artifactId>BetterTeams</artifactId>
<version>4.11.0</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@@ -106,7 +106,7 @@ public final class GalaxyBoxPvP extends JavaPlugin implements TabExecutor {
}
}
private void convertInventoryItems(Player player, Material fromMaterial, Material toMaterial, int fromCount, int toCount) {
private void convertInventoryItems(Player player, Material fromMaterial, Material toMaterial, int fromCount, @SuppressWarnings("SameParameterValue") int toCount) {
ItemStack[] inventoryContents = player.getInventory().getContents();
Bukkit.getScheduler().runTask(this, () -> {

View File

@@ -1,6 +1,8 @@
package xyz.lncvrt.galaxyboxpvp;
import com.booksaw.betterTeams.Team;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.ChatColor;
import org.bukkit.Statistic;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
@@ -43,6 +45,14 @@ public final class PlaceholderAPIExpansion extends PlaceholderExpansion {
int kills = player.getStatistic(Statistic.PLAYER_KILLS);
int deaths = player.getStatistic(Statistic.DEATHS);
return deaths == 0 ? String.valueOf(kills) : String.format("%.1f", (double) kills / deaths);
case "team":
Team team1 = Team.getTeam(player);
if (team1 == null) return "";
return ChatColor.translateAlternateColorCodes('&', "%s[%s%s%s%s]%s ".formatted(ChatColor.GRAY, ChatColor.RESET, team1.getDisplayName(), ChatColor.RESET, ChatColor.GRAY, ChatColor.RESET));
case "teamname":
Team team2 = Team.getTeam(player);
if (team2 == null) return "None";
return team2.getName();
default:
return null;
}

View File

@@ -7,6 +7,7 @@ depend:
- Essentials
- WorldEdit
- WorldGuard
- BetterTeams
commands:
autocompress:
description: Auto compressor