mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
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:
@@ -292,7 +292,7 @@ public final class FancyHolograms extends JavaPlugin implements FancyHologramsPl
|
||||
private void registerListeners() {
|
||||
getServer().getPluginManager().registerEvents(new PlayerListener(this), this);
|
||||
getServer().getPluginManager().registerEvents(new WorldListener(), this);
|
||||
if (Bukkit.getMinecraftVersion().equals("1.21.4") || Bukkit.getMinecraftVersion().equals("1.21.5") || Bukkit.getMinecraftVersion().equals("1.21.6") || Bukkit.getMinecraftVersion().equals("1.21.7") || Bukkit.getMinecraftVersion().equals("1.21.8")) {
|
||||
if (Set.of("1.21.4", "1.21.5", "1.21.6", "1.21.7", "1.21.8").contains(Bukkit.getMinecraftVersion())) {
|
||||
getServer().getPluginManager().registerEvents(new PlayerLoadedListener(), this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user