Skip to content

Commit

Permalink
add version check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamikaschu committed Nov 8, 2024
1 parent fad7375 commit 2ee3f91
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<com.sk89q.worldedit.world.entity.EntityType> types = new HashSet<>();
Expand Down

0 comments on commit 2ee3f91

Please sign in to comment.