Skip to content

Configuration files

TheGaming999 edited this page Jan 18, 2022 · 19 revisions

There are 9 different configuration files in PrisonRanksX each has a specific job and 3 of them you shouldn't touch.

config.yml

Controls essential stuff for the plugin, while everything is already documented in the config, here is a quick explanation:

worlds:
- disabled_world
- another_world

Prevent worlds from messing with PrisonRanksX chat-formatting, commands, ranks, prestiges, and rebirths.

Options:
  rank-enabled: true
  prestige-enabled: true
  rebirth-enabled: true

If you don't want one of these to be used in your server, just set them to false.

  force-display-order: '{rebirth}{prestige}{rank}'

The order of force display setting format.

  force-rank-display: true
  force-prestige-display: true
  force-rebirth-display: true

Show the rank or prestige or rebirth display name/prefix before the player name according to force-display-order without using a placeholder. <!> Doesn't work for DeluxeChat (must use PlaceholderAPI placeholders instead).

  no-prestige-display: ""
  no-rebirth-display: ""

How do you want the prestige and rebirth to be displayed when you don't have any one of them in chat? (this is for both chat placeholders & force display). For PlaceholderAPI, go to the PlaceholderAPI section.

  allworlds-broadcast: false

If true bypasses disabled worlds and broadcast the msg: [] section in ranks & prestiges & rebirths to every world on the server.

  send-rankupmsg: true
  send-prestigemsg: true
  send-rebirthmsg: true

If you want the message in messages.yml to be sent to the player who got promoted by ranking up, prestiging, etc..., then set it to true.

  GUI-RANKLIST: false
  GUI-PRESTIGELIST: false
  GUI-REBIRTHLIST: false

If you want to list the ranks or prestiges or rebirths in a GUI instead of the chat. Then, set it to true. This can be configured in Ranklist-gui, Prestigelist-gui, or Rebirthlist-gui sections in config.yml.

  prestigesound-name: "LEVEL_UP"
  prestigesound-volume: 1.0
  prestigesound-pitch: 1.0
  rankupsound-name: "LEVELUP"
  rankupsound-volume: 1.0
  rankupsound-pitch: 1.0
  rebirthsound-name: "GHAST_SCREAM"
  rebirthsound-volume: 1.0
  rebirthsound-pitch: 1.0

Sounds that will be played upon a rankup, prestige, etc..., can be disabled if you set to empty like this for example: prestigesound-name: "".

 per-rank-permission: false

If you want for every rank to have a specific permission to rankup to. The permission is: prisonranksx.rankup.<rankup>

  rankupmax-broadcastlastrankonly: true
  rankupmax-msglastrankonly: true
  rankupmax-rankupmsglastrankonly: true

If you don't want your server chat to be spammed with rankup messages and broadcast messages each time a player ranks up within rankupmax. Then, set it to true.

  rankup-vault-groups: false
  rankup-vault-groups-plugin: Vault

If you want a permission plugin to change the player group upon rankup to the rank he ranked up to, set it to true. rankup-vault-groups-plugin accepts: Vault,GroupManager,PermissionsEX,LuckPerms Vault is for every permission plugin that's not directly supported.

  autorankup-delay: 1
  autoprestige-delay: 20

The time between rankups and prestiges when you enable the autorankup and autoprestige using the commands /autorankup, /autoprestige.

  actionbar-progress: true
  actionbar-progress-only-pickaxe: true
  actionbar-progress-format: "%prisonranksx_rankup_progress% &e%prisonranksx_rankup_percentage%"
  actionbar-progress-updater: 40

actionbar-progress: true = should we show a progress bar above player hotbar?
actionbar-progress-only-pickaxe = should we show the actionbar only while holding a diamond pickaxe?
actionbar-progress-format: "%prisonranksx_rankup_progress% &e%prisonranksx_rankup_percentage%" = to be displayed above in the actionbar.
actionbar-progress-updater: 40 = Time taken to update players actionbar.

  expbar-progress: false
  expbar-progress-updater: 10
  expbar-progress-format: "%prisonranksx_rankup_percentage%"

