Compare commits

...

5 Commits

Author SHA1 Message Date
Auxilor
88633f94cb Updated to 6.73.4 2024-08-12 21:48:27 +01:00
Auxilor
903084e574 Added 1.21.1 support 2024-08-12 21:48:04 +01:00
Auxilor
dab0ce2ed2 Updated to 6.73.3 2024-07-30 15:58:04 +01:00
Auxilor
c89edd05f5 Updated to 6.73.2 2024-07-29 18:46:53 +01:00
Auxilor
ce2a53e689 Fixed FancyHolograms integration 2024-07-29 18:46:47 +01:00
3 changed files with 13 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ package com.willfp.eco.core.proxy;
import com.willfp.eco.core.version.Version; import com.willfp.eco.core.version.Version;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@@ -35,6 +36,13 @@ public final class ProxyConstants {
throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); throw new UnsupportedOperationException("This is a utility class and cannot be instantiated");
} }
private static String convertVersion(@NotNull final String version) {
return switch (version) {
case "v1_21_1" -> "v1_21";
default -> version;
};
}
static { static {
String currentMinecraftVersion = Bukkit.getServer().getBukkitVersion().split("-")[0]; String currentMinecraftVersion = Bukkit.getServer().getBukkitVersion().split("-")[0];
String nmsVersion; String nmsVersion;
@@ -45,6 +53,6 @@ public final class ProxyConstants {
nmsVersion = "v" + currentMinecraftVersion.replace(".", "_"); nmsVersion = "v" + currentMinecraftVersion.replace(".", "_");
} }
NMS_VERSION = nmsVersion; NMS_VERSION = convertVersion(nmsVersion);
} }
} }

View File

@@ -9,7 +9,8 @@ import java.util.UUID
import kotlin.jvm.optionals.getOrNull import kotlin.jvm.optionals.getOrNull
class HologramFancyHolograms : HologramIntegration { class HologramFancyHolograms : HologramIntegration {
private val manager = FancyHologramsPlugin.get().hologramManager private val manager
get() = FancyHologramsPlugin.get().hologramManager
override fun createHologram(location: Location, contents: List<String>): Hologram { override fun createHologram(location: Location, contents: List<String>): Hologram {
val id = UUID.randomUUID().toString() val id = UUID.randomUUID().toString()
@@ -19,7 +20,7 @@ class HologramFancyHolograms : HologramIntegration {
data.isPersistent = false data.isPersistent = false
val holo = manager.create(data) val holo = manager.create(data)
FancyHologramsPlugin.get().hologramManager.addHologram(holo) manager.addHologram(holo)
return HologramImplFancyHolograms(id) return HologramImplFancyHolograms(id)
} }

View File

@@ -1,2 +1,2 @@
version = 6.73.1 version = 6.73.4
kotlin.incremental.useClasspathSnapshot=false kotlin.incremental.useClasspathSnapshot=false