From 2ee3f911c81ef5b9e5fd707b6f92b180b4bb0569 Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 8 Nov 2024 16:46:59 +0100 Subject: [PATCH] add version check --- .../main/java/com/plotsquared/bukkit/util/BukkitUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java index 79ed1eaa0c..d85721f092 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java @@ -471,7 +471,12 @@ public void setFoodLevel(final @NonNull PlotPlayer player, @NonNegative final allowedInterfaces.add(Firework.class); } case "player" -> allowedInterfaces.add(Player.class); - case "interaction" -> allowedInterfaces.add(Interaction.class); + case "interaction" -> { + final int[] version = PlotSquared.platform().serverVersion(); + if (version[1] >= 19 && version[2] >= 4) { + allowedInterfaces.add(Interaction.class); + } + } default -> LOGGER.error("Unknown entity category requested: {}", category); } final Set types = new HashSet<>();