Package de.marcely.bedwars.api.message
Class DefaultMessageMappings
java.lang.Object
de.marcely.bedwars.api.message.DefaultMessageMappings
Contains a collection of messages that'll be used when the user tries to obtain a message from his messages file that is however not present.
 
     This class is helpful for plugins that want to retain the users ability to customize the message.
     You may directly link it to your internal messages.yml file making it easier using loadInternalYAML(Plugin, InputStream).
 
- 
Nested Class Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()Returns the plugin that has constructed this instance.booleanisEmpty()keySet()static DefaultMessageMappingsloadInternalYAML(Plugin plugin, InputStream stream) Tries to load the YAML file as a language file.@Nullable Stringvoidintsize()@NotNull Collection<String> values()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Constructor Details- 
DefaultMessageMappings
 
- 
- 
Method Details- 
getPluginReturns the plugin that has constructed this instance.- Returns:
- The plugin behind these mappings
 
- 
sizepublic int size()
- 
isEmptypublic boolean isEmpty()
- 
containsKey- Specified by:
- containsKeyin interface- Map<String,- String> 
 
- 
containsValue- Specified by:
- containsValuein interface- Map<String,- String> 
 
- 
get
- 
put
- 
remove
- 
putAll
- 
clearpublic void clear()
- 
keySet
- 
values
- 
entrySet
- 
loadInternalYAMLpublic static DefaultMessageMappings loadInternalYAML(Plugin plugin, InputStream stream) throws IOException Tries to load the YAML file as a language file.Automatically closes the stream. - Parameters:
- plugin- The plugin that wants them to get read
- stream- The stream from which shall be read
- Returns:
- The read mappings
- Throws:
- IOException- Might fail to load it
 
 
-