Not recommended to enable. Can get very buggy. Use at your own risk!

  autosave: true
  autosave-time: 18000
  save-notification: true

It's highly recommended to set this to true, so the data gets saved every (autosave-time) ticks. save-notification is to show you that the data has been successfully saved.

  forcesave: false
  save-on-leave: true

save-on-leave is good for servers that often crash. On the other hand, forcesave might be laggy for servers with HDD drivers.

  rankupmax-warp-filter: false

If you have a warp command followed by [player] prefix, it will be filtered. It will only execute the warp command of the latest rankup instead of uselessly executing them all.

  allow-easter-eggs: true

Allows the plugin to wish you a merry christmas, a happy halloween, and a happy valentine when their time is near, and spawns custom particles when you prestige, related to that holiday theme. In addition, the command /prx will have a color style related to that holiday.

  enable-leaderboard: true

This enables filtering player status into the commands /topprestiges, and /toprebirths, so you can have leaderboards in your server showing players with the highest prestige and rebirth.

  prestigemax-type: "AMTQ"

Do not edit this unless the developer tells you to do so.

  infinite-prestige: false

Allows the use of infinite_prestige.yml config file, and ignores prestiges.yml.
Infinite Prestige uses much much lower ram, but higher cpu. Which garantee you that you can have over 1 billion prestiges if you wanted.
Normal Prestige uses average amount of ram, much lower cpu. If you aren't going to have a lot of prestiges. Then, use this instead by disabling infinte-prestige.

Ranklist-gui:
  title: "&6Ranks"

the title of ranks gui list.

  constant-items:
  - "slot=0 item=DIAMOND amount=1 name=&6Spaces_Of_Course lore=&eRanks_Space@&7List enchantments=durability:1 flags=HIDE_ENCHANTS"
  - "slot=1 item=DIAMOND amount=1 name=&6Illegal_Enchantments lore=&eRanks@&7List@&6GUI enchantments=durability:1@sharpness:7 flags=HIDE_ENCHANTS"
  - "slot=2 item=DIAMOND amount=1 name=&6_&6 lore=&eRanks@&7List@&6GUI enchantments=durability:1"
  - "slot=3 item=DIRT amount=1 name=&3&lCustomName enchantments=durability:1 flags=HIDE_ENCHANTS"
  - "slot=4 item=STONE amount=1"
  - "slot=5 item=GLASS amount=1 name=&9Glass"
  - "slot=6 item=DIAMOND amount=1 name=&4Same_Enchantment lore=&f&lDifferent_name enchantments=unbreaking:1 flags=HIDE_ENCHANTS"
  - "slot=7 item=DIAMOND amount=1 name=&6_&6 lore=&eRanks@&7List@&6GUI enchantments=durability:1 flags=HIDE_ENCHANTS"
  - "slot=8 item=DIAMOND amount=1 name=&6_&6 lore=&eRanks@&7List@&6GUI enchantments=durability:1 flags=HIDE_ENCHANTS"

items that are not ranks so you can decorate your gui.

  allowed-slots: "9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55"

where do you want to put the rank items in the gui?

  current-format:
    itemNAME: "stained_clay;14"
    itemAMOUNT: 1
    itemDISPLAYNAME: "&a%currentrank_display%"
    itemLORE: # placeholder api supported
    - "&6Your current rank!"
    itemENCHANTMENTS:
    - DURABILITY 10
    itemFLAGS:
    - HIDE_ENCHANTS
    itemCOMMANDS: # placeholder api supported. possible prefixes { (cancel-item_move),(closeinv),[op] <command>,[console] <command>,[player] <command>}
    - "(cancel-item_move)"
    - "[console] warp %currentrank%"

Rank item settings to be shown in the gui.

    custom:
      B:
        itemLORE:
        - "&4Your rank is B!"

If you want to overwrite the default rank item settings.

commands.yml

Enable, disable, and edit the plugin commands like you want. By disabling them, they will never get registered in the server. These are the editable things: aliases, command usage, permissions, permission messages.

messages.yml

