Package dev.linwood.itemmods.pack
Class ItemModsPack
- java.lang.Object
-
- dev.linwood.itemmods.pack.ItemModsPack
-
- All Implemented Interfaces:
NamedPackObject
- Direct Known Subclasses:
BaseAddon
public class ItemModsPack extends java.lang.Object implements NamedPackObject
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.regex.Pattern
NAME_PATTERN
-
Constructor Summary
Constructors Constructor Description ItemModsPack(@NotNull java.lang.String name)
ItemModsPack(@NotNull java.lang.String name, boolean editable)
ItemModsPack(@NotNull java.nio.file.Path path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
export(java.lang.String variation, @NotNull java.nio.file.Path path)
<T extends PackAsset>
TgetAsset(java.lang.Class<T> type, java.lang.String name)
BlockAsset
getBlock(java.lang.String name)
java.util.List<BlockAsset>
getBlocks()
<T extends PackAsset>
AssetCollection<T>getCollection(@NotNull java.lang.Class<T> type)
@NotNull java.util.List<java.lang.String>
getDependencies()
java.lang.String
getDescription()
@NotNull org.bukkit.inventory.ItemStack
getIcon()
ItemAsset
getItem(java.lang.String name)
java.util.List<ItemAsset>
getItems()
ModelAsset
getModel(java.lang.String name)
java.util.List<ModelAsset>
getModels()
java.lang.String
getName()
SoundAsset
getSound(java.lang.String name)
java.util.List<SoundAsset>
getSounds()
CustomTemplate
getTemplate(java.lang.String name)
java.util.List<CustomTemplate>
getTemplates()
TextureAsset
getTexture(java.lang.String name)
java.util.List<TextureAsset>
getTextures()
boolean
isEditable()
<T extends PackAsset>
voidregister(T asset)
void
registerDependency(@NotNull java.lang.String name)
void
reload()
void
setDescription(java.lang.String description)
void
setIcon(@NotNull org.bukkit.Material icon)
void
setName(@NotNull java.lang.String name)
<T extends PackAsset>
voidunregister(T asset)
void
unregisterDependency(java.lang.String name)
-
-
-
Constructor Detail
-
ItemModsPack
public ItemModsPack(@NotNull @NotNull java.lang.String name, boolean editable) throws java.lang.UnsupportedOperationException, java.io.IOException
- Throws:
java.lang.UnsupportedOperationException
java.io.IOException
-
ItemModsPack
public ItemModsPack(@NotNull @NotNull java.lang.String name) throws java.io.IOException
- Throws:
java.io.IOException
-
ItemModsPack
public ItemModsPack(@NotNull @NotNull java.nio.file.Path path) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
reload
public void reload() throws java.io.IOException
- Throws:
java.io.IOException
-
getCollection
public <T extends PackAsset> AssetCollection<T> getCollection(@NotNull @NotNull java.lang.Class<T> type)
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceNamedPackObject
-
setName
public void setName(@NotNull @NotNull java.lang.String name) throws java.lang.UnsupportedOperationException
- Throws:
java.lang.UnsupportedOperationException
-
getDependencies
@NotNull public @NotNull java.util.List<java.lang.String> getDependencies()
-
registerDependency
public void registerDependency(@NotNull @NotNull java.lang.String name)
-
unregisterDependency
public void unregisterDependency(java.lang.String name)
-
getDescription
public java.lang.String getDescription()
-
setDescription
public void setDescription(java.lang.String description)
-
isEditable
public boolean isEditable()
-
getIcon
@NotNull public @NotNull org.bukkit.inventory.ItemStack getIcon()
-
setIcon
public void setIcon(@NotNull @NotNull org.bukkit.Material icon)
-
export
public void export(java.lang.String variation, @NotNull @NotNull java.nio.file.Path path) throws java.io.IOException
- Throws:
java.io.IOException
-
getAsset
public <T extends PackAsset> T getAsset(java.lang.Class<T> type, java.lang.String name)
-
register
public <T extends PackAsset> void register(T asset)
-
unregister
public <T extends PackAsset> void unregister(T asset)
-
getBlocks
public java.util.List<BlockAsset> getBlocks()
-
getItems
public java.util.List<ItemAsset> getItems()
-
getModels
public java.util.List<ModelAsset> getModels()
-
getTextures
public java.util.List<TextureAsset> getTextures()
-
getSounds
public java.util.List<SoundAsset> getSounds()
-
getTemplates
public java.util.List<CustomTemplate> getTemplates()
-
getBlock
public BlockAsset getBlock(java.lang.String name)
-
getItem
public ItemAsset getItem(java.lang.String name)
-
getModel
public ModelAsset getModel(java.lang.String name)
-
getTexture
public TextureAsset getTexture(java.lang.String name)
-
getSound
public SoundAsset getSound(java.lang.String name)
-
getTemplate
public CustomTemplate getTemplate(java.lang.String name)
-
-