Package org.spongepowered.api
Interface ResourceKey.Builder
- All Superinterfaces:
- AbstractBuilder<ResourceKey>,- Builder<ResourceKey,,- ResourceKey.Builder> - ResettableBuilder<ResourceKey,- ResourceKey.Builder> 
- Enclosing interface:
- ResourceKey
A builder to create 
ResourceKeys.- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds theResourceKey.Sets the key's namespace.default ResourceKey.Buildernamespace(org.spongepowered.plugin.PluginContainer container) Sets the key's namespace based on the providedPluginContainer's identifier.Sets the key's value.
- 
Method Details- 
namespaceSets the key's namespace.If using a ResourceKey.MINECRAFT_NAMESPACEorResourceKey.SPONGE_NAMESPACE, it is preferable to useResourceKey.minecraft(String)orResourceKey.sponge(String)instead.- Parameters:
- namespace- The namespace to use
- Returns:
- This builder, for chaining
 
- 
namespaceSets the key's namespace based on the providedPluginContainer's identifier.- Parameters:
- container- The plugin container to fetch from
- Returns:
- This builder, for chaining
 
- 
valueSets the key's value.- Parameters:
- value- The value to use
- Returns:
- This builder, for chaining
 
- 
buildBuilds theResourceKey.- Specified by:
- buildin interface- AbstractBuilder<ResourceKey>
- Returns:
- The built resource key
- Throws:
- IllegalStateException- If- namespace(String)or- value(String)are not set.
 
 
-