Class CustomItems
java.lang.Object
java.util.AbstractMap<String,CustomBannedItem>
java.util.HashMap<String,CustomBannedItem>
fr.andross.banitem.utils.DoubleMap<String,CustomBannedItem>
fr.andross.banitem.database.items.CustomItems
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
CustomBannedItem>
Map that contains all the custom items
This is a double map (include a reversed map), for easier access of
custom items names and their respective banned item.
- Version:
- 3.1
- Author:
- Andross
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionCustomItems
(@NotNull BanItem plugin, @NotNull org.bukkit.command.CommandSender sender) This will create a new instance of custom items map, with the items from customitems.yml file. -
Method Summary
Methods inherited from class fr.andross.banitem.utils.DoubleMap
clear, getKey, getReversed, put, remove
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
CustomItems
public CustomItems(@NotNull @NotNull BanItem plugin, @NotNull @NotNull org.bukkit.command.CommandSender sender) This will create a new instance of custom items map, with the items from customitems.yml file. This should not be used externally, as it could create two different instance of this object. You should useBanItemAPI.load(CommandSender, File)
instead.- Parameters:
plugin
- main instancesender
- the sender who executed this command, for debug
-
-
Method Details
-
getFile
Represents the file "customitems.yml".- Returns:
- The "customitems.yml" file of the BanItem plugin
-
getConfig
@NotNull public @NotNull org.bukkit.configuration.file.FileConfiguration getConfig()Represents the loaded configuration from "customitems.yml" file.- Returns:
- The "customitems.yml" file configuration
-