Skip to content

Commit

Permalink
Added fetch-prefix-suffix-from-vault option to config (allows you to …
Browse files Browse the repository at this point in the history
…not fetch prefixes/suffixes from vault, enabled by default)
  • Loading branch information
ajgeiss0702 committed Jan 31, 2023
1 parent 14d49b5 commit 357e316
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/us/ajg0702/leaderboards/cache/Cache.java
Expand Up @@ -436,7 +436,7 @@ public void updateStat(String board, OfflinePlayer player) {

String prefix = "";
String suffix = "";
if(plugin.hasVault() && player instanceof Player) {
if(plugin.hasVault() && player instanceof Player && plugin.getAConfig().getBoolean("fetch-prefix-suffix-from-vault")) {
prefix = plugin.getVaultChat().getPlayerPrefix((Player)player);
suffix = plugin.getVaultChat().getPlayerSuffix((Player)player);
}
Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/config.yml
Expand Up @@ -113,6 +113,12 @@ only-update: []
# Default: true
require-zero-validation: true

# Should we get prefixes/suffixes from vault?
# If vault is not installed, this option does nothing (prefixes/suffixes aren't fetched anyway)
# Default: true
fetch-prefix-suffix-from-vault: true


# Debug option to print stuff that could be useful to the developer.
# You should probably keep this disabled unless you know what you are doing or are told to turn it on.
# Default: false
Expand Down Expand Up @@ -152,7 +158,7 @@ max-fetching-threads: 70


# Don't touch this
config-version: 24
config-version: 25

# ----- THESE OPTIONS HAVE MOVED -----
# to messages.yml. They will be removed from here in the future.
Expand Down

0 comments on commit 357e316

Please sign in to comment.