main/Configuration

Configuration



Example configs are at the bottom of the page,
however I highly recommend reading everything here


Drug Dealer's innovative and intuitive system of customizable drugs is quite simple to use. You simply define a name, an ID, and any number of effects to a drug, start up your server, and you're good to go. If the server is already running, use the "/drugdealer reload" command to load the drugs into the game.

The name you give a drug determine's that drug's permission node. For example, naming a drug "Pony" will give that drug a permission node of "drugdealer.Pony". Because of this, drug names may only be up to 16 characters long and may only contain numbers, letters, and underscores.

The ID you assign to a drug determines what a player must "consume" to attain the effects of the drug(s) the ID is attached to. "Consuming" a drug just means right-clicking with a drug item in hand, sneaking or not, depending on what has been defined for a particular drug. Drug ID assignments should take the form of a string, meaning putting apostrophes or quotes on each end of the ID, such as "17:1" or '17:1' for spruce logs.

The effects a drug may have must be defined in a string list format, with effect ID, effect amplification, and effect duration, in ticks, values separated by colons, and surrounded by apostrophes or quotes. Effect IDs and descriptions may be found here on the Wiki, and here again on the Wiki in a smaller, simpler list. Effect amplification usually just means different levels of effects that may be found around the game, i.e. the Strength III and Strength IV. Effect duration is the time that a drug effect will last, and this value is in "ticks". One tick is one twentieth of a second, so just multiply any time you want, in seconds, by 20, and you'll get the tick value you need to enter. Example: '3:2:500' would translate into the "haste" effect, at level 2, for 25 seconds (500/20 = 25).

Note: the "Health Boost" and "Absorption" effects, effects #21 and 22, are not yet supported by Bukkit, and so Drug Dealer will be unable to recognize them.

You may optionally choose to send a message to a player when he/she consumes the drug, and you may also specify if you want to require a player to sneak to consume a drug, as well as specify if a sound should play or not when a drug is consumed. The message supports Minecraft color codes, and also supports line breaks through "\n". By default, no message will be sent, a sneak will be required, and a sound will play, unless you define so differently yourself.

In the example below, we have the default config. It includes two pre-made drugs: one called "Drugs", and one called "Steroids".

The "Drugs" drug has the permission "drugdealer.Drugs", has the brown mushroom ID -- 39 -- assigned, sends a red-colored message when it is eaten, requires players to be sneaking to consume the drug, plays a sound when the drug is consumed, and grants the Nausea 1 effect for 24 seconds and the Slowness 1 effect for 20 seconds.

The "Steroids" drug has the permission "drugdealer.Steroids", has the glistening melon ID -- 382 -- assigned, sends a green-colored message when it is eaten, requires players to be sneaking to consume the drug, plays a sound when the drug is consumed, and grants the Speed 2 effect for 20 seconds and the Jump Boost 1 effect for 20 seconds.

Custom-Drugs:
   Drugs:
      ID: '39'
      Message: '&cYou feel strange as the world around you slowly slips away...'
      Require-Sneak: true
      Play-Sound: true
      Effects:
      - '9:1:440'
      - '2:1:400'
   Steroids:
      ID: '382'
      Message: '&aYou feel guilty as you feel faster and more agile.'
      Require-Sneak: true
      Play-Sound: true
      Effects:
      - '1:2:400'
      - '8:1:400'

To add any custom drug, simply create a new section in the config file with the exact same formatting as is shown above. If you want to add a drug called "Pony", and one called "Kitten", with various effects of your choosing, your config would look like this:

Custom-Drugs:
   Pony:
      ID: '57'
      Message: 'You have eaten a drug called Pony!'
      Effects:
      - '8:2:500'
   Kitten:
      ID: '1'
      Message: 'You have eaten a drug called Kitten!'
      Effects:
      - '1:3:500'