Skip to content

Configuration

SpeedSlicer edited this page Apr 20, 2025 · 3 revisions

Configuration

This page has extensive information on how to configure the different aspects of the plugin. All default files in the plugin come with thorough comments to help get you started configuring. This page will break down the sections of the config for more in-depth of what they do and help. Some text may have annotations you can click on for more info, others may have comments that you can also read. To just view default files view here.

Main Config

The first file to look over is the main file config.yml. This just contains basic options that apply throughout the plugin.

settings:
    # The language file to use for the plugin
    # More language files (if available) can be found in the plugins locale folder.
    locale: en_US

fishing:
    # The chance of finding a custom reward while fishing
    # can be a decimal number.
    reward-chance: 100.0 # 
    # Amount of experience to give the player when they HAVEN'T found a custom reward.
    # "x to y" indicates a range between two numbers.
    # -1 indicates to not reward exp.
    exp-reward: 1 to 6 # 
    # The minimum amount of ticks to wait for a bite. This is before processing lure and other things
    # REQUIRES 1.16+
    min-wait-time: 100 # (3)
    # The maximum amount of ticks to wait for a bite. This is before processing lure and other things
    # REQUIRES 1.16+
    max-wait-time: 600 # (4)

Reward Configuration

Each custom reward is defined in it's own unique file in the /rewards directory. This section will go over each section in the reward config.

Placeholders

The placeholders, formatted as {placeholder}, can be used anywhere in the config and will be replaced with the appropriate value. {player}: The player's name

Name

This is simply the name of this reward. It is used as an identifier to tell rewards apart, isn't used in the actual physical or virtual reward.

name: "Demo Reward"

Commands

A list of commands that will be executed by the CONSOLE when the player finds this reward. For example, you can use the placeholder {player} to use the player's name. If this list is empty or set to null it won't execute any commands. This means you can remove this option from the config and no commands will be loaded.

commands:
  - "msg {player} demo"

Items

A list of custom items are defined each by the options under a key. For example, here the options are set under "sword:", you can add as many you like under the "items:" key.

items:
  sword:
    chance: 100 # 
    item-name: "&a&lMy Custom Sword" # 
    lore: # 
      - "&7Made from CustomFishing!"
    amount: 1 # 
    material: DIAMOND_SWORD # 
    model-data: 0 # 
    enchants: # 
      - "SHARPNESS:5"
    glowing: false # 
    unbreakable: false # 
    hide-flags: false # 
    damage: 0 # 

Broadcasts

A set of broadcasts to send to every online member. If this list is empty or set to null it won't send any messages. This means you can remove this option from the config and no broadcasts will be loaded.

broadcasts:
  - '&4&l(!) &c{player} &7found a &c&lLEGENDARY &7reward!'

Titles

Titles to send to the player when they find this reward. title must be set in order for the sub-title to also work. If either is an empty string or null its message will be treated as unset.

title: "&a&lYou found a reward"
sub-title: "&7&oFound: Sword"

Weight

This is the weight (chance) that this item has to be found out of all rewards that meet the player's requirements. How this works is it adds all the chances from rewards that can be found. For instance, if there are 3 rewards with a weight of 10, 2 with a weight of 3, and 1 with a weight of 0.5, the total is 36.5. So for the reward with weight 3, it has a 3/36.5 chance of being picked.

weight: 4.5

Vanilla Rewards

This is if the default vanilla fishing loot table will also reward something when this reward is found. For example, if this is set to 'true', if you find a reward it will also give you a fish item or enchantment book etc. If it is set to 'false', then only a custom reward will be given and no default fishing rewards from vanilla.

vanilla-rewards: false

Experience Amount

This is the number of experience points to award the player when they find this reward. The default vanilla is from 1 to 6. The format for this is as a range, from one number to another. This is formatted as {number} to {number}. It can also be a singular number in which case that amount of experience will be rewarded every time. If this is set to null then no experience will be rewarded.

exp-amount: "1 to 6"

Sound

This is the sound that is played for the player when they find this reward. These can be found here. If this is set to null then no sound will be played.

sound: ENTITY_FIREWORK_ROCKET_TWINKLE

Requirements

Fishing rewards can have certain requirements to set where they can be found. You can use PlaceholderAPI placholders for the player catching the reward here. They are defined with the following format below and then each type will be expained.

requirement:
    type: <REQUIREMENT TYPE> # 
    value: <FIRST INPUT> # 
    input: <SECOND INPUT> # 

For a reward you can have multiple requirements by denoting each with an identifier like so.

requirements:
    requirement1:
        type: <REQUIREMENT TYPE>
        value: <FIRST INPUT>
        input: <SECOND INPUT>
    requirement2:
        type: <REQUIREMENT TYPE>
        value: <FIRST INPUT>
        input: <SECOND INPUT>

You can also have an inverted requirement type which means it checks if the condition is NOT TRUE, if so the requirement passes. This can be done by adding 'not ' infront of the requirement type like so. Make sure there is a space between not and the requirement type.

requirement:
    type: not <REQUIREMENT TYPE>
    value: <FIRST INPUT>
    input: <SECOND INPUT>

Permission

This checks if the player has the given permission.

requirement:
    type: permission
    value: <permission to check>

Region

This checks if the player is in a given WorldGuard region. (Requires WorldGaurd to be installed)

requirement:
    type: region
    value: <region to check>

Experience

This checks if the player has at least a certain amount of experience points.

requirement:
    type: exp
    value: <experience points>

Near

This checks if the player is within range of certain coordinates. The format for location is worldname,x,y,z

requirement:
    type: near
    value: <location>
    input: <distance>

World

This checks if the player is in a certain world.

requirement:
    type: world
    value: <world_name>

String Equals

This checks if a certain string is exactly equal to another. Pass in values through PlaceholderAPI.

requirement:
    type: string equals
    value: <input string>
    input: <string to compare to>

String Equals Ignorecase

requirement:
    type: string equals ignorecase
    value: <input string>
    input: <string to compare to>

String Contains

This checks if a certain string contains another string. Pass in values through PlaceholderAPI.

requirement:
    type: string contains
    value: <input string>
    input: <string to see if contains>

Regex

This checks if a regular expression matches the given text.

requirement:
    type: regex
    value: <the string to match with>
    input: <the regex expression>

Comparison Operators

This checks how certain numbers compare to each other. Avaiable operations are ==, >=, <=, !=, >, <. Pass in values through PlaceholderAPI.

requirement:
    type: ==, >=, <=, !=, >, <
    value: <first number to check>
    input: <second number to check>