Skip to content

Commit

Permalink
Add ChunkTicketManager$LoadingTicket#getCompanionData(). Remove two y…
Browse files Browse the repository at this point in the history
…ear old todo.

Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
  • Loading branch information
gabizou committed Feb 8, 2017
1 parent 07d5fad commit 6459642
Showing 1 changed file with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSetMultimap;
import com.google.common.collect.ListMultimap;
import org.spongepowered.api.data.DataContainer;
import org.spongepowered.api.entity.Entity;

import java.util.List;
Expand Down Expand Up @@ -188,7 +189,33 @@ interface LoadingTicket {
*/
int getMaxNumChunks();

// TODO: NBTTag getCustomData(); (Is saved with ticket information)
/**
* Gets the companion data stored in a {@link DataContainer}. Note that
* the provided {@link DataContainer} is modifiable, but a copy of the
* internal container, and as such may need to be
* {@link #setCompanionData(DataContainer)} before modifications can
* be handled.
*
* <p>The sort of data stored in the contianer is plugin/mod dependent

This comment has been minimized.

Copy link
@Blackbird1604

Blackbird1604 Feb 14, 2017

contianer -> container? :)

This comment has been minimized.

Copy link
@Deamon5550

Deamon5550 Feb 14, 2017

Contributor

add to #1000

* and is based on the original creator of this {@link LoadingTicket}.
* As such, the structure and particular data stored in the container
* is not concrete or defined in any specific way.</p>
*
* @return The companion data in the form of a data container
*/
DataContainer getCompanionData();

/**
* Sets the companion data for this loading ticket.
*
* <p>The sort of data stored in the contianer is plugin/mod dependent
* and is based on the original creator of this {@link LoadingTicket}.
* As such, the structure and particular data stored in the container
* is not concrete or defined in any specific way.</p>
*
* @param container The container containing the companion data
*/
void setCompanionData(DataContainer container);

/**
* Gets the ID of the plugin that this ticket belongs to.
Expand Down

0 comments on commit 6459642

Please sign in to comment.