fancynpcs, fancyholograms: Use sets of Version Strings for checking if a version is valid (#142)

* use set for checking if a version is valid

* use Paper PR for snapshot reference

---------

Co-authored-by: TheosRee <theosree@users.noreply.github.com>
This commit is contained in:
TheosRee
2025-11-08 13:20:25 +01:00
committed by Oliver
parent d36af3cd00
commit 24c1907eec
5 changed files with 12 additions and 5 deletions

View File

@@ -311,7 +311,7 @@ public final class FancyHologramsPlugin extends JavaPlugin implements FancyHolog
getServer().getPluginManager().registerEvents(new PlayerListener(this), this);
getServer().getPluginManager().registerEvents(new WorldLoadedListener(), this);
if (Bukkit.getMinecraftVersion().equals("1.21.4") || Bukkit.getMinecraftVersion().equals("1.21.5") || Bukkit.getMinecraftVersion().equals("1.21.6")) {
if (Set.of("1.21.4", "1.21.5", "1.21.6").contains(Bukkit.getMinecraftVersion())) {
getServer().getPluginManager().registerEvents(new PlayerLoadedListener(), this);
}