Using This Plugin In Tandem With Others

Using This Plugin In Tandem With Others

Damage, healing, breaking and placing blocks are all well and good, but the purpose of Horizon Professions is a framework for progression that allows other plugins to take action. Want to alter drops depending on permissions? Restrict recipes? You can do that with the help of other plugins.

Horizon Professions gives all players permissions depending on their tier in each profession. A typical example looks like this:

horizonprofessions.engineer.unskilled
horizonprofessions.pilot.novice
horizonprofessions.hunter.expert
horizonprofessions.labourer.unskilled
horizonprofessions.medic.adept

Each profession that you specify in the configuration will appear here. The prefix "horizonprofessions" can be changed to any string in the configuration, for easier use by other plugins. The suffix will depend on the tier that the player has in each profession. The full format is [profession_prefix].[profession].[tier]

OtherDrops

OtherDrops is a robust plugin for altering mob and block drops, and offers a huge range of triggers, parameters and events. One of these parameters is permission, which is what we're going to use as a bridge between Horizon Professions and OtherDrops.

Step 1: Set the permission prefix

Let's say you only want expert labourers to be get diamond from diamond ore. That means you want to restrict it to the horizonprofessions.labourer.expert permission. However, OtherDrops only works in the format of otherdrops.custom.[permission]. You need to change the prefix of Horizon Professions' permission to match!

Set this in Horizon Professions config: permission_prefix: otherdrops.custom

Now, instead of horizonprofessions.labourer.expert, players will now receive the permission otherdrops.custom.labourer.expert

Step 2: Configure OtherDrops

Example 1:
otherdrops:
  DIAMOND_ORE:
    - drop: DIAMOND
      permission: labourer.expert
    - drop: NOTHING

In this example, if the player has the otherdrops.custom.labourer.expert permission, they will get a diamond when they break diamond_ore. If they don't have the permission, they will get the fallback drop, which is nothing.

Example 2:

Once you have the basic concept down, you can really start to play around with OtherDrop's more advanced options. Here's a more complicated example.

otherdrops:
    DIAMOND_ORE:
        - drop: NOTHING
          tool: [ANY, -WOOD_PICKAXE, -IRON_PICKAXE, -DIAMOND_PICKAXE]
          message: ["&eScratching away at that stone has made your fingers into raw bleeding stumps. What you wouldn't give for a jack-hammer!"]
          damage.attacker: 18
          flags: UNIQUE
        - drop: {DIAMOND/10%}
          permission: labourer.novice
        - drop: {DIAMOND/50%}
          permission: labourer.adept
        - drop: DIAMOND
          permission: labourer.expert
        - drop: NOTHING

Don't panic! Here's how this configuration works.

  1. If the player is using any thing that isn't a pickaxe, they take 18 damage and get a message telling them to use one. The ore drops nothing.
  2. If the player has the otherdrops.custom.labourer.novice permission, there's a 10% chance of the ore dropping a diamond.
  3. If the player has the otherdrops.custom.labourer.adept permission, there's a 50% chance of the ore dropping a diamond.
  4. If the player has the otherdrops.custom.labourer.expert permission, it drops a diamond.
  5. If none of the above apply, the ore drops nothing.

The best way to design your own configurations is to pop over to OtherDrops' own configuration guide HERE, which has full documentation on all its features and probably a better guide than I could write. The purpose of this guide is only to demonstrate how the two plugins can be configured to work together.

For more examples, Project Horizon's full OtherDrops configuration can be viewed HERE. It is not recommended that you blindly use this configuration, because Project Horizon uses a custom resource pack and many items are repurposed.

RecipeManager

Want to restrict recipes, or even provide extra crafting benefits to players with a certain profession and tier? Or even award experience for crafting certain recipes? RecipeManager can do that.

1. Recipe permissions

RecipeManager has the ability to restrict crafting recipes to certain professions, which we can use, since Horizon Professions gives players certain permissions! Let's say you wanted to require that a player is a novice engineer to craft a diode. You'll need to restrict the recipe to the horizonprofessions.engineer.novice permission (or any prefix that you may have changed the permission to).

Example 1:
CRAFT
@permission horizonprofessions.engineer.novice, horizonprofessions.engineer.adept, horizonprofessions.engineer.expert | <yellow>You're not sure how to make this. Perhaps a Novice Engineer could help you.
redstone + stained_clay:10 + redstone
= diode:0:1

In this example, the recipe will only be craftable if the player has the horizonprofessions.engineer.novice permission OR the horizonprofessions.engineer.adept permission OR the horizonprofessions.engineer.expert permission. It's very important that you list the tiers above the tier requirement, so that everyone novice and better can craft the recipe. If they don't have any of the permissions listed, they can't craft.

Example 2:
CRAFT
@permission horizonprofessions.engineer.novice, horizonprofessions.engineer.adept, horizonprofessions.engineer.expert | <yellow>You're not sure how to make this. Perhaps a Novice Engineer could help you.
@displayresult first
redstone + stained_clay:10 + redstone
= diode:0:1
  @permission horizonprofessions.engineer.novice
= diode:0:2
  @permission horizonprofessions.engineer.adept
= diode:0:3
  @permission horizonprofessions.engineer.expert

In this example, not only is the recipe restricted to novice engineers, but there are different possible results depending on the player's tier. Let's break it down:

  1. Players with the horizonprofessions.engineer.novice permission get one diode.
  2. Players with the horizonprofessions.engineer.adept permission get two diodes.
  3. Players with the horizonprofessions.engineer.expert permission get three diodes.

Additionally, the @displayresult first flag is used to ensure that when a player places the items on the crafting bench and previews the result, the first possible result is displayed. If this isn't done and there are multiple results, it will show up as "unknown". We don't want that. We want a player to know they're crafting a diode.

2. Awarding experience

It's possible to award experience when a player crafts any custom item defined in RecipeManager! All you need to do is name that custom recipe something meaningful, and then specify that name in Horizon Profession's configuration.

Example RecipeManager configuration:
CRAFT Diode
redstone + stained_clay:10 + redstone
= diode:0:1

In this example, the recipe is called Diode (see: "CRAFT Diode"). All you need to do is take that name and put it into Horizon Profession's configuration.

Example HorizonProfessions configuration:
recipes:
  engineer:
    diode: 5

This specifies that crafting the "Diode" recipe will award 5 experience to engineers. Both plugins must be configured for this to work. Again, you should view RecipeManager's guide on how to design recipes in that plugin - this guide provides only a rudimentary guide on how the two plugins can work together.

For more examples, Project Horizon's full RecipeManager configuration can be viewed in three separate files. It's a lot of recipes, and it is not recommended that you blindly use this configuration, because Project Horizon uses a custom resource pack and many items are repurposed.

If you find ways to use more plugins with Horizon Professions, don't hesitate to shoot your configuration files my way. All examples are appreciated.