Installation (before v2.8b.334)
Download OtherDrops to somewhere handy & extract the zip file (includes plugin and support folders) to your server's plugins directory.
Installation (v2.8b.334 and after)
Please note that newer versions of OtherDrops are now just the jar file. Simply download and place into your server's plugins directory. Config folders and files will be created on the first run of the plugin.
- Install OtherDrops
- Run server to generate config files
- Open otherdrops-drops.yml
- Write new drops at the bottom of the file
Whilst OtherDrops comes with a number of example configs - nothing is enabled by default. For this tutorial we'll set up a couple of easy configs with a goal to adding some more advanced conditions towards the end.
In the "OtherDrops" folder you will see two files:
- otherdrops-config.yml: contains global settings which you can ignore for now.
- otherdrops-drops.yml: where we put the custom drops.
Setting up your first drop
Open up the otherdrops-drops.yml files (we'll call this the "drops file").
You'll notice a few sections:
- include-files: you can enable any of the example modules here by deleting # at the start of the line. Check the config files in the includes folder if you want to see exactly what they do.
- aliases: advanced option that allows you to refer to the same chunk of config later in multiple places - we'll ignore this for now.
- defaults: let's you set default conditions for all drops within the file. Another advanced section - we'll cover this later.
- otherdrops: this is the section we want! :) Below here is where we put the custom drops.
Let start with something simple - say you want to have glass drop glass when broken. You can add this example to the very bottom of the drops file:
glass: - drop: glass
Drops can be defined as any official Bukkit material or entity name (see lists here) but also support id values.
The spacing matters so make sure that the first line "glass:" has a space in front of it & the "- drop" lines up with or is further right than the line above it. Do not use tabs (the configuration library Bukkit uses doesn't like them). Capitalization generally doesn't matter but parameters (eg. drop) must be lower case. Also take note the dash (-) as the first parameter of a drop must always have this in front of it.
Quantity & chance
# adding a fixed quantity glass: - drop: glass/2 # adding a quantity as a range glass: - drop: glass/1-3 # adding a chance value glass: - drop: glass/1-3/50%
Note that the default quantity (if not specified) is 1 and default chance value is 100%.
glass: - drop: [glass, diamond/1/1%]
This is all good and well, but what if you want to allow glass to drop only when broken with a specific type of tool - say a pickaxe? Try this:
glass: - drop: glass tool: any_pickaxe
This is our first condition (tool) - there are a number of other conditions (time, weather, biome, world, etc) that we'll cover later. For now, lets continue exploring the tool parameter by adding multiple tools and a negative match. Lets try it out:
GLASS: - drop: glass tool: [any_pickaxe, any_sword, -wood_pickaxe, -wood_sword]
Ok, lets take a look at what we have now. We have our original original parameter saying that any pickaxe can trigger this drop, and, we have added it so any sword can also trigger the drop. This is great, but I personally don't think wooden tools should be able to give you glass back so we have added them as negative matches(notice the minus(-) in front of them). In this scenario this tells OtherDrops that any pick/sword BUT the two we have listed as negatives can trigger this drop, using the negative match tools will just end up breaking the glass here.
Perfect, we have our tools set up just the way we like, now, lets make it so the drop can only occur for players with a special permission and make it so the drop only happens 50% of the time.
GLASS: - drop: glass tool: [any_pickaxe, any_sword, -wood_pickaxe, -wood_sword] chance: 50 permission: vip # Players will need to have the permission otherdrops.custom.vip in their group or user to get this drop
If you need more assistance please feel free to ask questions on the Project page or jump into the IRC channel as there's often somewhere there who can help.