Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Configuration

phil14052 edited this page Oct 20, 2020 · 15 revisions

Here you will get information about how you can configure the plugin and the tiers.

Config.yml

Default config:

# CustomCobbleGen! Version: 1.4.5 By phil14052
debug: false
tiers:
  default:
    '0':
      name: Default
      icon: COBBLESTONE
      price:
        money: 0
      contains:
        COBBLESTONE: 90
        COAL_ORE: 10
    '1':
      name: Basic
      icon: COAL_BLOCK
      price:
        money: 1000
      contains:
        COBBLESTONE: 70
        COAL_ORE: 20
        IRON_ORE: 10
    '2':
      name: Advanced
      icon: IRON_BLOCK
      price:
        money: 2000
        items:
          COBBLESTONE: 64
      contains:
        COBBLESTONE: 50
        COAL_ORE: 30
        IRON_ORE: 20
  vip:
    '0':
      name: Basic VIP
      icon: COBBLESTONE
      price:
        money: 0
        xp: 5
      contains:
        COBBLESTONE: 90
        COAL_ORE: 5
        IRON_ORE: 5
    '1':
      name: Advanced VIP
      icon: COAL_BLOCK
      price:
        money: 500
      contains:
        COBBLESTONE: 60
        COAL_ORE: 20
        IRON_ORE: 20
    '2':
      name: Pro VIP
      icon: IRON_BLOCK
      price:
        money: 1000
      contains:
        COBBLESTONE: 25
        COAL_ORE: 35
        IRON_ORE: 30
        DIAMOND_ORE: 10
options:
  playerSearchRadius: 4.0
  auto-save:
    enabled: false
    delay-in-sec: 300
  money:
    format: true
  gui:
    permissionNeeded: false
    showBarrierBlockIfLocked: true
    hideInfoIfLocked: false
    confirmpurchases: true
    admingui: true
    seperateClassesByLines: true
    centerTiers: true
    showSupportedModes: true
  signs:
    enabled: true
  islands:
    usePerIslandUnlockedGenerators: false
    sendMessagesToTeam: true
    onlyOwnerCan:
      buy: false
      select: false
    useIslandBalance: false
  automation:
    pistons: false
  supportWaterloggedBlocks: true
  saveOnTierPurchase: true
  removeGravity: false
  disabled:
    worlds:
    - world_the_end
  generationModes:
    '0':
      blocks:
      - WATER
      - LAVA
      displayName: Cobblestone generator
      fallback: COBBLESTONE
      particleEffect: SMOKE_LARGE
      generationSound: ENTITY_EXPERIENCE_ORB_PICKUP

How to edit?

Edit options:

The options are made to be easy to edit. With all options, besides the disabled option, you should only change between true and false.

Option name Description
Debug Enabling this option will display debug messages in the console. Enable this if errors occur.
Money -> format Enabling this will format money depending on the format given in lang.yml
GUI -> showBarrierBlockIfLocked Enabling this will display a barrier block in the GUI instead of the tier block if the tier is locked.
GUI -> hideInfoIfLocked Enabling this will hide the info about a tier in the GUI if the tier is locked.
GUI -> confirmpurchases Enabling this will add a GUI to confirm a purchase of a tier
GUI -> admingui Enabling this will show an admin GUI when doing /ccg admin
GUI -> centerTiers Enabling this will try to centre tiers in the GUI
GUI -> seperateClassesByLines Enabling this will separate classes with a new line
GUI -> showSupportedModes Enabling this will show add info in the lore to which generator modes the tiers support. Recommended if you have multiple generator modes. True by default
automation -> pistons See Automation with pistons
signs -> enabled Will enable signs - See Signs
Disabled -> worlds This is a list of worlds that should not be affected by the plugin
playerSearchRadius This is the radius the cobblestone generator will look for players if it finds it necessary or if the config says it should. Mostly used for when replacing water and lava with other blocks
supportWaterloggedBlocks Whether or not to check waterlogged blocks as WATER instead of for example a stair block
saveOnTierPurchase Whether or not save the players.yml on tier purchase. Recommended for small servers
generationModes See "Edit generation modes"
islands -> usePerIslandUnlockedGenerators See How to use the per island unlocked tier system
islands -> onlyOwnerCan -> buy Whether or not only the owner/leader of the island should be able to buy/upgrade tiers
islands -> onlyOwnerCan -> select Whether or not only the owner/leader of the island should be able to select tiers
islands -> sendMessagesToTeam Whether or not the whole island gets a message on tier buy/select/upgrade
islands -> useIslandBalance Whether or not to use the balance of the island. Only works with supported plugins.
auto-save -> enabled Whether or not to save the player data automatically every x seconds
auto-save -> delay-in-sec The number of seconds between save (default is 5 min (300 seconds))

