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 emptyMetadataTable
with the contents cloned from another. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearMetadata
(@NotNull Plugin plugin) Clears all metadata belonging to a plugin.@NotNull List<MetadataValue>
getMetadata
(@NotNull String metadataKey) boolean
hasMetadata
(@NotNull String metadataKey) void
removeMetadata
(@NotNull String metadataKey, @NotNull Plugin owningPlugin) void
setMetadata
(@NotNull String metadataKey, @NotNull MetadataValue newMetadataValue)
-
Constructor Details
-
MetadataTable
@Internal public MetadataTable()Constructs a new emptyMetadataTable
. -
MetadataTable
Constructs a new emptyMetadataTable
with 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:
setMetadata
in interfaceMetadatable
-
getMetadata
- Specified by:
getMetadata
in interfaceMetadatable
-
hasMetadata
- Specified by:
hasMetadata
in interfaceMetadatable
-
removeMetadata
public void removeMetadata(@NotNull @NotNull String metadataKey, @NotNull @NotNull Plugin owningPlugin) - Specified by:
removeMetadata
in interfaceMetadatable
-
clearMetadata
Clears all metadata belonging to a plugin.- Parameters:
plugin
- The plugin to clear metadata for.
-