Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target/
/.idea/
/CoinsEngine.iml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import su.nightexpress.nightcore.manager.AbstractManager;
import su.nightexpress.nightcore.util.Lists;
import su.nightexpress.nightcore.util.NumberUtil;
import su.nightexpress.nightcore.util.Version;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
Expand All @@ -34,7 +35,11 @@ public TopManager(@NotNull CoinsEnginePlugin plugin) {
@Override
protected void onLoad() {
if (Config.TOPS_USE_GUI.get()) {
this.topMenu = this.addMenu(new TopMenu(this.plugin, this), Config.DIR_MENU, "leaderboard.yml");
if (Version.isAtLeast(Version.MC_1_21_4)) {
this.topMenu = this.addMenu(new TopMenu(this.plugin, this), Config.DIR_MENU, "leaderboard.yml");
} else {
this.plugin.error("Couldn't enabling top menu because your server's Minecraft version is not supported.");
}
}

this.addListener(new TopsListener(this.plugin, this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
import su.nightexpress.coinsengine.api.CoinsEngineAPI;
import su.nightexpress.coinsengine.api.currency.Currency;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Consumer;

public class UserBalance {

private final Map<String, Double> balanceMap;

public UserBalance() {
this(new HashMap<>());
this(new ConcurrentHashMap<>());
}

public UserBalance(@NotNull Map<String, Double> balanceMap) {
Expand Down