Edit tiers:

Example tier:

  default: <-- Groups name **REQUIRED**
    '0': <-- Tier level **REQUIRED**
      name: Default <-- Tier name **REQUIRED**
      icon: COBBLESTONE <- Block used in the GUI **OPTIONAL**
      permission: customcobblegen.crateLoot <-- This will add a extra permission needed to use this tier. **OPTIONAL**
      supportedGenerationMode: '0' <-- If specified then it will only work on a certain generator mode. Specified with the generator id **OPTIONAL**
      price: <-- Requirements/prices to buy a tier
        money: 0 <-- Money price **OPTIONAL**
      contains: <-- Results **REQUIRED**
        COBBLESTONE: 90 <-- 90% chance of spawning cobblestone
        COAL_ORE: 10 <-- 10% chance of spawning coal ore

Tier descriptions are also available if you want to customize the result lore. See Tier descriptions (Wiki page) for more info

Required steps:

The tier system is split up in groups. By default, there is a default group and a vip group. The default group has all the tiers available to everyone. This group is required. The first tier in this group is also given automatically to new users. The vip is an optional group. This group can be removed without affecting the plugin. The name can also be changed and an unlimited amount of groups like this can be added. The tiers in this group are only available for players with the customcobblegen.generator.vip See Command-and-permissions#custom-permissions for more info.

Each tier in a group needs to have a tier level. The tier levels also need to be in numerical order. It can't go from 0 to 2. The name of the tier should be a text. If there includes a number or special characters, then there needs to be a ' around the name. Such as name: '&4VIP2'.

The contains tag contains a list of the results the tier can give. Each item on the list is build up like this: MATERIAL: CHANCE. See https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html for a list of valid material names. The chance can be a number between 0 and 100. The total of all the results chances needs to equal 100!

Optional steps:

The icon needs to be a valid material name. See https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html for a list of valid material names.

If you would like to only add support for a specific type of generator then you add the supportedGenerationMode: 'id' option. Where the id is the id of the generator

The price/requirement system works by adding a price section to the tier. A price can both be a "price" or a "requirement". But they go under the same system. The only difference is that a price removes stuff from the player afterwards. For example, a money price will remove X amount from your balance. Here you have the following options:

Name Type Info
money Price This will remove X amount of money from the players balance to buy a tier. This depends on Vault and an economy plugin.
xp Price This will remove X amount of XP levels from the player
items Price This will remove items from the player's inventory. This requires a list of items. (See default config.yml under "default.2" for example)
level Requirement only This will check the player's current island level. Requires BentoBox or uSkyBlock

