Customized Discoveries Tutorial
In this section I will explain you how to use my plugin ConditionalEvents with Codex. ConditionalEvents allows you to assign multiple conditions to a certain event and execute different actions. For example, if a player pickups an item or clicks on a button, something configurable will happen.
So, with my plugin ConditionalEvents you can create as many Codex discoveries you want. Let's suppose you want players to unlock a discovery when they consume an item, for example eat an apple. We create the category and the discovery first:
As you can see we have created just one discovery in the category of "Food" (the name of the file could be food.yml
). Since the discovery can be unlocked only by command, no need to add a discover_on
option. Now we proceed to create an event with ConditionalEvents:
This event will check if a player tries to eat an Apple called "Mystery Apple". If so, the Strength potion effect will be given to the player for 600 ticks (30 seconds) and the /codex unlock %player% food mystery_apple false
command will be executed from the console. This will unlock the discovery we have created for the player. If the player eats a Mystery Apple again, the same command will be executed but nothing will happen since the player has already unlocked the discovery.
The same you can do with multiple events you want. If you are interested on my plugin ConditionalEvents you can check the wiki: CLICK HERE
Last updated