### Path Configuration Example Source: https://docs.phoenixdevt.fr/mmocore/features/skill-trees Example demonstrating how to define paths between nodes, including their coordinates and grid occupancy. Paths connect nodes and are visually represented. ```yaml nodes: a1: ... coordinates: 0,0 children: strong: a2: level: 1 paths: ['1 0', '2 0'] a3: level: 1 paths: ['-1 0', '-2 0'] a2: ... coordinates: 3,0 a3: ... coordinates: -3,0 ``` -------------------------------- ### Example Recipe with Triggers Source: https://docs.phoenixdevt.fr/mmoitems/stations/triggers Demonstrates how to define triggers within a recipe configuration. This example shows a 'steel-sword' recipe with a 'vanilla' trigger. ```yaml recipes: steel-sword: .... triggers: - 'vanilla{type=STICK,amount=3}' ``` -------------------------------- ### Crafting Station Example with Recipe Source: https://docs.phoenixdevt.fr/mmoitems/stations/intro An example of a crafting station configuration, including its name, sound effect, and a specific recipe with output, crafting time, conditions, and ingredients. ```yaml name: 'Steel Crafting Station (#page#/#max#)' max-queue-size: 10 sound: ENTITY_EXPERIENCE_ORB_PICKUP recipes: two-handed-steel-sword: output: 'mmoitem{type=GREATSWORD,id=TWO_HANDED_STEEL_SWORD}' crafting-time: 10 conditions: - 'level{level=8}' ingredients: - 'mmoitem{type=MATERIAL,id=STEEL_INGOT,amount=8}' - 'vanilla{type=STICK,amount=4}' ``` -------------------------------- ### Skill Tree Display Configuration Example Source: https://docs.phoenixdevt.fr/mmocore/features/skill-trees Example YAML configuration for defining custom displays for skill tree paths and nodes. This can be used in 'gui/skill-tree.yml' or individual skill tree configurations. ```yaml display: paths: unlocked: up: "WHITE_DYE:0" up-right: "WHITE_DYE:0" up-left: "WHITE_DYE:0" down-right: "WHITE_DYE:0" down-left: "WHITE_DYE:0" right: "WHITE_DYE:0" default: "WHITE_DYE:0" locked: ... unlockable: ... fully-locked: ... nodes: unlocked: up-right-down-left: "WHITE_CONCRETE:0" up-right-down: "WHITE_CONCRETE:0" up-right-left: "WHITE_CONCRETE:0" up-down-left: "WHITE_CONCRETE:0" down-right-left: "WHITE_CONCRETE:0" up-right: "WHITE_CONCRETE:0" up-down: "WHITE_CONCRETE:0" up-left: "WHITE_CONCRETE:0" down-right: "WHITE_CONCRETE:0" down-left: "WHITE_CONCRETE:0" right-left: "WHITE_CONCRETE:0" right: "WHITE_CONCRETE:0" left: "WHITE_CONCRETE:0" up: "WHITE_CONCRETE:0" down: "WHITE_CONCRETE:0" no-path: "WHITE_CONCRETE:0" locked: ... unlockable: ... fully-locked: ... ``` -------------------------------- ### Element Configuration Example (MythicMobs Skills) Source: https://docs.phoenixdevt.fr/mythiclib/features/elements Example configuration for a custom element using MythicMobs skills. This shows how to link regular and critical attacks to specific MythicMobs skill identifiers. ```yaml FIRE: name: Fire icon: BLAZE_POWDER lore-icon: '🔥' color: '&c' regular-attack: mythicmobs-skill-id: fire_elemental_attack crit-strike: mythicmobs-skill-id: fire_critical_strike ``` -------------------------------- ### MMOCore Command Configuration Example Source: https://docs.phoenixdevt.fr/mythiclib/general/commands Example of configuring basic command information for MMOCore, including main command name, aliases, description, and permission. This allows players to use alternative labels and restricts access based on permissions. ```yaml mmocore: verbose: PLAYER cast: main: cast aliases: [] description: 'Enter casting mode' permission: 'mmocore.cast' verbose: ALL player: main: player aliases: [ p, profile ] description: 'Displays player stats' permission: 'mmocore.profile' verbose: ALL # [...] ``` -------------------------------- ### Color and Style Example Source: https://docs.phoenixdevt.fr/mythiclib/faq Shows how to apply a specific color and bold styling to text using MiniMessage tags. This example uses red color for 'MMOITEMS' and also applies bold. ```plaintext MMOITEMS or <#FF0000>MMOITEMS ``` -------------------------------- ### Paper Server Start Argument for Plugin Loading Source: https://docs.phoenixdevt.fr/mythiclib/faq Use this server start argument on Paper or Paper forks (1.19.2+) to enable legacy plugin loading, which can help resolve plugin loading order issues. ```bash -Dpaper.useLegacyPluginLoading=true ``` -------------------------------- ### Waypoint Configuration Example Source: https://docs.phoenixdevt.fr/mmocore/features/waypoints This example demonstrates the structure for configuring a single waypoint, including its name, location, radius, warp time, costs, and linked destinations. It shows how to enable or disable features like unlocking and the teleportation menu. ```yml # Waypoint identifier, used as reference for admin commands. # Make sure all the waypoints have different identifiers. spawn: # Name of waypoint displayed in the waypoint GUI. name: Spawn # Location of waypoint: # Yaw and pitch represent where the player will be looking at when teleported. location: 'world 69 71 136 136 0' # Radius of waypoint around the specified location. radius: 2.0 # Time it takes to warp to target location when using # the waypoint through the GUI. warp-time: 100 cost: # Cost when not standing on any waypoint to dynamically teleport to this one. dynamic-use: 5 option: # When enabled, players can unlock the waypoint # by sneaking on it (true by default) unlockable: true # When enabled, opens up the teleportation menu # when sneaking (true by default) enable-menu: true # When set to true (false by default) players don't # have to be standing on any waypoint to teleport # to that waypoint. This could be a nice option for # spawn waypoints alongside with the 'default' option. dynamic: false # Should the waypoint be unlocked by default? default: true # All the waypoints you can teleport to when standing # on that waypoint. Each value is associated with the cost of the travel. linked: spawn1: 2 spawn2: 3 forest: 4 ``` -------------------------------- ### Element Configuration Example (MythicLib Skills) Source: https://docs.phoenixdevt.fr/mythiclib/features/elements Example configuration for a custom element using MythicLib's internal skill system. This defines the element's name, icon, color, and the skills to trigger for regular and critical attacks. ```yaml FIRE: # Main translation MMOCore and MMOItems will use name: Fire icon: BLAZE_POWDER # Purely cosmetic, used in the MMOItems item editor lore-icon: '🔥' # Used in the MMOItems item lore color: '&c' # Used in the MMOItems item lore # What gets executed when a normal elemental is performed regular-attack: mythiclib-skill-id: fire_elemental_attack # What gets executed when a elemental critical strike is performed # This one is optional. If not specified, no crits can occur crit-strike: mythiclib-skill-id: fire_critical_strike ``` -------------------------------- ### mmoCanTarget with SUPPORT_ACTION Source: https://docs.phoenixdevt.fr/mythiclib/skills/custom/mythic.html Example of using mmoCanTarget to check for SUPPORT_ACTION targetability. This is useful for skills like heals or buffs. ```yaml COMBAT_ONE: mythicmobs-skill-id: combat_one_run modifiers: - damage - duration extra-skills: combat_one_run: TargetConditions: - mmoCanTarget{interaction=SUPPORT_ACTION} true Skills: - jsonmessage{m="[{'text':'SUPPORT_ACTION','color':'red'}]"} @self ``` -------------------------------- ### Tool Inheritance Example Source: https://docs.phoenixdevt.fr/mmocore/misc/tool-restrictions Demonstrates how to use the 'parent' option to make stronger tools inherit mining permissions from weaker ones. This example shows a diamond pickaxe inheriting from another diamond pickaxe configuration. ```yaml TOOL?DIAMOND_PICKAXE: parent: DIAMOND_PICKAXE can-mine: - ... ``` -------------------------------- ### Item Function Example Source: https://docs.phoenixdevt.fr/mythiclib/misc/ui-syntax An example demonstrating an item with a specific function, such as 'attribute_strength', which defines its behavior and the placeholders available in its lore. ```yaml # [...] items: # [...] item_strength: slots: [15] function: attribute_strength name: '&a{name}' item: BOOK lore: #..... - '&8When Leveled Up:' - '&7 +{buff_weapon_damage}% Weapon Damage (&a+{total_weapon_damage}%&7)' - '&7 +{buff_max_health} Max Health (&a+{total_max_health}&7)' #..... ``` -------------------------------- ### MMOCore Quest Configuration Example Source: https://docs.phoenixdevt.fr/mmocore/features/quests Defines a complete quest with objectives, triggers, and rewards. This example includes level requirements, parent quests, cooldowns, and various objective types like clicking, mining, item collection, talking to NPCs, and killing MythicMobs. ```yaml # Levels players must have in # order to unlock this quest. level-req: main: 10 mining: 5 # Quest name displayed in the quest menu. name: 'A Whole New World' # Quest lore displayed in the quest menu. lore: - 'This is the tutorial quest.' - 'Lore example...' - '' - '&eRewards:' - '&7► Wooden Tools' - '&7► Leather Armor' - '&7► 100 EXP' # Quests the player must finish # in order to unlock this one. parent: [] # Cooldown in hours. Don't put any # to make the quest a one-time quest. # Put it to 0 to make it instantly redoable. delay: 12 # Objectives the player needs to # complete. Once they're all complete, # the quest will end. objectives: 1: type: 'clickon{world="world";x=56;y=68;z=115;range=5}' lore: 'Head to the camp.' bar-color: PURPLE triggers: - 'message{format="&aGood job, now get some oak logs!"}' - 'sound{sound=ENTITY_EXPERIENCE_ORB_PICKUP}' 2: type: 'mineblock{type="OAK_LOG";amount=3}' lore: 'Get three oak logs!' triggers: - 'message{format="&aGood job, now give these logs to the blacksmith."}' - 'sound{sound="ENTITY_EXPERIENCE_ORB_PICKUP"}' 3: type: 'getitem{type="OAK_LOG";amount=3;npc=0}' lore: 'Give these oak logs to the blacksmith.' triggers: - 'message{format="&aGood job, now talk to the blacksmith again to claim your weapons!"}' - 'sound{sound=ENTITY_EXPERIENCE_ORB_PICKUP}' 4: type: 'talkto{npc=0}' lore: 'Get your weapons from the blacksmith!' triggers: - 'message{format="&aNow go kill 5 skeletal knights to finish tutorial!"}' - 'sound{sound=ENTITY_PLAYER_LEVELUP}' 5: type: 'killmythicmob{name="SkeletalKnight";amount=5}' lore: 'Kill 5 skeletal knights!' triggers: - 'message{format="&a&lYou have successfully finished the tutorial!"}' - 'sound{sound="ENTITY_PLAYER_LEVELUP"}' - 'mmoitem{type=SWORD;id=CUTLASS}' ``` -------------------------------- ### Example Item Template Configuration Source: https://docs.phoenixdevt.fr/mmoitems/items/templates This YAML configuration defines a 'Long Sword' item template with base stats and two example modifiers: one with a prefix and attack damage bonus, and another with a suffix and PvP damage bonus. ```yaml LONG_SWORD: base: material: IRON_SWORD attack-damage: base: 10 scale: 1 critical-strike-chance: 30 # More item stats here... modifiers: first-modifier: prefix: 'Modifier Prefix' stats: attack-damage: 3 # More item stats here... second-modifier: suffix: 'Modifier Suffix' stats: pvp-damage: 20 # More item stats here... ``` -------------------------------- ### Basic mmoCanTarget Condition Source: https://docs.phoenixdevt.fr/mythiclib/skills/custom/mythic.html A basic example demonstrating the syntax for the mmoCanTarget condition in a MythicMobs skill. ```yaml SomeSkill: Conditions: - mmoCanTarget{interaction=OFFENSE_ACTION} ``` -------------------------------- ### Custom Mitigation Type Configuration Example Source: https://docs.phoenixdevt.fr/mythiclib/features/mitigation-types An example of how to configure a custom mitigation type, demonstrating options for legacy support, cooldown calculation, roll chance formula, and pre-damage scripts. ```yaml block: # For backwards compatibility only. # If none of your plugins use the old MythicLib mitigation # events, you can safely remove/comment out this option. legacy: block # Formula for cooldown between two consecutive blocks (in seconds) # To disable cooldown, delete this line, or comment it out # Note that, by default, cooldown reduction is capped at 80% (see stats.yml) cooldown: '3 * (1 - / 100)' # Chance to successfully block an attack # This formula should return a value between 0 and 1 (0 being 0% chance, 1 being 100% chance) # Note that, by default, block rating is capped at 80% (see stats.yml) roll: ' / 100' # Script/skill ran on damage on_damage: mitigation_on_block ``` -------------------------------- ### Basic Shaped Recipe Example Source: https://docs.phoenixdevt.fr/mmoitems/features/custom-recipes Defines a basic shaped recipe for a WATER_BUCKET. The 'input' specifies the required items in a 3x3 grid. ```yaml SHAPEDRECIPE: base: name: Shaped material: WATER_BUCKET crafting: shaped: '1': input: - v stone - 1.0..|v AIR 0 1..|v AIR 0 1.. - v AIR 0 1..|v AIR 0 1..|v AIR 0 1.. - v AIR 0 1..|v AIR 0 1..|v stone - 1.0.. ``` -------------------------------- ### Example Recipe with Conditions Source: https://docs.phoenixdevt.fr/mmoitems/stations/conditions This YAML snippet demonstrates how to define multiple conditions for a crafting recipe, including level, permission, and placeholder checks. ```yaml # ... recipes: steel-sword: output: 'mmoitems{type=SWORD,id=STEEL_SWORD}' ... conditions: - 'level{level=5,consume=true}' - 'permission{list="mmoitems.recipe.steel-sword,mmoitems.recipe.station.steel"}' - 'placeholder{placeholder="%ac_Stat_Weight%~>~1"}' ``` -------------------------------- ### Custom Skill Tree Configuration Source: https://docs.phoenixdevt.fr/mmocore/features/skill-trees Example of a custom skill tree configuration. MMOCore defaults to this type if none is specified. ```yaml id: "sample_skill_ree" name: "&6My Skill Tree" type: CUSTOM # <<==== Here ... ``` -------------------------------- ### mmoCanTarget with OFFENSE_ACTION Source: https://docs.phoenixdevt.fr/mythiclib/skills/custom/mythic.html Example of using mmoCanTarget to check for OFFENSE_ACTION targetability. This is relevant for damaging or debuffing skills. ```yaml COMBAT_TWO: mythicmobs-skill-id: combat_two_run modifiers: - damage - duration extra-skills: combat_two_run: TargetConditions: - mmoCanTarget{interaction=OFFENSE_ACTION} true Skills: - jsonmessage{m="[{'text':'OFFENSE_ACTION','color':'red'}]"} @self ``` -------------------------------- ### Example Modifier Configuration Source: https://docs.phoenixdevt.fr/mmoitems/items/modifiers A sample modifier that adds attack damage and lore with a 20% chance. ```yaml sharp_modifier: chance: 0.2 # 20% chance to be selected stats: # additional stats provided attack-damage: 5 lore: - 'Very sharp!' ``` -------------------------------- ### Enchanting Experience Calculation Example Source: https://docs.phoenixdevt.fr/mmocore/profession/enchanting Illustrates how to calculate the total experience gained by a player when enchanting an item with multiple enchants. ```plaintext efficiency exp = 4 * 40 = 160 unbreaking exp = 3 * 10 = 30 silk touch exp = 1 * 50 = 50 total exp = sum of exp from all enchants = 240 exp ``` -------------------------------- ### Example Trigger Table Configuration Source: https://docs.phoenixdevt.fr/mmocore/misc/triggers Defines custom trigger lists that can be referenced by their IDs. Each list contains a sequence of actions to be executed. ```yaml #Example test-trigger: - 'command{format="broadcast Triggered!"}' #Will fire the 2 commands in test-trigger-2 - 'from{source="test-trigger-2"}' test-trigger-2: - 'command{format="mmocore admin skill-points give %player_name% 1"}' - 'command{format="mmocore admin atr-realloc-points give %player_name% 3"}' ``` -------------------------------- ### Crafting Recipe with Triggers Source: https://docs.phoenixdevt.fr/mmoitems/stations/crafting-recipes Example of a crafting recipe configuration using 'on-use', 'triggers', and 'on-cancel' to perform actions during different stages of the crafting process. ```yaml recipes: steel-sword: output: 'mmoitems{type=SWORD,id=STEEL_SWORD,amount=1}' crafting-time: 10 # time in seconds on-use: # Optional - called when USING the recipe - 'message{format="You are crafting a steel sword"}' - '...' triggers: # Optional - called when obtaining the item - 'message{format="You just claimed a steel sword"}' - '...' on-cancel: # Optional - called when CANCELING any craft from that recipe - 'message{format="You are no longer crafting a steel sword"}' - '...' ``` -------------------------------- ### MythicLib Script Example Source: https://docs.phoenixdevt.fr/mythiclib/skills/custom/mythiclib Defines a MythicLib script for a staff attack, including mechanics for casting, hitting an entity, and ongoing effects. ```yaml # The script that you cast to peform the staff attack staff_attack: mechanics: - 'raytrace{hit_entity=staff_attack_hit_entity;tick=staff_attack_tick;size=1}' - 'sound{sound=ENTITY_BLAZE_SHOOT;pitch=1;volume=1}' # The effect when the attack hits an entity staff_attack_hit_entity: conditions: - 'can_target' mechanics: - 'damage{amount=10;ignore_immunity=true}' - 'particle{particle=LAVA;amount=32}' # The tick effect while the raytrace is ongoing staff_attack_tick: mechanics: - 'particle{particle=REDSTONE;amount=4;x=.5;y=.5;z=.5}' ``` -------------------------------- ### Custom Experience Source Table Source: https://docs.phoenixdevt.fr/mmocore/level/sources Example of creating a custom experience source table in exp-sources.yml, linking an ID to a list of experience sources. ```yaml #Example test-exp-source: - 'damagedealt{type=physical;amount=250}' - 'move{type=WALK;amount=300}' - 'from{source=test2}' test2: - 'eat{type=CARROT;amount="50"}' ``` -------------------------------- ### Basic Smoker Recipe Setup Source: https://docs.phoenixdevt.fr/mmoitems/features/custom-recipes Defines a basic item with a 'smoker' crafting type. This is a foundational step before defining the actual recipe inputs. ```yaml SMOKERRECIPE: base: name: Smoker material: WATER_BUCKET crafting: smoker: #This is what defines your crafting type. ``` -------------------------------- ### Recipes for Multiple Crafting Types Source: https://docs.phoenixdevt.fr/mmoitems/features/custom-recipes Demonstrates how to assign recipes to different crafting types for a single item. This example includes recipes for both 'smoker' and 'furnace'. ```yaml SMOKERANDFURNACERECIPE: base: name: Smoker material: WATER_BUCKET crafting: smoker: #This is what defines your crafting type. '1': #This lets MMOItems know that there are multiple recipes registered to the crafting type (smoker in this case). input: #explained later '2': input: furnace: '1': input: ``` -------------------------------- ### Register PlaceholderProcessor Instance Source: https://docs.phoenixdevt.fr/mmoprofiles/api/placeholders This snippet demonstrates how to register your custom PlaceholderProcessor instance with a ProfileProvider. This registration should occur during your profile data module's setup. ```java ProfileProvider provider = /* profile provider */; PlaceholderProcessor yourPlaceholderProcessor = /* TODO */; provider.registerPlaceholders(yourPlaceholderProcessor); ``` -------------------------------- ### Basic Item Configuration Snippet Source: https://docs.phoenixdevt.fr/mmoitems/items/creation A starting point for manually editing item configuration files. Replace YOUR_ITEM_ID and YOUR_ITEM_MATERIAL with your desired values. ```yaml YOUR_ITEM_ID: base: material: YOUR_ITEM_MATERIAL ``` -------------------------------- ### Attribute-View GUI Lore Mismatch Example Source: https://docs.phoenixdevt.fr/mmocore/features/attributes This GUI configuration for the 'int' item shows a lore setup that does not match the defined buffs in the attribute configuration, leading to placeholder parsing failures. ```yaml items: # [...] int: # [...] lore: ... - '&8When Leveled Up:' - '&7 +{buff_physical_damage}% Physical Damage (&a+{total_physical_damage}%&7)' - '&7 +{buff_attack_speed} Attack Speed (&a+{total_attack_speed}&7)' ``` -------------------------------- ### Define Custom Pre-Damage Script for Mitigation Source: https://docs.phoenixdevt.fr/mythiclib/features/mitigation-types Example of how to define a custom pre-damage script for a new mitigation type. This script runs before the mitigation is rolled. ```yaml my_mitigation_type: pre_damage: my_custom_pre_damage_script ``` -------------------------------- ### Example Monster Drop Table Configuration Source: https://docs.phoenixdevt.fr/mmoitems/items/drop-tables Defines drop tables for a zombie, including a 'rock-table' and a 'coin-table' with specific item drop chances and amounts. ```yml monsters: ZOMBIE: rock-table: coef: 7 items: CONSUMABLE: ROCK: 50,1-3,10 coin-table: coef: 1 items: MISCELLANEOUS: GOLD_COIN: 1,1-10,0 ``` -------------------------------- ### Basic Upgrading Recipe Configuration Source: https://docs.phoenixdevt.fr/mmoitems/stations/upgrading-recipes This example demonstrates the basic structure of an upgrading recipe. Use 'item' instead of 'output' to define the item being upgraded. This recipe requires the player to be level 5 and possess 4 Steel Ingots. ```yaml # crafting-stations/cs_example.yml recipes: steel-sword-upgrade: item: # Use 'item' instead of 'output' to switch to an upgrading recipe type: SWORD id: STEEL_SWORD conditions: - 'level{level=5}' ingredients: - 'mmoitem{type=MATERIAL,id=STEEL_INGOT,amount=4}' ``` -------------------------------- ### Advanced Mining Block Configuration Source: https://docs.phoenixdevt.fr/mmocore/features/mining An example demonstrating advanced configuration for a custom block, including material, conditions, drop table, regeneration, and triggers. ```yaml on-mine: diamond_ore: # ..... VOID_SHROOM: material: 'mushroom{type=BROWN_MUSHROOM_BLOCK;faces="SOUND,DOWN"}' conditions: - 'region{name=lapis,redstone}' drop-table: items: - 'mmoitem{type=QUEST;id=VOID_SHROOM} 1 1' options: vanilla-drops: false regen: time: 150 temp-block: 'vanilla{type=BLACK_CONCRETE}' triggers: - 'exp{profession=mining;amount=4}' ``` -------------------------------- ### Skill Message with Placeholders Source: https://docs.phoenixdevt.fr/mythiclib/scripts/intro Example of a 'tell' type skill message format that uses both PlaceholderAPI (%player_name%) and MythicLib internal variables (, , ). ```yaml tellmsg: type: tell format: 'Skill was cast at - - by %player_name%!!' target: type: caster ``` -------------------------------- ### MythicMobs Arrow Volley Mechanic Example Source: https://docs.phoenixdevt.fr/mmoitems/compatibility/mythic Fires a volley of arrows with custom parameters like amount, spread, and velocity. This example uses specific offsets and scales arrow damage. ```yaml ExampleSkill: Skills: - MMOItemsVolley{amount=10;spread=30;fireTicks=20;removeDelay=100;velocity=20;syo=1.2;sso=2} @Forward{f=15.0;y=0.0} ``` -------------------------------- ### Strong Parent/Child Relationship Example Source: https://docs.phoenixdevt.fr/mmocore/features/skill-trees Defines strong parent-child relationships where all strong parents must be unlocked before the child node can be unlocked. This example shows 'a1' as the parent of 'a2', 'a3', and 'a4'. ```yaml nodes: a1: ... children: strong: a2: level: 2 a3: level: 1 a4: level: 3 a2: ... a3: ... a4: ... ``` -------------------------------- ### Build MMOItem from Template (Player) Source: https://docs.phoenixdevt.fr/mmoitems/api/main Create an MMOItem instance from a template, scaled for a specific player. ```java itemTemplate.newBuilder(player).build() ``` -------------------------------- ### Full Smithing Table Recipe Example Source: https://docs.phoenixdevt.fr/mmoitems/features/custom-recipes A comprehensive smithing table recipe configuration including options for dropping gems, handling upgrades and enchantments, defining output items, and setting the crafting amount. ```yaml SMITHINGTABLERECIPE: base: name: Smithing Table material: WATER_BUCKET crafting: smithing: input: m EXAMPLE_TYPE EXAMPLE_ID 1.0..|v STONE - 1.0.. drop-gems: true upgrades: ADDITIVE enchantments: ADDITIVE output: v diamond - 1.0..|v AIR - 1.. amount: 10 ``` -------------------------------- ### Soft Parent/Child Relationship Example Source: https://docs.phoenixdevt.fr/mmocore/features/skill-trees Defines soft parent-child relationships where at least one soft parent must be unlocked. This example shows 'a1' as a parent to 'a2' and 'a3' with different level requirements. ```yaml nodes: a1: ... children: soft: a2: level: 3 a3: level: 2 a2: ... a3: ... ``` -------------------------------- ### Example Crafting Recipe with MMOItems and Vanilla Ingredients Source: https://docs.phoenixdevt.fr/mmoitems/stations/ingredients Defines a recipe for a 'Steel Sword' using 4 MMOItems steel ingots and 2 vanilla sticks. This snippet demonstrates the basic structure for specifying different ingredient types. ```yaml recipes: steel-sword: output: 'mmoitems{type=SWORD,id=STEEL_SWORD}' #... ingredients: - 'mmoitem{type=MATERIAL,id=STEEL_INGOT,amount=4}' - 'vanilla{type=STICK,amount=2}' ``` -------------------------------- ### Shaped Recipe Input Layout Example Source: https://docs.phoenixdevt.fr/mmoitems/features/custom-recipes Illustrates the layout for a shaped recipe's 'input' using descriptive slot names. This is an alternative way to visualize the grid. ```yaml SHAPEDRECIPE: base: name: Shaped material: WATER_BUCKET crafting: shaped: '1': input: - Slot 1|Slot 2|Slot 3 - Slot 4|Slot 5|Slot 6 - Slot 7|Slot 8|slot 9 ``` -------------------------------- ### From Experience Source Source: https://docs.phoenixdevt.fr/mmocore/level/sources Loads all experience sources from exp-sources.yml that match the specified exp-source-id. ```plaintext from{source=exp-source-id} ``` -------------------------------- ### Basic Cooking Recipe Structure (Campfire Example) Source: https://docs.phoenixdevt.fr/mmoitems/features/custom-recipes Illustrates the fundamental configuration for cooking recipes, applicable to Campfire, Furnace, Blast Furnace, and Smoker. Input is set to an empty array for these types. ```yaml COOKINGRECIPE: base: name: COOKING RECIPES material: WATER_BUCKET crafting: campfire: #This would be for a campfire, replace with furnace/smoker/blast as needed input: [] ``` -------------------------------- ### Implement PlaceholderProcessor for MMOCore Source: https://docs.phoenixdevt.fr/mmoprofiles/api/placeholders This example shows how to implement the processPlaceholderRequest method for MMOCore, loading player data asynchronously and registering placeholders like class, level, and experience. ```java void processPlaceholderRequest(PlaceholderRequest placeholderRequest) { final PlayerData fictiveData = new PlayerData(new MMOPlayerData(placeholderRequest.getProfile().getUniqueId())); MMOCore.plugin.playerDataManager.loadData(fictiveData).thenRun(() -> { placeholderRequest.addPlaceholder("class", fictiveData.getProfess().getName()); placeholderRequest.addPlaceholder("level", fictiveData.getLevel()); placeholderRequest.addPlaceholder("exp", MythicLib.plugin.getMMOConfig().decimal.format(fictiveData.getExperience())); placeholderRequest.addPlaceholder("exp_next_level", MythicLib.plugin.getMMOConfig().decimal.format(fictiveData.getLevelUpExperience())); // Skipping some of the placeholders..... placeholderRequest.validate(); }); } ``` -------------------------------- ### General GUI Options Source: https://docs.phoenixdevt.fr/mythiclib/misc/ui-syntax Configure the general settings for a GUI, including its display name and the total number of slots available in the inventory. ```yaml name: 'Player Attributes' slots: 27 ``` -------------------------------- ### Get All Active Bounties Source: https://docs.phoenixdevt.fr/bounty-hunters/api/managing-bounties Retrieve a collection of all currently active bounties, sorted by their creation order. ```java bountyManager.getBounties(); ``` -------------------------------- ### Specifying Ingredient Amount in Recipes Source: https://docs.phoenixdevt.fr/mmoitems/stations/ingredients Demonstrates how to set a specific amount for an ingredient in a crafting recipe. This example uses vanilla sticks and sets the amount to 60. ```yaml recipes: steel-sword: #... ingredients: - vanilla{type=STICK,amount=60} ``` -------------------------------- ### Modifier Roll Chance Example Source: https://docs.phoenixdevt.fr/mmoitems/items/modifiers Demonstrates setting the roll chance for a specific modifier, like 'Sharp'. ```yaml LONG_SWORD: # ... modifiers: # ... sharp: # ... chance: 0.1 # 10% chance to apply ``` -------------------------------- ### Example Mining Configuration Source: https://docs.phoenixdevt.fr/mmocore/misc/block-types This configuration demonstrates how to set custom drops and temporary block replacements for vanilla ores. It cancels vanilla drops and replaces the broken block with a custom skull. ```yaml on-mine: emerald: material: vanilla{type=EMERALD_ORE} drop-table: items: - 'vanilla{type=EMERALD} 1 1-9' vanilla-drops: false regen: time: 2000 temp-block: skull{value="long_texture_value_here"} ``` -------------------------------- ### Character Width Exceptions Source: https://docs.phoenixdevt.fr/mmoitems/features/item-lore/tooltips Examples of specific characters with non-default pixel widths in the default Minecraft font. ```plaintext lowercase `f` is only 4px wide lowercase `i` is 1px wide, whereas uppercase `I` is 3px space character ``happens to be 3px ``` -------------------------------- ### Example Condition Table Source: https://docs.phoenixdevt.fr/mmocore/misc/conditions Defines two condition tables in `conditions.yml`. `test-condition` references conditions from `test-condition-2`. ```yaml test-condition: - 'level{amount=10}' #Will load the 2 conditions from test-condition-2. - 'from{source=test-condition-2}' test-condition-2: - 'world{name=world}' - 'level{profession=mining;amount=3}' ``` -------------------------------- ### Open Plugin GUIs Source: https://docs.phoenixdevt.fr/mmoitems/api/main Instantiate and open various MMOItems plugin GUIs for players, such as recipe lists, workbenches, and item editors. ```java new AdvancedTypeList(player, 1).open(); // opens the recipe list at type selection new AdvancedRecipeList(player, MMOItems.plugin.getTypes().get("SWORD")).open(); // opens the recipe list (after selecting item type) new AdvancedRecipeWorkbench(player).open(); // opens the advanced workbench new ItemEdition(player, MMOItems.plugin.getTypes().get("STAFF"), "EARTH_STAFF").open(); // opens the edition gui for a specific item ``` -------------------------------- ### Get Inventory Data Instances Source: https://docs.phoenixdevt.fr/mmoinventory/api/overview Obtain InventoryData objects for vanilla and custom inventories associated with a player. ```java PlayerData playerData = /* see above */ CustomInventory customInv = /* see above */ Inventory someInv = /* see above */ VanillaInventoryData vanillaInvData = playerData.getVanilla(); CustomInventoryData customInvData = playerData.getCustom(customInv); InventoryData invData = playerData.get(someInv); // either custom or vanilla ``` -------------------------------- ### Example Item Configuration with Tooltip Source: https://docs.phoenixdevt.fr/mmoitems/features/item-lore/tooltips This YAML snippet shows how to assign a specific tooltip to an item by referencing its name in the 'tooltip' field within the item's base configuration. ```yaml GOLD_SWORD: base: material: GOLDEN_SWORD name: Gold Shortsword attack-damage: 10.0 attack-speed: 1.6 tooltip: GOLD # This is where you give your item a tooltip element: fire: damage: 3.0 required-class: - Warrior ``` -------------------------------- ### Defining a Public Modifier Source: https://docs.phoenixdevt.fr/mmoitems/items/modifiers Example of a public modifier for 'arcane' which grants max mana. This can be referenced in item configurations. ```yml arcane: suffix: 'of the Arcane' stats: max-mana: base: 6 scale: 1 spread: .1 max-spread: .3 ``` -------------------------------- ### Damage Indicator Icon Joining Example Source: https://docs.phoenixdevt.fr/mythiclib/features/damage-indicators Illustrates how to configure the joining of multiple damage type icons within a single indicator using the `damage_type_icon_join` option. ```text If a single hologram contains multiple damage type icons, you can configure how the icons are joined together using the `damage_type_icon_join` config option. For instance, if you set it to a comma followed by a space `" "`, an indicator displaying both weapon and skill damage will show the weapon icon, then a space, then the skill icon. This would look like this: `🗡 ☄` (followed by the indicator damage value). ``` -------------------------------- ### Scaling Potion Duration with Modifiers Source: https://docs.phoenixdevt.fr/mythiclib/skills/custom/mythic.html This example demonstrates multiplying the `` by 20 to convert seconds into ticks for a potion effect. ```yml SomeSkill: Mechanics: - potion{type=SLOW;duration=" * 20";lvl=2} ``` -------------------------------- ### Enable MySQL in MMOInventory Source: https://docs.phoenixdevt.fr/mmoinventory/faq Configure MySQL connection details in the main plugin configuration file to enable database support. ```yaml mysql: enabled: false host: localhost port: 3306 database: minecraft user: mmolover pass: ILoveAria .... ``` -------------------------------- ### Projectile Hit Block Effect Source: https://docs.phoenixdevt.fr/mythiclib/scripts/tutorials/projectile Defines the effect when the projectile hits a block. This example shows a 'VILLAGER_ANGRY' particle effect. ```yml bullet_cancel: mechanics: showparticlestwo: type: particle particle: VILLAGER_ANGRY amount: 10 x: .5 y: .5 z: .5 ``` -------------------------------- ### Configure Casting Mode Particle Source: https://docs.phoenixdevt.fr/mmocore/features/classes Set the particle effect used when a player is in casting mode. This example uses SPELL_INSTANT. ```yaml cast-particle: particle: SPELL_INSTANT ``` -------------------------------- ### Custom Block Configuration Example Source: https://docs.phoenixdevt.fr/mmoitems/features/custom-blocks Defines the properties of a custom block, including its name, lore, required tool power, experience drops, generation template, and material. ```yaml '1': base: name: '&aMy First Custom Block' lore: - '&7Wow... It''s possible!' - '&7That''s awesome!' required-power: 2 min-xp: 10 max-xp: 20 gen-template: basic-template material: STONE block-id: 1.0 ``` -------------------------------- ### Retrieve Item Tiers Source: https://docs.phoenixdevt.fr/mmoitems/api/main Access the TierManager to check for tier existence, retrieve a specific tier, or get all loaded tiers. ```java TierManager tiers = MMOItems.plugin.getTiers(); boolean exists = tiers.has("RARE"); ItemTier rare = tiers.get("RARE"); Collection all = tiers.getAll(); ``` -------------------------------- ### MythicEnchants Support Implementation Source: https://docs.phoenixdevt.fr/mmoitems/compatibility/enchant-plugins An example implementation of the EnchantPlugin interface for the MythicEnchants plugin. It handles custom enchant checks, namespaced key generation, and lore formatting for enchantments. ```java public class MythicEnchantsSupport implements EnchantPlugin { @Override public boolean isCustomEnchant(Enchantment enchant) { return enchant instanceof MythicEnchant; } @Override public NamespacedKey getNamespacedKey(String key) { return new NamespacedKey(MythicEnchants.inst(), key); } public void handleEnchant(ItemStackBuilder builder, MythicEnchant enchant, int level) { Validate.isTrue(level > 0, "Level must be strictly positive"); // Type cannot be changed. Must make sure that item is an enchanted book if (!builder.getMeta().hasItemFlag(ItemFlag.HIDE_ENCHANTS)) builder.getLore().insert(0, LoreParser.formatEnchantment(enchant, level)); } } ``` -------------------------------- ### Get ItemStack Directly (Scaled) Source: https://docs.phoenixdevt.fr/mmoitems/api/main Retrieve an ItemStack directly from the plugin, scaled by player level and tier, or player data. ```java MMOItems.plugin.getItem(type, id, level, tier) // fixed level and tier MMOItems.plugin.getItem(type, id, playerdata) // scale on player data ``` -------------------------------- ### Custom Inventory Open Command Configuration Source: https://docs.phoenixdevt.fr/mmoinventory/features/custom-inventory Set up a command for players to open a custom inventory. Ensure 'enabled' is true to activate the command. Permissions and aliases can be customized. ```yaml # Command to be used in order to open the custom inventory. # This option is only for custom inventories. open_command: enabled: true name: 'custominv' permission: 'custom_inv.open.mmoinventory_default' aliases: [ mmoinv, rpginv, rpginventory ] output: player-command: '&cThis command is only for players.' specify-player: '&cPlease specify a player.' wrong-player: '&cCould not find the player called {arg}.' not-enough-perms: '&cYou don''t have enough permissions.' ``` -------------------------------- ### Get ItemStack Directly (Basic) Source: https://docs.phoenixdevt.fr/mmoitems/api/main Retrieve an ItemStack directly from the plugin. This item will not be scaled by player level or randomized tier. ```java MMOItems.plugin.getItem(MMOItems.plugin.getTypes().get("SWORD"), "CUTLASS") ``` -------------------------------- ### Build MMOItem from Template (Level and Tier) Source: https://docs.phoenixdevt.fr/mmoitems/api/main Create an MMOItem instance from a template, specifying the level and tier. ```java itemTemplate.newBuilder(level, tier).build() ``` -------------------------------- ### Get MMOItems Item Type Source: https://docs.phoenixdevt.fr/mmoitems/api/main Retrieve the item type from an NBTItem using nbtItem.getType(). It's recommended to cache this result. ```java String itemType = nbtItem.getType(); ``` -------------------------------- ### Example Loot Chest Configuration Source: https://docs.phoenixdevt.fr/mmocore/features/loot-chests This snippet shows a basic configuration for a loot chest, including its location, drop table, regeneration time, and particle effect. ```yaml 'world 59 71 131': # Create directly your drop table here. drop-table: items: - 'vanilla{type=DIAMOND} 1 1-3' - 'gold{} .9 1-3' - 'gold{} .9 1-3' - 'gold{} .9 1-3' - 'gold{} .9 1-3' - 'gold{} .9 1-3' - 'gold{} .9 1-3' - 'note{min=1;max=10} .9 1-3' # Ticks the chest takes to appear again. regen-time: 40 # The particle played every 4sec around the chest. # Types available: helix|offset|galaxy # Particle names here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html effect: type: helix particle: FLAME ``` -------------------------------- ### Configuring Vanilla Experience for Fishing Items Source: https://docs.phoenixdevt.fr/mmocore/profession/fishing To grant vanilla experience when a fish is caught, use 'vanilla-exp=min-max'. This functions identically to the 'experience' parameter. ```plaintext vanilla-exp=min-max ``` -------------------------------- ### Call MythicLib Script on Message Source: https://docs.phoenixdevt.fr/mythiclib/misc/player-messages Configures a MythicLib script to be executed when a message is sent to the player. The script 'mmocore_level_up_effect' is used as an example. ```yml level-up: format: #...... sound: #...... script: 'mmocore_level_up_effect' ```