Skip to content

Commit

Permalink
main config path priority
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Mar 17, 2024
1 parent 4c0c051 commit 33edec6
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.Map;

public interface MainConfig {
@ConfigPath("placeholders")
@ConfigPath(value = "placeholders", priority = 1)
@Comment({
"This is where you add placeholders that the plugin will listen for values to store in the leaderboard",
"Note that the placeholder should have its final value as a number (or else the leaderboard won't update)",
Expand All @@ -33,7 +33,7 @@ default Map<String, String> getPlaceholders() {
return Collections.emptyMap();
}

@ConfigPath("formatters")
@ConfigPath(value = "formatters", priority = 2)
@Comment({
"The formatters to display the value in the leaderboard",
"This modifies how the value is shown in the leaderboard provided by the Top Holder",
Expand All @@ -57,37 +57,37 @@ default Map<String, NumberFormatter> getFormatters() {
return Collections.emptyMap();
}

@ConfigPath("load-all-offline-players")
@ConfigPath(value = "load-all-offline-players", priority = 3)
@Comment("Should the plugin load all offline players when the server starts")
default boolean isLoadAllOfflinePlayers() {
return false;
}

@ConfigPath({"task", "save", "entry-per-tick"})
@ConfigPath(value = {"task", "save", "entry-per-tick"}, priority = 4)
@Comment("How many entries should be saved per tick")
default int getTaskSaveEntryPerTick() {
return 10;
}

@ConfigPath({"task", "save", "delay"})
@ConfigPath(value = {"task", "save", "delay"}, priority = 4)
@Comment("How many ticks should the plugin wait before saving the leaderboard")
default int getTaskSaveDelay() {
return 0;
}

@ConfigPath({"task", "update", "entry-per-tick"})
@ConfigPath(value = {"task", "update", "entry-per-tick"}, priority = 5)
@Comment("How many entries should be updated per tick")
default int getTaskUpdateEntryPerTick() {
return 10;
}

@ConfigPath({"task", "update", "delay"})
@ConfigPath(value = {"task", "update", "delay"}, priority = 5)
@Comment("How many ticks should the plugin wait before updating the leaderboard")
default int getTaskUpdateDelay() {
return 0;
}

@ConfigPath("storage-type")
@ConfigPath(value = "storage-type")
@Comment({
"The type of storage the plugin will use to store the value",
"Available: YAML, SQLITE, MYSQL"
Expand Down

0 comments on commit 33edec6

Please sign in to comment.