LunarClient / Apollo

Next-generation Lunar Client server API
https://lunarclient.dev
MIT License
65 stars 15 forks source link

Chore - Add BukkitApollo#toApolloEntity utility method #129

Closed ItsNature closed 4 months ago

ItsNature commented 4 months ago

Overview

Description: Added utility method for Bukkit Entity to ApolloEntity conversion.

Changes: Added BukkitApollo#toApolloEntity(org.bukkit.entity.Entity) method

Code Example (If applicable):

public void runEntityExample(Player player, ApolloPlayer apolloPlayer) {
      List<ApolloEntity> sheepEntities = player.getWorld().getEntitiesByClass(Sheep.class)
          .stream().map(BukkitApollo::toApolloEntity)
          .collect(Collectors.toList());

      this.entityModule.overrideRainbowSheep(apolloPlayer, sheepEntities);
  }

Review Request Checklist