PropScriptConfigFields

Unified configuration fields for model YML config files.

Each model file (e.g. torch_01.bbmodel) can have a sibling YML file (e.g. torch_01.yml) that configures scripts and optionally item properties.

If material is set, the model is also available as a custom item that players can hold, with the specified material, enchantments, and lore. Script filenames resolve from the central scripts/ folder.

Constructors

Link copied to clipboard
public void PropScriptConfigFields(String filename, boolean isEnabled)
Used when creating a new default config or loading an existing one.

Properties

Link copied to clipboard
public List<String> enchantments
Link copied to clipboard
public String itemName
Link copied to clipboard
public List<String> lore
Link copied to clipboard
public String material
Link copied to clipboard
public Map<String, Integer> parsedEnchantments
Link copied to clipboard
public List<String> scripts
Link copied to clipboard
public String unavailableReason
Link copied to clipboard

Inherited properties

Link copied to clipboard
protected File file
Link copied to clipboard
protected FileConfiguration fileConfiguration
Link copied to clipboard
protected String filename
Link copied to clipboard
protected boolean isEnabled
Link copied to clipboard
public FileConfiguration writableFileConfiguration

Functions

Link copied to clipboard
public List<String> getEnchantments()
Link copied to clipboard
public String getItemName()
Link copied to clipboard
public List<String> getLore()
Link copied to clipboard
public String getMaterial()
Link copied to clipboard
public Map<String, Integer> getParsedEnchantments()
Link copied to clipboard
public Material getParsedMaterial()
Parses the material string.
Link copied to clipboard
public List<String> getScripts()
Link copied to clipboard
public String getUnavailableReason()
Link copied to clipboard
Link copied to clipboard
public boolean isCustomItem()
Returns true if this model is also configured as a custom item (has a material defined).
Link copied to clipboard
public boolean isSolidify()
Link copied to clipboard
public boolean isVoxelize()
Link copied to clipboard
public void processConfigFields()

Inherited functions

Link copied to clipboard
protected boolean configHas(String configKey)
Link copied to clipboard
public File getFile()
Link copied to clipboard
public FileConfiguration getFileConfiguration()
Link copied to clipboard
public String getFilename()
Link copied to clipboard
public FileConfiguration getWritableFileConfiguration()
Link copied to clipboard
public boolean isEnabled()
Link copied to clipboard
protected boolean processBoolean(String path, boolean value, boolean pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
public ConfigurationSection processConfigurationSection(String path, Map<String, Object> value)
Link copied to clipboard
protected double processDouble(String path, double value, double pluginDefault, boolean forceWriteDefault)
protected Double processDouble(String path, Double value, Double pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
public T processEnum<T extends Enum<T>>(String path, T value, T pluginDefault, Class<T> enumClass, boolean forceWriteDefault)
Link copied to clipboard
protected List<T> processEnumList<T extends Enum<T>>(String path, List<T> value, List<T> pluginDefault, Class<T> enumClass, boolean forceWriteDefault)
Link copied to clipboard
protected int processInt(String path, int value, int pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
public ItemStack processItemStack(String path, ItemStack value, ItemStack pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
public List<Object> processList(String path, List<Object> value, List<Object> pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
protected Location processLocation(String path, Location value, String pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
protected long processLong(String path, long value, long pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
public Map<String, Object> processMap(String path, Map<String, Object> value)
Link copied to clipboard
public Map<String, Object> processMapWithKey(String path, Map<String, Object> value)
Link copied to clipboard
protected String processString(String path, String value, String pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
public List<String> processStringList(String path, List<String> value, List<String> pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
protected Vector processVector(String path, Vector value, Vector pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
protected List<World> processWorldList(String path, List<World> value, List<World> pluginDefault, boolean forceWriteDefault)
Link copied to clipboard
public void setEnabled(boolean isEnabled)
Link copied to clipboard
public CompletableFuture<Void> setEnabledAndSave(boolean enabled)
Link copied to clipboard
public void setFile(File file)
Link copied to clipboard
public void setFileConfiguration(FileConfiguration fileConfiguration)