Edit generation modes

  options:
    generatorModes:
      '0': <-- MODE ID / IDENTIFIER **REQUIRED** (FROM VERSION 1.4.2 IT NEEDS TO BE A POSITIVE NUMBER)
        displayName: 'Cobblestone generator' **OPTIONAL but recommended** <- This is the name of the generator that will be shown in GUIs
        fallback: COBBLESTONE **OPTIONAL** <-- This is the material that will be used if no tier is selected
        blocks: <-- What blocks are needed? These blocks positions do not matter
          - WATER <-- Needs water
          - LAVA <-- Needs lava
        searchForPlayersNearby: false <-- Whether or not the plugin needs to FORCE search for players nearby when using this generator. It is needed for custom generators. By default, it will automatically test what would be the best solution. But can be forced. **OPTIONAL** (I recommend not setting this setting)
      '1': <-- MODE ID / IDENTIFIER **REQUIRED** (FROM VERSION 1.4.2 IT NEEDS TO BE A POSITIVE NUMBER)
        displayName: 'Basalt generator' **OPTIONAL but recommended**
        fallback: SOUL_SAND **OPTIONAL** <-- This is the material that will be used if no tier is selected
        blocks: <-- What blocks are needed? These blocks positions do not matter
          - LAVA <-- Needs lava
          - BLUE_ICE<-- Needs blue ice
        fixedBlocks: <-- What blocks are needed and need to be at a specific position? You can use the faces UP, DOWN, WEST, EAST, SOUTH and NORTH.
          DOWN: SOUL_SOIL <-- THE BLOCK UNDERNEATH NEEDS TO BE SOUL_SOIL.
        disabledWorlds: <-- List of worlds this generator can't be used in. If for example you have the worlds: world, world_nether and world_the_end and you wanted to override a basalt generator then it can be a good idea not to override it in the world called world since it will probably not be used there and then you get your players to the nether
          - world
        searchForPlayersNearby: false <-- Whether or not the plugin needs to FORCE search for players nearby when using this generator. It is needed for custom generators. By default, it will automatically test what would be the best solution. But can be forced. **OPTIONAL** (I recommend not setting this setting)

If you want to add a new generator mode, then you just need to copy from the identifier and its children. Then give it a new unique identifer such as '1'. And start editing the settings. The first block and second block need to contain one liquid, meaning that both blocks can not be a block other than water and lava. See https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html for a list of valid material names.

