Skip to content

Commit 2ee3f91

Browse files
committed
add version check
1 parent fad7375 commit 2ee3f91

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitUtil.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,12 @@ public void setFoodLevel(final @NonNull PlotPlayer<?> player, @NonNegative final
471471
allowedInterfaces.add(Firework.class);
472472
}
473473
case "player" -> allowedInterfaces.add(Player.class);
474-
case "interaction" -> allowedInterfaces.add(Interaction.class);
474+
case "interaction" -> {
475+
final int[] version = PlotSquared.platform().serverVersion();
476+
if (version[1] >= 19 && version[2] >= 4) {
477+
allowedInterfaces.add(Interaction.class);
478+
}
479+
}
475480
default -> LOGGER.error("Unknown entity category requested: {}", category);
476481
}
477482
final Set<com.sk89q.worldedit.world.entity.EntityType> types = new HashSet<>();

0 commit comments

Comments
 (0)