Class MetadataTable
java.lang.Object
be.seeseemelk.mockbukkit.metadata.MetadataTable
- All Implemented Interfaces:
org.bukkit.metadata.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 org.bukkit.plugin.Plugin plugin) Clears all metadata belonging to a plugin.@NotNull List<org.bukkit.metadata.MetadataValue> getMetadata(@NotNull String metadataKey) booleanhasMetadata(@NotNull String metadataKey) voidremoveMetadata(@NotNull String metadataKey, @NotNull org.bukkit.plugin.Plugin owningPlugin) voidsetMetadata(@NotNull String metadataKey, @NotNull org.bukkit.metadata.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 org.bukkit.metadata.MetadataValue newMetadataValue) - Specified by:
setMetadatain interfaceorg.bukkit.metadata.Metadatable
-
getMetadata
@NotNull public @NotNull List<org.bukkit.metadata.MetadataValue> getMetadata(@NotNull @NotNull String metadataKey) - Specified by:
getMetadatain interfaceorg.bukkit.metadata.Metadatable
-
hasMetadata
- Specified by:
hasMetadatain interfaceorg.bukkit.metadata.Metadatable
-
removeMetadata
public void removeMetadata(@NotNull @NotNull String metadataKey, @NotNull @NotNull org.bukkit.plugin.Plugin owningPlugin) - Specified by:
removeMetadatain interfaceorg.bukkit.metadata.Metadatable
-
clearMetadata
public void clearMetadata(@NotNull @NotNull org.bukkit.plugin.Plugin plugin) Clears all metadata belonging to a plugin.- Parameters:
plugin- The plugin to clear metadata for.
-