Skip to content

Commit

Permalink
fix exp placeholder and add default-required-level config
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Nov 13, 2024
1 parent 5ff7e06 commit 666966d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "net.azisaba"
version = "2.0.1+1.15.2"
version = "2.0.2+1.15.2"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/azisaba/lifepvelevel/SpigotPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private static void registerPlaceholders() {
registerPlayerPlaceholder(
"0",
"pvelevel_exp",
p -> FORMATTER_COMMAS.format(LevelCalculator.toLevel(DBConnector.getExp(p.getUniqueId())))
p -> FORMATTER_COMMAS.format(DBConnector.getExp(p.getUniqueId()))
);
registerPlayerPlaceholder(
"0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static void setRequiredLevels(@NotNull String mmid, long level) {
}

public static long getRequiredLevel(@NotNull String mmid) {
return REQUIRED_LEVELS.getOrDefault(mmid, 0L);
return REQUIRED_LEVELS.getOrDefault(mmid, SpigotPlugin.getInstance().getConfig().getLong("default-required-level", 0L));
}

public static void addExp(@NotNull UUID uuid, long exp) {
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
default-required-level: 0
always-bypass: false
always-bypass-if-not-negative: false
enforced-mythic-type: []
Expand Down

0 comments on commit 666966d

Please sign in to comment.