You can also edit particles and sound on the generation of a block. With the options particleEffect (See https://github.com/ByteZ1337/ParticleLib/blob/master/src/main/java/xyz/xenondevs/particle/ParticleEffect.java and generationSound (See https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html). Example:

      particleEffect: SMOKE_LARGE
      generationSound: ENTITY_EXPERIENCE_ORB_PICKUP

Since version 1.4.5 can you also toggle whether or not a generation mode can generate while it is raining. This is meant to be a fun random feature that can be enabled by setting the option:

      canGenerateWhileRaining: false

Example of added generator mode:

options:
  generationModes:
    '0':
      fallback: COBBLESTONE
      blocks:
      - WATER
      - LAVA
    '1':
      fixedBlocks:
        WEST: REDSTONE_BLOCK
      blocks:
      - WATER
      - DIAMOND_BLOCK
    '2':
      disabledWorlds:
        - world
        - world_the_end
      fallback: SOUL_SAND
      fixedBlocks:
        DOWN: SOUL_SOIL
      blocks:
      - LAVA
      - BLUE_ICE

Lang.yml

Default lang.yml

# CustomCobbleGen! Version: 1.4.5 By Phil14052
prefix: '&8[&3CustomCobbleGen&8]'
invalid-args: '&cInvalid args!'
player-only: '&cSorry but that can only be run by a player!'
player-offline: '&cThat player is not online!'
undifined-class: '&cThat class is not defined!'
undifined-level: '&cThat level is not defined!'
no-tier-selected:
  self: '&cYou have not selected a tier yet'
  other: '&c%player_name% has not selected a tier yet'
show-tier:
  self: You have currently selected level %selected_tier_level% in %selected_tier_class%
    class
  other: '%player_name% has currently selected level %selected_tier_level% in %selected_tier_class%
    class'
tier-change-success: '&aSuccessfully changed %player_name% tier to %selected_tier_class%
  %selected_tier_level%'
no-permissions: '&cYou don''t have permission for that!'
reload-success: '&aReloaded the plugin in %time% seconds.'
force-save-success: '&aSuccessfully force saved the player data'
player:
  plugin-help:
  - '&8&l&m---------------------'
  - ' '
  - '&3CustomCobbleGen - &8Help'
  - '&3/%command%&8 - Show the GUI'
  - '&3/%command% help&8 - Shows the help menu'
  - '&3/%command% tier&8 - Shows the currently selected tier'
  - '&3/%command% upgrade&8 - Upgrade to the next tier'
  - '&3/%command% admin&8 - Shows list of admin commands'
  - '&8&l&m---------------------'
  has-no-island: '&cCreate a island to control generators'
gui:
  prefix: '&3&lCustomCobbleGen menu'
  main:
    buy: '&aClick to buy'
    buy-leader-only: '&cOnly leaders of the island can buy'
    can-not-afford: '&cCan''t afford'
    selected: '&aSelected'
    select: '&aClick to select'
    select-leader-only: '&cOnly leaders of the island can select'
  locked:
    missing-permission: '&cLocked - Missing permissions'
    prev-unowned: '&cLocked - Buy the previous level first'
  price:
    money:
      afford: '&a$%tier_price_money%'
      expensive: '&c$%tier_price_money%'
    xp:
      afford: '&a%tier_price_xp% exp levels'
      expensive: '&c%tier_price_xp% exp levels'
    level:
      achieved: '&aLevel %tier_price_level% island required'
      not-achieved: '&cLevel %tier_price_level% island required'
    items:
      top:
        afford: '&aItems needed:'
        expensive: '&cItems needed:'
      list:
        afford: '&a%s1 x %s2'
        expensive: '&c%s1 x %s2'
  item:
    name: '&6&l%tier_name%'
    lore:
      title: '&8&lThis tier will give the following results'
      result: '&8%result_name%: &o%result_percentage%'
      supportedMode: '&8Supports generator: &6&l&o%tier_supported_mode%'
  confirm:
    cancel:
      name: '&cCancel'
      lore: '&8Click to cancel the purchase'
    buy:
      name: '&aBuy'
      lore: '&8Click to confirm the purchase'
  upgrade:
    title: '&6&lChoose a tier to upgrade'
    lore:
      upgrade: '&aClick to upgrade'
  admin:
    title: '&4&lCCG: &cAdmin'
    reload:
      title: '&6&lReload config'
      lore:
      - '&8Reloads all files'
      - '&7- config.yml'
      - '&7- lang.yml'
      - '&7- data/players.yml'
      - '&7- data/signs.yml'
    forcesave:
      title: '&6&lForce save'
      lore:
      - '&8Forces the server to save player files'
      - '&7- data/players.yml'
      - '&r'
      - '&cUseful for big changes in player data'
    forcebuy:
      title: '&6&lForce buy'
      lore:
      - '&8Forces a player to buy a tier'
      - '&r '
      - '&cThe player will pay for the tier'
      - '&ceven if they can''t afford it!'
    givetier:
      title: '&6&lGive tier'
      lore:
      - '&8Gives a player a tier'
      - '&r '
      - '&cThe player will get the tier for free'
    settier:
      title: '&6&lSet tier'
      lore:
      - '&8Sets the current tier for a player'
      - '&r '
      - '&cThis will not purchase a tier'
    withdraw:
      title: '&6&lWithdraw tier from player'
      lore:
      - '&8Withdraws a purchased tier from a player'
      - '&r '
      - '&cAlso deselects tier if selected'
      select: '&aClick to withdraw tier'
    createtier:
      title: '&6&lCreate a new tier'
      lore:
      - '&8Create a new tier with a GUI'
    no-permission:
      title: '&4&lNo permission'
      lore: '&cYou do not have the %s1 permission'
  select:
    player-select-skull:
      title: '&e&l%player_name%'
      lore:
      - '&aClick to select %player_name%'
    title: '&4&lCCG: &cSelect a player'
    next-page:
      title: '&a&lNext page'
      lore:
      - '&8Click to go the next page'
      last-page:
        title: '&a&lNext page'
        lore:
        - '&8You are on the last page'
    previous-page:
      title: '&a&lPrevious page'
      lore:
      - '&8Click to go the previous page'
      first-page:
        title: '&a&lPrevious page'
        lore:
        - '&8You are on the first page'
    tier:
      already-selected: '&4&lTier currently selected'
      already-own: '&4&lTier already own'
      title: '&4&lCCG: &cSelect a tier'
  close:
    title: '&4&lClose'
    lore:
    - '&cClick to close the inventory'
  create:
    title: '&4&lCCG: &cCreating a tier'
    info:
      required: '&c**REQUIRED**'
      emptyList: '&aNone'
    class:
      title: '&6&lTier class'
      lore:
      - '&8Define the tier class'
      - '&r'
      - '&7Current: &a%s1'
    level:
      title: '&6&lTier level'
      lore:
      - '&8Define the tier level'
      - '&r'
      - '&7Current: &a%s1'
    icon:
      title: '&6&lTier icon'
      lore:
      - '&8Define the tier icon material'
      - '&r'
      - '&7Current: &a%s1'
    name:
      title: '&6&lTier name'
      lore:
      - '&8Define the tier displayname'
      - '&r'
      - '&7Current: &a%s1'
    results:
      title: '&6&lTier results'
      lore:
      - '&8Define the results of the tier'
      - '&r'
      - '&7Current:'
    requirements:
      title: '&6&lTier requirements'
      lore:
      - '&8Define the requirements for the tier'
      - '&r'
      - '&7Currently &a%s1&7 requrirements in use'
    description:
      title: '&6&lTier description'
      lore:
      - '&8Define the description of the tier'
      - '&cWill replace displayed results in the GUI'
      - '&r'
      - '&7Current:'
no-tiers-defined: '&cThere are no tiers defined in the config'
money-format: '###,###,###,###,###.##'
tier-changed: You have now selected the %tier_name% tier
tier-changed-team: '%player_name% changed the islands selected tier to %tier_name%'
tier-purchased: You have now purchased the %tier_name% tier
tier-purchased-team: '%player_name% purchased the tier %tier_name% for the island'
tier-upgraded-team: '%player_name% upgraded the selected tier'
player-already-owns-tier: The player already owns this tier
player-does-not-own-tier: The player does not own this tier
tier-unselected-success:
  self: '&aTier unselected for player'
  other: '&cYour currently selected tier has been unselected by an admin'
tier-unpurchased-success:
  self: '&aTier withdrawen from player'
  other: '&cA tier owned by you has been withdrawen by an admin'
tier-given: Tier has been given to the player
tier-gotten: You have unlocked a new tier
tier-not-purchased: '&cYou have not purchased this tier yet'
tier-not-locked: '&cThis tier is locked. Buy the previous tier first.'
tier-not-found: '&cTier not found'
tier-cant-afford: '&cYou can not afford this tier'
no-upgrades-available: '&aYou do not have any upgrades available'
upgrade-not-purchasable: '&cYou do not fulfill the requirements to upgrade:'
upgrade-not-purchasable-money: '&cYou need %tier_price_money%$ to buy the tier'
upgrade-not-purchasable-xp: '&cYou need %tier_price_xp% XP to buy the tier'
upgrade-not-purchasable-level: '&cYou need a island level of atleast %tier_price_level%
  to buy the tier'
upgrade-not-purchasable-items: '&cYou need %tier_price_items% to buy this tier'
force-purchased: You have now force bought %selected_tier_name% for %player_name%
admin-command-usage: '&cUsage: /%command% [reload, forcesave, settier, givetier, forcebuy,
  withdraw]'
