ranks gui

This commit is contained in:
okx-code
2020-09-01 21:12:06 +01:00
parent 1b952e9843
commit 0028af8ba0
15 changed files with 929 additions and 738 deletions
+104 -104
View File
@@ -1,105 +1,105 @@
# this is used for letting you know that you need to update/change your config file
version: 8
# the locale to use for messages
# all messages can be customised but this allows you to
# choose messages that are already translated
# locales can be found in the locale/ folder
locale: en
# interval (in minutes) to check to autorankup players
# ranking up manually wil always be enabled
# set to 0 to disable
autorankup-interval: 0
# whether /ranks and /prestiges should be enabled (true) or disabled (false)
# /rankup3 reload will not do anything if this is changed,
# you will have to restart your server.
ranks: true
# you can alternatively negate the permission rankup.prestiges
# this will also make the command not autocomplete in 1.13
prestiges: true
# whether or not /prestige and /prestiges should be enabled.
# when a player reaches the top rank, they can do /prestige to return to the first rank,
# but you will be able to grant them an additional "prestige" group or additional items.
#
# if you do not want this command to autocomplete, make sure
# you negate the permission rankup.prestige with your permissions plugin.
# if enabled, a prestiges.yml file will be generated with some example prestiges
# You must restart your server when you change this for it to work!
prestige: false
# if true, players with the permission rankup.notify will receive notifications when they join
# to update if the server is on an older version of Rankup.
notify-update: true
# if rankups and prestiges should be by permissions
# if false, players will be checked for if they have a group of the same name as in rankups.yml,
# and automatically added and taken away from those groups.
# if true, players will be checked for the permission rankup.rank.RANK, where RANK
# is the rankup in rankups.yml. Nothing will automatically happen on rankup, so you must
# use commands to change a player's group or permission.
permission-rankup: false
# how people should confirm ranking up
# options are: gui, text or none
confirmation-type: 'gui'
# how long, in seconds, people have to wait between a successful /rankup or /prestige
# set to 0 to disable.
cooldown: 1
# if enabled, players can run /maxrankup to rankup as many times as possible,
# before they fail the requirements for the next rank.
# the permission rankup.maxrankup is used for this command, but it is given by default.
# note that /maxrankup, if enabled, has no confirmation.
max-rankup:
# You must restart your server if you enable or disable /maxrankup!
enabled: false
# whether to send a message for each rankup a player does
# if set to true, the chat may be spammed for each rankup a player goes through with /maxrankup
# if set to false, only the last rankup will be shown (if a player starts on rank A, then does
# /maxrankup and ranks up to B and then C, it will just say "player has ranked up to C")
individual-messages: true
# options when using the text rankup confirmation
text:
# the time in seconds for a player to
# confirm by typing /rankup again
timeout: 10
# placeholders:
# https://github.com/okx-code/Rankup3/wiki/PAPI-Placeholders
placeholders:
# format for money. for more information, see
# https://docs.oracle.com/javase/8/docs/api/java/text/DecimalFormat.html
money-format: "#,##0.##"
percent-format: "0.##"
# the format used for requirements
simple-format: "#.##"
# used for current_rank and next_rank placeholders when a player is not in anything in rankups.yml
not-in-ladder: "None"
# used in the current_prestige placeholders when a player hasn't prestiged yet
no-prestige: "None"
# used in the next_rank and next_prestige placeholders when a player is at the highest rank or prestige
highest-rank: "None"
# used in the %rankup_status_[rank]% placeholders
status:
complete: "Complete"
current: "Current"
incomplete: "Incomplete"
# what to shorten money by.
# ie 1000 -> 1k
# set to an empty list to disable
# for each entry here, it counts as increasing by a factor of 1,000
# the first represents thousands (1,000) then millions (1,000,000) then billions (1,000,000,000) etc.
shorten:
- 'K'
- 'M'
- 'B'
- 'T'
- 'Q'
- 'Qu'
# this is used for letting you know that you need to update/change your config file
version: 9
# the locale to use for messages
# all messages can be customised but this allows you to
# choose messages that are already translated
# locales can be found in the locale/ folder
locale: en
# interval (in minutes) to check to autorankup players
# ranking up manually wil always be enabled
# set to 0 to disable
autorankup-interval: 0
# whether /ranks and /prestiges should be enabled (true) or disabled (false)
# /rankup3 reload will not do anything if this is changed,
# you will have to restart your server.
ranks: true
# you can alternatively negate the permission rankup.prestiges
# this will also make the command not autocomplete in 1.13
prestiges: true
# whether or not /prestige and /prestiges should be enabled.
# when a player reaches the top rank, they can do /prestige to return to the first rank,
# but you will be able to grant them an additional "prestige" group or additional items.
#
# if you do not want this command to autocomplete, make sure
# you negate the permission rankup.prestige with your permissions plugin.
# if enabled, a prestiges.yml file will be generated with some example prestiges
# You must restart your server when you change this for it to work!
prestige: false
# if true, players with the permission rankup.notify will receive notifications when they join
# to update if the server is on an older version of Rankup.
notify-update: true
# if rankups and prestiges should be by permissions
# if false, players will be checked for if they have a group of the same name as in rankups.yml,
# and automatically added and taken away from those groups.
# if true, players will be checked for the permission rankup.rank.RANK, where RANK
# is the rankup in rankups.yml. Nothing will automatically happen on rankup, so you must
# use commands to change a player's group or permission.
permission-rankup: false
# how people should confirm ranking up
# options are: gui, text or none
confirmation-type: 'gui'
# how long, in seconds, people have to wait between a successful /rankup or /prestige
# set to 0 to disable.
cooldown: 1
# if enabled, players can run /maxrankup to rankup as many times as possible,
# before they fail the requirements for the next rank.
# the permission rankup.maxrankup is used for this command, but it is given by default.
# note that /maxrankup, if enabled, has no confirmation.
max-rankup:
# You must restart your server if you enable or disable /maxrankup!
enabled: false
# whether to send a message for each rankup a player does
# if set to true, the chat may be spammed for each rankup a player goes through with /maxrankup
# if set to false, only the last rankup will be shown (if a player starts on rank A, then does
# /maxrankup and ranks up to B and then C, it will just say "player has ranked up to C")
individual-messages: true
# options when using the text rankup confirmation
text:
# the time in seconds for a player to
# confirm by typing /rankup again
timeout: 10
# placeholders:
# https://github.com/okx-code/Rankup3/wiki/PAPI-Placeholders
placeholders:
# format for money. for more information, see
# https://docs.oracle.com/javase/8/docs/api/java/text/DecimalFormat.html
money-format: "#,##0.##"
percent-format: "0.##"
# the format used for requirements
simple-format: "#.##"
# used for current_rank and next_rank placeholders when a player is not in anything in rankups.yml
not-in-ladder: "None"
# used in the current_prestige placeholders when a player hasn't prestiged yet
no-prestige: "None"
# used in the next_rank and next_prestige placeholders when a player is at the highest rank or prestige
highest-rank: "None"
# used in the %rankup_status_[rank]% placeholders
status:
complete: "Complete"
current: "Current"
incomplete: "Incomplete"
# what to shorten money by.
# ie 1000 -> 1k
# set to an empty list to disable
# for each entry here, it counts as increasing by a factor of 1,000
# the first represents thousands (1,000) then millions (1,000,000) then billions (1,000,000,000) etc.
shorten:
- 'K'
- 'M'
- 'B'
- 'T'
- 'Q'
- 'Qu'
- 'S'
+123 -103
View File
@@ -1,104 +1,124 @@
# the messages in this section can be customised for each rankup in rankups.yml.
rankup:
requirements-not-met: "&cYou need {MONEY} money to rankup."
no-rankup: "&eYou are at the highest rank."
# set to an empty string, ie: success-public: ""
# to hide that message.
success-public: "&a{PLAYER} &ehas ranked up to: &d{RANK}"
success-private: "&aYou have ranked up to: &d{RANK}"
# used for the text confirmation
confirmation: |-
&eAre you sure you want to rankup to &a{RANK}&e?
&eType &c/rankup &eagain to confirm.
# used for the GUI confirmation
title: "Rankup to {RANK}"
must-prestige: "&cYou must prestige to /rankup further!"
gui:
rows: 1
title: "Rankup to {RANK}"
rankup:
material: EMERALD_BLOCK
# index can be separated by spaces to show in multiple groups
# for example: 0-3 9-12 18-21
# you can also just use a single number instead of a range.
index: 0-3
name: '&a&lConfirm'
# lore is optional
lore: '&6Rankup to &b{RANK}'
cancel:
material: REDSTONE_BLOCK
index: 5-8
name: '&c&lCancel'
fill:
name: ' '
# if you are using a 1.8-1.12 and you want to change this
# you can use MATERIAL:data, for example STAINED_GLASS_PANE:8
# this works for both the rankup and cancel blocks as well
material: BLACK_STAINED_GLASS_PANE
# you can (and probably should) you override these in rankups.yml
# to show the specific requirements for each rank.
# however if you are just using money or don't need to change the message per rank, you can use any combination of:
# {MONEY} {MONEY_NEEDED} {PERCENT_DONE <requirement>} {PERCENT_LEFT <requirement>} {AMOUNT <requirement>} {AMOUNT_NEEDED <requirement>}
# {MONEY} and {MONEY_NEEDED} are different from {AMOUNT money} and {AMOUNT_NEEDED money} in that they use a different format.
# here is an example of showing the requirements for just money:
#list:
# complete: "&7{OLD_RANK} &8\xbb &7{RANK} &efor &7${MONEY}"
# current: "&c{OLD_RANK} &e\xbb &c{RANK} &efor &a${MONEY} &e{PERCENT_DONE money}%"
# incomplete: "&r{OLD_RANK} &e\xbb &r{RANK} &efor &a${MONEY}"
list:
complete: "&7{OLD_RANK} &8\xbb &7{RANK}"
current: "&c{OLD_RANK} &e\xbb &c{RANK}"
incomplete: "&r{OLD_RANK} &e\xbb &r{RANK}"
# an empty string disables the header/footer
header: ""
footer: ""
# sent when a player tries to rankup when they are on cooldown
cooldown:
singular: "&cYou must wait {SECONDS_LEFT} more second to rankup again."
plural: "&cYou must wait {SECONDS_LEFT} more seconds to rankup again."
# prestige messages can also be customised
prestige:
requirements-not-met: "&cYou need {MONEY} money to prestige."
no-prestige: "&eYou are at the highest prestige."
success-public: "&a{PLAYER} &ehas prestiged to: &d{RANK}"
success-private: "&aYou have prestiged to: &d{RANK}"
confirmation: |-
&eAre you sure you want to prestige to &a{RANK}&e?
&eType &c/prestige &eagain to confirm.
gui:
title: "Prestige to {RANK}"
rankup:
material: GOLD_BLOCK
index: 0-3
name: '&a&lConfirm'
lore: '&6Prestige to &b{RANK}'
cancel:
material: REDSTONE_BLOCK
index: 5-8
name: '&c&lCancel'
fill:
name: ' '
# if you are using a 1.8-1.12 and you want to change this
# you can use MATERIAL:data, for example STAINED_GLASS_PANE:8
# this works for both the rankup and cancel blocks as well
material: BLACK_STAINED_GLASS_PANE
list:
complete: "&7{OLD_RANK} &8\xbb &7{RANK}"
current: "&c{OLD_RANK} &e\xbb &c{RANK}"
incomplete: "&r{OLD_RANK} &e\xbb &r{RANK}"
header: ""
footer: ""
cooldown:
singular: "&cYou must wait {SECONDS_LEFT} second to prestige again."
plural: "&cYou must wait {SECONDS_LEFT} more seconds to prestige again."
not-high-enough: "&cYou cannot prestige at your rank!"
not-in-ladder: "&cSorry, but we could not find any rankups for the group(s) you are in. Use /ranks to list the rankups."
# the messages in this section can be customised for each rankup in rankups.yml.
rankup:
requirements-not-met: "&cYou need {MONEY} money to rankup."
no-rankup: "&eYou are at the highest rank."
# set to an empty string, ie: success-public: ""
# to hide that message.
success-public: "&a{PLAYER} &ehas ranked up to: &d{RANK}"
success-private: "&aYou have ranked up to: &d{RANK}"
# used for the text confirmation
confirmation: |-
&eAre you sure you want to rankup to &a{RANK}&e?
&eType &c/rankup &eagain to confirm.
# used for the GUI confirmation
title: "Rankup to {RANK}"
must-prestige: "&cYou must prestige to /rankup further!"
gui:
rows: 1
title: "Rankup to {RANK}"
rankup:
material: EMERALD_BLOCK
# index can be separated by spaces to show in multiple groups
# for example: 0-3 9-12 18-21
# you can also just use a single number instead of a range.
index: 0-3
name: '&a&lConfirm'
# lore is optional
lore: '&6Rankup to &b{RANK}'
cancel:
material: REDSTONE_BLOCK
index: 5-8
name: '&c&lCancel'
fill:
name: ' '
# if you are using a 1.8-1.12 and you want to change this
# you can use MATERIAL:data, for example STAINED_GLASS_PANE:8
# this works for both the rankup and cancel blocks as well
material: BLACK_STAINED_GLASS_PANE
ranksgui:
title: "Ranks"
rows: 3
offset: 10
width: 7
rankup:
complete:
material: GREEN_STAINED_GLASS_PANE
name: "&aRank &7{RANK} &a(completed)"
current:
material: ORANGE_STAINED_GLASS_PANE
name: "&dRankup to &7{RANK}"
incomplete:
material: RED_STAINED_GLASS_PANE
name: "&cRank &7{RANK} &c(requires rankup)"
fill:
material: BLACK_STAINED_GLASS_PANE
name: ' '
# you can (and probably should) you override these in rankups.yml
# to show the specific requirements for each rank.
# however if you are just using money or don't need to change the message per rank, you can use any combination of:
# {MONEY} {MONEY_NEEDED} {PERCENT_DONE <requirement>} {PERCENT_LEFT <requirement>} {AMOUNT <requirement>} {AMOUNT_NEEDED <requirement>}
# {MONEY} and {MONEY_NEEDED} are different from {AMOUNT money} and {AMOUNT_NEEDED money} in that they use a different format.
# here is an example of showing the requirements for just money:
#list:
# complete: "&7{OLD_RANK} &8\xbb &7{RANK} &efor &7${MONEY}"
# current: "&c{OLD_RANK} &e\xbb &c{RANK} &efor &a${MONEY} &e{PERCENT_DONE money}%"
# incomplete: "&r{OLD_RANK} &e\xbb &r{RANK} &efor &a${MONEY}"
list:
complete: "&7{OLD_RANK} &8\xbb &7{RANK}"
current: "&c{OLD_RANK} &e\xbb &c{RANK}"
incomplete: "&r{OLD_RANK} &e\xbb &r{RANK}"
# an empty string disables the header/footer
header: ""
footer: ""
# sent when a player tries to rankup when they are on cooldown
cooldown:
singular: "&cYou must wait {SECONDS_LEFT} more second to rankup again."
plural: "&cYou must wait {SECONDS_LEFT} more seconds to rankup again."
# prestige messages can also be customised
prestige:
requirements-not-met: "&cYou need {MONEY} money to prestige."
no-prestige: "&eYou are at the highest prestige."
success-public: "&a{PLAYER} &ehas prestiged to: &d{RANK}"
success-private: "&aYou have prestiged to: &d{RANK}"
confirmation: |-
&eAre you sure you want to prestige to &a{RANK}&e?
&eType &c/prestige &eagain to confirm.
gui:
title: "Prestige to {RANK}"
rankup:
material: GOLD_BLOCK
index: 0-3
name: '&a&lConfirm'
lore: '&6Prestige to &b{RANK}'
cancel:
material: REDSTONE_BLOCK
index: 5-8
name: '&c&lCancel'
fill:
name: ' '
# if you are using a 1.8-1.12 and you want to change this
# you can use MATERIAL:data, for example STAINED_GLASS_PANE:8
# this works for both the rankup and cancel blocks as well
material: BLACK_STAINED_GLASS_PANE
list:
complete: "&7{OLD_RANK} &8\xbb &7{RANK}"
current: "&c{OLD_RANK} &e\xbb &c{RANK}"
incomplete: "&r{OLD_RANK} &e\xbb &r{RANK}"
header: ""
footer: ""
cooldown:
singular: "&cYou must wait {SECONDS_LEFT} second to prestige again."
plural: "&cYou must wait {SECONDS_LEFT} more seconds to prestige again."
not-high-enough: "&cYou cannot prestige at your rank!"
not-in-ladder: "&cSorry, but we could not find any rankups for the group(s) you are in. Use /ranks to list the rankups."
invalid-rankup: "&cInvalid rankup defined in config, please check console."
+62 -60
View File
@@ -1,61 +1,63 @@
name: Rankup
version: ${version}
main: sh.okx.rankup.RankupPlugin
author: Okx
depend: [Vault]
softdepend: [PlaceholderAPI, mcMMO, AdvancedAchievements, Towny]
api-version: 1.13
commands:
rankup:
permission: rankup.rankup
description: Rankup.
rankup3:
description: View Rankup version and perform some administrative commands.
# support the old command
aliases: [pru]
ranks:
permission: rankup.ranks
description: List all the ranks.
prestige:
permission: rankup.prestige
description: Prestige.
prestiges:
permission: rankup.prestiges
description: List all the prestiges.
maxrankup:
permission: rankup.maxrankup
description: Rankup as much as possible.
permissions:
rankup.*:
children:
rankup.rankup: true
rankup.admin: true
rankup.ranks: true
rankup.prestige: true
rankup.prestiges: true
rankup.auto: true
rankup.maxrankup: true
rankup.admin:
children:
# if a player can see if the plugin needs updating when they run /pru
rankup.checkversion: true
# if a player can run /pru reload
rankup.reload: true
# if a player can force rankup or prestige someone
rankup.force: true
# if a player receives notifications to update rankup when they log in.
rankup.notify: true
default: op
rankup.rankup:
default: true
rankup.ranks:
default: true
rankup.prestige:
default: true
rankup.prestiges:
default: true
rankup.auto:
default: true
rankup.maxrankup:
name: Rankup
version: ${version}
main: sh.okx.rankup.RankupPlugin
author: Okx
depend: [Vault]
softdepend: [PlaceholderAPI, mcMMO, AdvancedAchievements, Towny]
api-version: 1.13
commands:
rankup:
permission: rankup.rankup
description: Rankup.
rankup3:
description: View Rankup version and perform some administrative commands.
# support the old command
aliases: [pru]
ranks:
permission: rankup.ranks
description: List all the ranks.
prestige:
permission: rankup.prestige
description: Prestige.
prestiges:
permission: rankup.prestiges
description: List all the prestiges.
maxrankup:
permission: rankup.maxrankup
description: Rankup as much as possible.
ranksgui:
description: Show the ranks GUI
permissions:
rankup.*:
children:
rankup.rankup: true
rankup.admin: true
rankup.ranks: true
rankup.prestige: true
rankup.prestiges: true
rankup.auto: true
rankup.maxrankup: true
rankup.admin:
children:
# if a player can see if the plugin needs updating when they run /pru
rankup.checkversion: true
# if a player can run /pru reload
rankup.reload: true
# if a player can force rankup or prestige someone
rankup.force: true
# if a player receives notifications to update rankup when they log in.
rankup.notify: true
default: op
rankup.rankup:
default: true
rankup.ranks:
default: true
rankup.prestige:
default: true
rankup.prestiges:
default: true
rankup.auto:
default: true
rankup.maxrankup:
default: true