Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -34,7 +34,14 @@ 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");
try {
// checking whether symbol MenuType has existence because it is an Experimental class
// or just adapt each menu windows for each version like MythicMobs?
Class<?> menuTypeClass = Class.forName("org.bukkit.inventory.MenuType");
this.topMenu = this.addMenu(new TopMenu(this.plugin, this), Config.DIR_MENU, "leaderboard.yml");
} catch (ClassNotFoundException e) {
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