コード例 #1
0
 /**
  * Retrieves a read/write structure for collections of chunk positions.
  *
  * <p>This modifier will automatically marshall between the visible ProtocolLib ChunkPosition and
  * the internal Minecraft ChunkPosition.
  *
  * @return A modifier for ChunkPosition list fields.
  */
 public StructureModifier<List<ChunkPosition>> getPositionCollectionModifier() {
   // Convert to and from the ProtocolLib wrapper
   return structureModifier.withType(
       Collection.class,
       BukkitConverters.getListConverter(
           MinecraftReflection.getChunkPositionClass(), ChunkPosition.getConverter()));
 }
コード例 #2
0
 /**
  * Retrieves a read/write structure for chunk positions.
  *
  * @return A modifier for a ChunkPosition.
  */
 public StructureModifier<ChunkPosition> getPositionModifier() {
   // Convert to and from the Bukkit wrapper
   return structureModifier.withType(
       MinecraftReflection.getChunkPositionClass(), ChunkPosition.getConverter());
 }