Basically, the messages for everything related to the plugin. You can edit them here as you like.

ranks.yml, prestiges.yml, rebirths.yml

While ranks.yml has multi rank paths, these config files accept the same settings you can put for each one, and these settings are:

display

(Required) rank display name/prefix in chat, scoreboard, tab etc.... example:

      display: "&7[&9A&7]"

nextrank/nextprestige/nextrebirth

(Required) which rank/prestige/rebirth you will be promoted to if you successfully met the requirements of that rank.

      nextrank: "B"
      nextprestige: "P2"
      nextrebirth: "R2"

If the rank is the latest rank in ranks.yml or any other level config..

      nextrank: LASTRANK
      nextprestige: LASTPRESTIGE
      nextrebirth: LASTREBIRTH

cost

(Required) how much money it takes to get to the next rank/prestige/rebirth...

      cost: 10000.0

executecmds

(Optional) what commands you want to be executed when you rankup to that rank? it accepts 3 prefixes
[console] <command> = execute the command as a console.
[op] <command> = execute the command but with temp operator permissions that only has access to this command.
[player] <command> = execute the command like a normal player with his permissions and nothing different.
<command> = if there is no prefix the command will be executed as a console.
accepted-placeholders: %player%, %rankup% for rankup executecmds, %prestige% for prestige executecmds, %rebirth% ....

      executecmds:
      - "[console] broadcast %player% ranked up to B"
      - "[player] warp %rankup%"
      - "[op] say I am bypassing my permissions"

broadcast

(Optional) sends a message to everyone in the server unless allworlds-broadcast option is false.
Basically to use it just put a list of message lines, the same you did for executecmds i.e /

      broadcast:
      - "&6This is a broadcast message"
      - "&9This is another broadcast message"
      - "&d&l%player% &6sucessfully ranked up!"

accepted-placeholders are the same placeholders you can use for executecmds

msg

(Optional) sends a message to yourself uses list format like the broadcast and executecmds

      msg:
      - "&9You ranked up!"
      - "&6You got a rankup key :)"

actionbar

(Optional) sends an actionbar message which shows above the player's Hotbar, by default it's animated if it contains more than one line. and you can control the animation speed by changing the interval which works on ticks. and that is how it looks in the config.

      actionbar:
        interval: 10
        text:
        - "&aCongratulations!"
        - "&2Congratulations!"
        - "&3Congratulations!"
        - "&bCongratulations!"

accepted-placeholders are the same placeholders that you can use for broadcast and executecmds, and keep in mind that the interval works on ticks and 20 ticks = 1 second, which means 10 ticks = 0.5 seconds.

actions

(Optional) there are actions that I didn't implement in the plugin? You can use this by installing ActionUtil plugin in your server, which allows you to perform various actions upon rankup, prestige, rebirth
Here is how it looks in config:

      actions:
      - "[MESSAGE] Hi, I am being executed from actionutil plugin."

randomcmds

(Optional) If you want certain commands to be executed depending on a player luck.
Here is an example of how it looks in config:

      randomcmds:
        '1':
          chance: 70
          commands:
          - "say Random Console Command 1 with chance: 70%"
          - "give %player% diamond 1"
        '2':
          chance: 30
          commands:
          - "say Random Console Command 2 with chance: 30%"
          - "give %player% dirt 1"
          - "say Congratulations, You got the ultimate dirt!"

addpermission

(Optional) Gives a permission to the player. Note that this is faster than running commands because it runs asynchronously.
So basically to add a permission in all worlds or the default world (according to your plugin):

      addpermission:
      - "essentials.warps.B"

or for a specific world [<worldname>] :

      addpermission:
      - "[plots] essentials.fly"

delpermission

(Optional) Pretty much the same as addpermission, but instead of adding it deletes the permissions.

      delpermission:
      - "essentials.warps.A"
      - "essentials.kits.A"
      - "[plots] essentials.fly"

requirements

