Class MetadataTable
java.lang.Object
be.seeseemelk.mockbukkit.metadata.MetadataTable
- All Implemented Interfaces:
Metadatable
Mock implementation of a
Metadatable.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new emptyMetadataTable.MetadataTable(@NotNull MetadataTable table) Constructs a new emptyMetadataTablewith the contents cloned from another. -
Method Summary
Modifier and TypeMethodDescriptionvoidclearMetadata(@NotNull Plugin plugin) Clears all metadata belonging to a plugin.@NotNull List<MetadataValue> getMetadata(@NotNull String metadataKey) booleanhasMetadata(@NotNull String metadataKey) voidremoveMetadata(@NotNull String metadataKey, @NotNull Plugin owningPlugin) voidsetMetadata(@NotNull String metadataKey, @NotNull MetadataValue newMetadataValue)
-
Constructor Details
-
MetadataTable
@Internal public MetadataTable()Constructs a new emptyMetadataTable. -
MetadataTable
Constructs a new emptyMetadataTablewith the contents cloned from another.- Parameters:
table- The table to clone.
-
-
Method Details
-
setMetadata
public void setMetadata(@NotNull @NotNull String metadataKey, @NotNull @NotNull MetadataValue newMetadataValue) - Specified by:
setMetadatain interfaceMetadatable
-
getMetadata
- Specified by:
getMetadatain interfaceMetadatable
-
hasMetadata
- Specified by:
hasMetadatain interfaceMetadatable
-
removeMetadata
public void removeMetadata(@NotNull @NotNull String metadataKey, @NotNull @NotNull Plugin owningPlugin) - Specified by:
removeMetadatain interfaceMetadatable
-
clearMetadata
Clears all metadata belonging to a plugin.- Parameters:
plugin- The plugin to clear metadata for.
-