Discoveries/Categories Tutorial
In this page you will find all properties of discoveries/categories configuration files. Everytime you modify something in these files you must reload the plugin using /codex reload
.
Inventory Items
The format of each item is the following:
inventory_items:
<type>:
<item>
Remember that the item
to be displayed has the properties listed HERE.
You can use PlaceholderAPI variables on the name and lore of all these items.
1. Category
Each category will be represented by its own item in the main inventory. You can tell the players on this item the amount of discoveries the category has and information of the category.
category:
id: MAP
name: "&7Category: #6bcbfe&lWorld Regions"
lore:
- "#eeeeeeDifferent regions you've explored will"
- "#eeeeeebe displayed here."
- ""
- "&7Unlocked: %unlocked% &8[%progress_bar%&8] &8(&7%percentage%&8)"
Variables:
%unlocked%
(Will be replaced with the following messages.yml messages depending of the status of discoveries found: currentUnlockedDiscoveriesColorNone, currentUnlockedDiscoveriesColorAll, currentUnlockedDiscoveriesColorIncomplete)%progress_bar%
(A progress bar showing the progress of the discoveries unlocked from this category)%percentage%
(Percertage of the discoveries unlocked from this category)
2. Discovery Unlocked
The item displayed on the category inventory when the discovery has been unlocked.
discovery_unlocked:
id: PAPER
name: "%name%"
lore:
- "%description%"
- ""
- "&8Discovered on %date%"
Variables:
%name%
(Name of the discovery)%description%
(Description of the discovery)%date%
(Date the discovery was unlocked)
3. Discovery Blocked
The item displayed on the category inventory when the discovery has not been found.
discovery_blocked:
id: GRAY_DYE
name: "&c??"
lore:
- "&7You haven't unlocked this discovery yet."
Rewards
Rewards are given through actions. All Actions can be found HERE.
Per Discovery
Default actions to be executed when the player finds a discovery from this category.
rewards:
per_discovery:
- "centered_message: #6bcbfe&m00 00"
- "centered_message: "
- "centered_message: #eeeeee&lCODEX UPDATED"
- "centered_message: &7World Regions: %name%"
- "centered_message: "
- "centered_message: &7Check it now by using #eeeeee/codex"
- "centered_message: "
- "centered_message: &7Rewards: &a+50XP"
- "centered_message: "
- "centered_message: #6bcbfe&m00 00"
- "title: 20;60;20;#eeeeee&lCODEX UPDATED;&7Region: %name%"
- "playsound: BLOCK_GILDED_BLACKSTONE_STEP;10;0.1"
- "console_command: xp give %player% 50"
Variables:
%name%
(Name of the discovery)%player%
(Name of the player)
All Discoveries
Default actions to be executed when the player finds all discoveries from this category.
rewards:
all_discoveries:
- "centered_message: #6bcbfe&m00 00"
- "centered_message: "
- "centered_message: #eeeeee&lCODEX CATEGORY COMPLETED"
- "centered_message: &7World Regions"
- "centered_message: "
- "centered_message: &7Congratulations!"
- "centered_message: "
- "centered_message: &7Rewards: &a+5000XP"
- "centered_message: "
- "centered_message: #6bcbfe&m00 00"
- "title: 20;60;20;#eeeeee&lCODEX CATEGORY COMPLETED;&7World Regions"
- "playsound: BLOCK_GILDED_BLACKSTONE_STEP;10;0.1"
- "console_command: xp give %player% 5000"
Variables:
%player%
(Name of the player)
Discoveries
Discoveries must be added below the discoveries
section using the following format.
discoveries:
<discovery_id>:
name: <name>
description:
- <description lines>
Name
Name of the discovery. Used to be displayed on inventories and messages.
name: "#6bcbfe&lShadow Swamp"
Description
Description of the discovery. Used to be displayed on inventories and messages.
description:
- "#eeeeeeAn abomination found on the Shadow Swamp. It's"
- "#eeeeeevery difficult to beat."
- ""
- "&7Drops:"
- "&8❱ #eeeeeeShadow Elixir &8(25%)"
- "&8❱ #eeeeeeIron Ingot &8(90%)"
Discovered On
Determines how can this discovery be unlocked.
WorldGuard Region
The discovery is unlocked when entering a WorldGuard (https://dev.bukkit.org/projects/worldguard) region.
discovered_on:
type: WORLDGUARD_REGION
value:
region_name: shadow_swamp
Mob Kill
The discovery is unlocked when killing a vanilla entity.
discovered_on:
type: MOB_KILL
value:
mob_type: ZOMBIE
mob_name: Shadow Warrior
Mythic Mob Kill
The discovery is unlocked when killing a MythicMobs (https://www.spigotmc.org/resources/5702/) mob.
discovered_on:
type: MYTHIC_MOB_KILL
value:
mob_type: forest_corrupter
Elite Mob Kill
The discovery is unlocked when killing a EliteMobs (https://www.spigotmc.org/resources/elitemobs.40090/) mob.
discovered_on:
type: ELITE_MOB_KILL
value:
mob_type: ember
Click Actions
Actions to be executed when the player clicks on the inventory item associated with this discovery, when the discovery has been found. All actions HERE. Optional.
click_actions:
- "console_command: warp shadow_swamp %player%"
Click Actions Cooldown
Adds a cooldown (in seconds) to execute the defined actions when clicking on the discovery item.
click_actions_cooldown: 60
Custom Inventory Items
You can replace the Category Inventory Items with custom ones used only for this discovery.
Discovery Unlocked
The item displayed on the category inventory when THIS discovery has been unlocked. All variables from HERE applies.
inventory_items:
discovery_unlocked:
id: PAPER
name: "%name%"
lore:
- "%description%"
- ""
- "&8Discovered on %date%"
- ""
- "&a&lCLICK &ato teleport."
Discovery Blocked
The item displayed on the category inventory when THIS discovery has not been found. All variables from HERE applies.
inventory_items:
discovery_blocked:
id: GRAY_DYE
name: "&c??"
lore:
- "&7You haven't unlocked this discovery yet."
- ""
- "&7Hint: A very important city."
Custom Rewards
You can replace the Per Discovery Rewards with custom ones only for this discovery.
rewards:
- "centered_message: #6bcbfe&m00 00"
- "centered_message: "
- "centered_message: #eeeeee&lCODEX UPDATED"
- "centered_message: &7World Regions: %name%"
- "centered_message: "
- "centered_message: &7Check it now by using #eeeeee/codex"
- "centered_message: "
- "centered_message: &7Rewards: &a+300XP&7, &a$5.000"
- "centered_message: "
- "centered_message: #6bcbfe&m00 00"
- "title: 20;60;20;#eeeeee&lCODEX UPDATED;&7Region: %name%"
- "playsound: BLOCK_GILDED_BLACKSTONE_STEP;10;0.1"
- "console_command: xp give %player% 300"
- "console_command: eco give %player% 5000"
Last updated
Was this helpful?