/** * Retrieves a read/write structure for entity objects. * <p> * Note that entities are transmitted by integer ID, and the type may not be enough * to distinguish between entities and other values. Thus, this structure modifier * MAY return null or invalid entities for certain fields. Using the correct index * is essential. * * @param world - the world each entity is currently occupying. * @return A modifier entity types. */ public StructureModifier<Entity> getEntityModifier(@Nonnull World world) { Preconditions.checkNotNull(world, "world cannot be NULL."); // Convert to and from the Bukkit wrapper return structureModifier.withType( int.class, BukkitConverters.getEntityConverter(world)); }