temporary fix for biome interface kerfuffle

This commit is contained in:
PiggyPiglet committed 2025-10-26 11:19:00 +08:00
1 parent 56613e2539
commit c264f9fdf8
4 files changed
+10 -6

No files matched your search

+4 -4
View File
@@ -3,7 +3,7 @@
<groupId>com.extendedclip.papi.expansion.player</groupId>
<artifactId>player-expansion</artifactId>
<version>2.0.8</version>
<version>2.0.9</version>
<name>PAPI-Expansion-Player</name>
<description>PlaceholderAPI expansion for player placeholders</description>
@@ -21,7 +21,7 @@
</repository>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
<url>https://repo.extendedclip.com/releases</url>
</repository>
</repositories>
@@ -30,13 +30,13 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20-R0.1-SNAPSHOT</version>
<version>1.21.10-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.3</version>
<version>2.11.6</version>
<scope>provided</scope>
</dependency>
</dependencies>
@@ -34,8 +34,6 @@ import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffectType;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static com.extendedclip.papi.expansion.player.PlayerUtil.durability;
import static com.extendedclip.papi.expansion.player.PlayerUtil.format12;
import static com.extendedclip.papi.expansion.player.PlayerUtil.format24;
@@ -243,6 +243,10 @@ public final class PlayerUtil {
}
public static String getBiome(Player p) {
if (VersionHelper.IS_1_21_3_OR_NEWER) {
return p.getLocation().getBlock().getBiome().name();
}
return String.valueOf(p.getLocation().getBlock().getBiome());
}
@@ -35,6 +35,8 @@ public final class VersionHelper {
*/
public static final boolean IS_1_20_4_OR_NEWER = VERSION >= 1_20_4;
public static final boolean IS_1_21_3_OR_NEWER = VERSION >= 1_21_3;
private VersionHelper() { }
/**