pub struct CodeData {Show 17 fields
pub name: Option<String>,
pub identifier: Option<String>,
pub bukkit_name: Option<String>,
pub item: Option<CodeIcon>,
pub aliases: Option<Vec<String>>,
pub codeblock_name: Option<String>,
pub sub_action_blocks: Option<Vec<String>>,
pub category: Option<String>,
pub has_sub_categories: Option<bool>,
pub tags: Option<Vec<CodeData>>,
pub fields: Option<Vec<String>>,
pub default_option: Option<String>,
pub options: Option<Vec<CodeData>>,
pub slot: Option<u8>,
pub purchasables: Option<Vec<CodeData>>,
pub price: Option<u16>,
pub currency_type: Option<String>,
}Expand description
A data element in the DiamondFire action dump.
Fields§
§name: Option<String>The human readable name of this code item.
identifier: Option<String>The identifier of this code item.
bukkit_name: Option<String>The bukkit enum constant name for this code item.
Only applicable for particles, potions, and sounds.
item: Option<CodeIcon>The CodeIcon used to display this code item.
aliases: Option<Vec<String>>Alternate names that may be used to identify this code item.
codeblock_name: Option<String>The name of this codeblock.
sub_action_blocks: Option<Vec<String>>§category: Option<String>The category of this code item.
Only used for game values, particles, and sounds.
has_sub_categories: Option<bool>Whether this category has any sub-categories.
The tag options for this code item.
fields: Option<Vec<String>>The fields of this particle effect.
default_option: Option<String>The default option for this tag.
options: Option<Vec<CodeData>>The list of options in this tag.
slot: Option<u8>The slot this item goes in within an inventory.
purchasables: Option<Vec<CodeData>>The purchasable items within this shop.
price: Option<u16>The price of this shop item.
currency_type: Option<String>The currency used to purchase this shop item.
Implementations§
Source§impl CodeData
impl CodeData
Sourcepub fn is_legacy(&self) -> bool
pub fn is_legacy(&self) -> bool
Returns whether this code item is considered legacy.
This forwards to the method on item if it is present, otherwise returning false.
Sourcepub fn is_deprecated(&self) -> bool
pub fn is_deprecated(&self) -> bool
Returns whether this code item is deprecated.
This forwards to the method on item if it is present, otherwise returning false.
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
Returns whether this code action is dynamic.
This occurs when a code block does not have any selectable actions but needs to take in options.
This is tested by determining if the name is dynamic.