chatinput:
  invalid:
    default: '&4%s1 &cis a invalid input'
    no-space: '&cSpaces are not allowed'
    no-number: '&4%s1&c is not a valid number!'
    unknown-material: '&4%s1&c is not a valid material!'
  info:
    class:
    - '&7Editing tier &aclass'
    - '&7Write the tier &aclass&7 in chat'
    - '&cSpaces are not allowed'
    icon:
    - '&7Editing tier &aicon'
    - '&7Write the tier &aicon material name&7 in chat'
    - '&cUse Bukkit material names!'
    level:
    - '&7Editing tier &alevel'
    - '&7Write the tier &alevel&7 in chat'
    - '&cPositive numbers or zero only!'
    name:
    - '&7Editing tier &aname'
    - '&7Write the tier &aname&7 in chat'
    - '&cSpaces and colors are allowed!'
    description:
    - '&7Editing tier &adescription'
    - '&7Write the tier &adescription&7 in chat'
    - '&7Write &a%s1&7 for new line '
    - '&cSpaces and colors are allowed!'
    - '&cWrite &4&l"%s2"&c to delete description'
    CANCEL: '&cWrite &4&l"%s1" &c to cancel'
    results:
      material:
      - '&7Editing result &amaterial'
      - '&7Write the result &amaterial name'
      - '&cUse Bukkit material names!'
