Package org.spongepowered.api.map
Interface MapInfo
- All Superinterfaces:
- DataHolder,- DataHolder.Mutable,- DataSerializable,- Identifiable,- ValueContainer
Represents data that may be viewed on a 
map.
 A MapInfo may be attached to multiple maps.- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolderDataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddBannerDecoration(ServerLocation bannerLocation) Adds the banner at the given location to this map.booleanGets whether the suppliedItemStackis backed by this MapInfo, such that modifications to this MapInfo would affect the supplied stack.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, undoMethods inherited from interface org.spongepowered.api.data.persistence.DataSerializablecontentVersionMethods inherited from interface org.spongepowered.api.util.IdentifiableuniqueId
- 
Method Details- 
isLinkedGets 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.
- 
addBannerDecorationAdds 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:
- IllegalArgumentException- if the given location is not a banner
- 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
 
 
-