Fix version check in area effect cloud emulation

This commit is contained in:
FlorianMichael 2024-07-19 08:54:12 +02:00
parent 64039f847c
commit 081c9c9a6f
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126

View File

@ -40,7 +40,7 @@ public class AreaEffectCloudEmulator implements Listener {
public AreaEffectCloudEmulator(final BukkitPlugin plugin) {
Bukkit.getScheduler().runTaskTimer(plugin, () -> {
final Set<Player> affectedPlayers = Bukkit.getOnlinePlayers().stream().filter(p -> Via.getAPI().getPlayerProtocolVersion(p).newerThanOrEqualTo(ProtocolVersion.v1_8)).collect(Collectors.toSet());
final Set<Player> affectedPlayers = Bukkit.getOnlinePlayers().stream().filter(p -> Via.getAPI().getPlayerProtocolVersion(p).olderThanOrEqualTo(ProtocolVersion.v1_8)).collect(Collectors.toSet());
effectClouds.removeIf(e -> !e.isValid());
effectClouds.forEach(cloud -> {
final Location location = cloud.getLocation();