signs:
  GUI:
    '0': '&3CustomCobbleGen'
    '1': ' '
    '2': '&lClick to open'
    '3': '&lthe GUI'
  select:
    '0': '&3CustomCobbleGen'
    '1': ' '
    '2': '&lClick to select'
    '3': '&a&l%tier_name%'
  buy:
    '0': '&3CustomCobbleGen'
    '1': ''
    '2': '&lClick to buy'
    '3': '&a&l%tier_name%'
  not-valid:
    '0': '&3CustomCobbleGen'
    '1': ''
    '2': '&cNot a valid sign'
    '3': ''
  no-permission:
    '0': '&3CustomCobbleGen'
    '1': '&cYou do not have'
    '2': '&cpermissions to'
    '3': '&ccreate this sign'
  success: Successfully created a clickable sign
  deleted: '&cSign deleted'
placeholders:
  response:
    owned: owned
    not-owned: not owned
placeholder:
  response:
    all: ALL

How to edit

Edit each line to your preferences. You can use the placeholder described here: https://github.com/phil14052/CustomCobbleGen/wiki/Placeholders-&-PlaceholderAPI-support

Some lines do not have a ' at each end of the text. This is since they don't use any special characters such as # or &. If you are going to use these and the text does not contain a ' on each end, then please add these to each end of the text. You can check you lang.yml for errors on this page: http://yaml-online-parser.appspot.com

data/players.yml

Example file

# CustomCobbleGen! Version: 1.4.5 By Phil14052
# IMPORTANT: ONLY EDIT THIS IF YOU KNOW WHAT YOU ARE DOING!!
players:
  7afcd112-df38-43c0-810f-5346fb58b671: // UUID of the player
    selected: // Their selected tier by class and level
      '0': 
        class: DEFAULT
        level: 2
    purchased: // Their purchased tiers
      DEFAULT:
      - 0
      - 1
      - 2
      VIP:
      - 0
      - 2
    pistons:
    - world:-18.0:65.0:66.0

How to edit

This file is not made to be edited, which means that it will likely try to reset itself to the state it had before editing. If you want to edit it then I recommend looking at the example above and using this website (http://yaml-online-parser.appspot.com) to check if the file is edited correctly. If you want to edit it but need help then contact me on Spigot or Github

data/signs.yml

Example file

# CustomCobbleGen! Version: 1.4.5 By Phil14052
# IMPORTANT: ONLY EDIT THIS IF YOU KNOW WHAT YOU ARE DOING!!
signs: 
- '[world,61.0,63.0,-1004.0,GUI]'

How to edit

This file is not made to be edited, which means that it will likely try to reset itself to the state it had before editing. If you want to edit it then I recommend looking at the example above and using this website (http://yaml-online-parser.appspot.com) to check if the file is edited correctly. If you want to edit it but need help then contact me on Spigot or Github

Clone this wiki locally