(Optional) wanna add more requirements other than just rankup/prestige/rebirth cost. Then use this:
You must use PlaceholderAPI placeholders.

      requirements:
      # number requirement
      - "%ezblocks_blocks%>>1000" # 1000 broken blocks required to get promoted to the next level
      - "%some_placeholder%>>500" # Just an example, this placeholder is not real and it will break the rankup
      # string requirement
      - "%vault_group%->Admin" # You must be an admin to ascend to the next level

custom-requirement-message

(Optional) a message that shows up if you didn't met the requirements of that level

      custom-requirement-message:
      - "&6You need to break &e1000 &6blocks to rankup!"
      - "&4And you must be an admin too..."

firework-builder

(Optional) sends a firework with your choice of colors, effects, fade colors, flicker or not, trail or not, and the spawn power. And to enable this, you must put send-firework: true and here is an example of how it looks in the config:

    # you can put more than one value on color, fade and effect sections.
    send-firework: true
    firework-builder:
      flicker: true
      trail: true
      effect:
      - BALL_LARGE
      color:
      - RED
      - BLUE
      fade:
      - WHITE
      power: 2

Available effects:

  • STAR
  • CREEPER
  • BURST
  • BALL
  • BALL_LARGE

Available colors:

  • Vanilla Colors
  • name: AQUA aliases:
  • name: BLACK aliases:
  • name: BLUE aliases: DARKBLUE, DARK_BLUE
  • name: FUCHSIA aliases: PINK
  • name: GRAY aliases: GREY
  • name: GREEN aliases: DARKGREEN, DARK_GREEN
  • name: LIME aliases: LIGHTGREEN, LIGHT_GREEN
  • name: MAROON aliases:
  • name: NAVY aliases:
  • name: OLIVE aliases:
  • name: ORANGE aliases:
  • name: PURPLE aliases: DARKPURPLE, DARK_PURPLE
  • name: RED aliases: DARKRED, DARK_RED
  • name: SILVER aliases: LIGHTGRAY, LIGHT_GRAY, LIGHTGREY, LIGHT_GREY
  • name: TEAL aliases:
  • name: WHITE aliases:
  • name: YELLOW aliases:
  • Custom Colors
  • name: LIGHT_PURPLE aliases: LIGHTPURPLE, LIGHT PURPLE
  • name: GOLD aliases:
  • name: CYAN aliases:
  • name: BROWN aliases:
  • name: LIGHT_YELLOW aliases: LIGHTYELLOW, LIGHT YELLOW
  • name: SKYBLUE aliases: SKY_BLUE, SKY BLUE, BLUE_SKY, BLUE SKY
  • name: TURQUOISE aliases: BLUEGREEN, BLUE_GREEN, BLUE GREEN
  • name: LIGHT_RED aliases: LIGHTRED, LIGHT RED
  • name: LIGHT_BLUE aliases: LIGHTBLUE, LIGHT BLUE

Custom settings for each config:

ranks.yml

allow-prestige

This option allows you to prestige at any rank you want.

      allow-prestige: true

prestiges.yml

rankup_cost_increase_percentage

increases rankup cost when you prestige to that prestige
if you are using the default expression, then the value must be above 100 for it to increase.

      # increases rankup cost by %10
      rankup_cost_increase_percentage: 110
      # increases rankup cost by %15
      rankup_cost_increase_percentage: 115

rebirths.yml

prestige_cost_increase_percentage

works exactly like the rankup_cost_increase_percentage

  # increases next prestige cost by %900
  prestige_cost_increase_percentage: 1000

required_prestiges

how many prestiges are needed to rebirth. This is counted by this formula: ({rebirthNumber} + 1) * {prestigeNumber}

  # let's say this is rebirth 1, to rebirth to it you must be at prestige 100
  required_prestiges: 100
  # if it's rebirth 2, you must double the number to be the same as above.
  required_prestiges: 200
  # if you don't put this option then it will check if you are at the latest prestige

rankdata.yml, prestigedata.yml, rebirthdata.yml

It's highly recommend to not touch these if you don't know what you are doing, but if you want to touch them make sure the server is offline to prevent data loss. These configuration files are the storage for players data contains (rank,path,prestige,rebirth) with players uuids.