Package org.spongepowered.api.map
Interface MapInfo
- 
- All Superinterfaces:
- DataHolder,- DataHolder.Mutable,- DataSerializable,- Identifiable,- ValueContainer
 
 public interface MapInfo extends DataHolder.Mutable, Identifiable, DataSerializable Represents data that may be viewed on amap. A MapInfo may be attached to multiple maps.- See Also:
- Keys.MAP_INFO
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolderDataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddBannerDecoration(ServerLocation bannerLocation)Adds the banner at the given location to this map.booleanisLinked(ItemStack itemStack)Gets whether the suppliedItemStackis backed by this MapInfo, such that modifications to this MapInfo would affect the supplied stack.DataContainertoContainer()Serializes this object into a comprehensibleDataContainer.- 
Methods inherited from interface org.spongepowered.api.data.DataHolder.MutablecopyFrom, copyFrom, offer, offer, offer, offer, offerAll, offerAll, offerAll, offerAll, offerAll, offerAll, offerSingle, offerSingle, offerSingle, offerSingle, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeKey, removeKey, removeSingle, removeSingle, transform, transform, tryOffer, tryOffer, tryOffer, undo
 - 
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializablecontentVersion
 - 
Methods inherited from interface org.spongepowered.api.util.IdentifiableuniqueId
 
- 
 
- 
- 
- 
Method Detail- 
isLinkedboolean isLinked(ItemStack itemStack) Gets whether the suppliedItemStackis backed by this MapInfo, such that modifications to this MapInfo would affect the supplied stack.This will always return falseif the suppliedItemStackis not of typeItemTypes.FILLED_MAP.
 - 
addBannerDecorationvoid addBannerDecoration(ServerLocation bannerLocation) throws java.lang.IllegalArgumentException Adds the banner at the given location to this map. This is equivalent to right clicking a banner in the world with the corresponding map.- Parameters:
- bannerLocation- Location of the banner to add.
- Throws:
- java.lang.IllegalArgumentException- if the given location is not a banner
- java.lang.IllegalArgumentException- if the given banner
 
 - 
toContainerDataContainer toContainer() Serializes this object into a comprehensibleDataContainer.This has special behaviour for serializing MapDecorationsA MapDecorationon this MapCanvas is only serialized ifMapDecoration.isPersistent()returns true. This is because non-persistent MapDecorations belong more to the area than the map itself. If you wish to serialize them anyway, obtain theMapDecorationsusingKeys.MAP_DECORATIONSand serialize each individually.- Specified by:
- toContainerin interface- DataSerializable
- Returns:
- A newly created DataContainer
 
 
- 
 
-