Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Beta 1.
Browse files Browse the repository at this point in the history
- Fixed issue in IDFinder with console id.
- Fixed /baltop
- Fixed /transaction history
  • Loading branch information
creatorfromhell committed May 20, 2018
1 parent b82d758 commit bd789e0
Show file tree
Hide file tree
Showing 53 changed files with 461 additions and 132 deletions.
6 changes: 3 additions & 3 deletions TNE/src/net/tnemc/core/TNE.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.github.tnerevival.core.UpdateChecker;
import com.github.tnerevival.core.collection.EventList;
import com.github.tnerevival.core.collection.EventMap;
import com.github.tnerevival.user.IDFinder;
import net.milkbowl.vault.economy.Economy;
import net.tnemc.core.commands.CommandManager;
import net.tnemc.core.commands.TNECommand;
Expand All @@ -24,6 +23,7 @@
import net.tnemc.core.common.WorldManager;
import net.tnemc.core.common.account.TNEAccount;
import net.tnemc.core.common.api.Economy_TheNewEconomy;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.api.ReserveEconomy;
import net.tnemc.core.common.api.TNEAPI;
import net.tnemc.core.common.configurations.MainConfigurations;
Expand Down Expand Up @@ -540,7 +540,7 @@ public static void debug(String message) {
int mil = now.get(ChronoField.MILLI_OF_SECOND);
String time = "[" + year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second + "." + mil + "] ";
if(consoleDebug) {
System.out.println(message);
TNE.debug(message);
} else {
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(new File(TNE.instance().getDataFolder(), "debug/debug-" + year + "-" + month + "-" + day + ".txt"), true));
Expand All @@ -551,7 +551,7 @@ public static void debug(String message) {
e.printStackTrace();
}
}*/
//System.out.println(message);
//TNE.debug(message);
}

public void loadConfigurations() {
Expand Down
2 changes: 1 addition & 1 deletion TNE/src/net/tnemc/core/commands/TNECommand.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.tnemc.core.commands;

import com.github.tnerevival.TNELib;
import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.admin;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.currency.CurrencyFormatter;
import net.tnemc.core.common.currency.TNECurrency;
import net.tnemc.core.common.transaction.TNETransaction;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package net.tnemc.core.commands.admin;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.TNEAccount;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.currency.CurrencyFormatter;
import org.bukkit.command.CommandSender;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.admin;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.command.CommandSender;

/**
Expand Down
2 changes: 1 addition & 1 deletion TNE/src/net/tnemc/core/commands/admin/AdminIDCommand.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.admin;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.command.CommandSender;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.admin;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.admin;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package net.tnemc.core.commands.admin;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.AccountStatus;
import net.tnemc.core.common.account.TNEAccount;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package net.tnemc.core.commands.admin;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.utils.MISCUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.config;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.command.CommandSender;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.config;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.command.CommandSender;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.config;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.command.CommandSender;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.language;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.command.CommandSender;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package net.tnemc.core.commands.language;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.TNEAccount;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import org.bukkit.command.CommandSender;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package net.tnemc.core.commands.money;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.TNEAccount;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.currency.CurrencyFormatter;
import net.tnemc.core.common.currency.TNECurrency;
import net.tnemc.core.common.transaction.TNETransaction;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package net.tnemc.core.commands.money;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.TNEAccount;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.currency.CurrencyFormatter;
import net.tnemc.core.common.currency.TNECurrency;
import net.tnemc.core.common.transaction.TNETransaction;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.money;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.currency.CurrencyFormatter;
import net.tnemc.core.common.currency.TNECurrency;
import net.tnemc.core.common.transaction.MultiTransactionHandler;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package net.tnemc.core.commands.money;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.TNEAccount;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.currency.CurrencyFormatter;
import net.tnemc.core.common.currency.TNECurrency;
import net.tnemc.core.common.transaction.TNETransaction;
Expand Down
2 changes: 1 addition & 1 deletion TNE/src/net/tnemc/core/commands/money/MoneyPayCommand.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.money;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.currency.CurrencyFormatter;
import net.tnemc.core.common.currency.TNECurrency;
import net.tnemc.core.common.transaction.MultiTransactionHandler;
Expand Down
2 changes: 1 addition & 1 deletion TNE/src/net/tnemc/core/commands/money/MoneySetCommand.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.money;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.currency.CurrencyFormatter;
import net.tnemc.core.common.currency.TNECurrency;
import net.tnemc.core.common.transaction.TNETransaction;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.tnemc.core.commands.money;

import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.currency.CurrencyFormatter;
import net.tnemc.core.common.currency.TNECurrency;
import net.tnemc.core.common.transaction.MultiTransactionHandler;
Expand Down
11 changes: 7 additions & 4 deletions TNE/src/net/tnemc/core/commands/money/MoneyTopCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
import net.tnemc.core.common.currency.CurrencyFormatter;
import net.tnemc.core.common.currency.TNECurrency;
import net.tnemc.core.common.utils.MISCUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;

import java.math.BigDecimal;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.UUID;

Expand Down Expand Up @@ -68,18 +69,20 @@ public boolean execute(CommandSender sender, String command, String[] arguments)
}

int max = TNE.saveManager().getTNEManager().getTNEProvider().balanceCount(world, currency.name(), limit);
if(max == 0) max = 1;

if(page > max) page = max;
TNE.debug("MoneyTopCommand.java(87): Max Pages - " + max);

Map<UUID, BigDecimal> values = TNE.saveManager().getTNEManager().getTNEProvider().topBalances(world, currency.name(), limit, page);
LinkedHashMap<UUID, BigDecimal> values = TNE.saveManager().getTNEManager().getTNEProvider().topBalances(world, currency.name(), limit, page);

Message top = new Message("Messages.Money.Top");
top.addVariable("$page", page + "");
top.addVariable("$page_top", max + "");
top.translate(world, sender);
for (Map.Entry<UUID, BigDecimal> entry : values.entrySet()) {
String username = (Bukkit.getOfflinePlayer(entry.getKey()) != null)? Bukkit.getOfflinePlayer(entry.getKey()).getName() : TNE.manager().getAccount(entry.getKey()).displayName();
Iterator<Map.Entry<UUID, BigDecimal>> it = values.entrySet().iterator();
while(it.hasNext()) {
Map.Entry<UUID, BigDecimal> entry = it.next();
sender.sendMessage(TNE.manager().getAccount(entry.getKey()).displayName() + " has " + CurrencyFormatter.format(currency, world, entry.getValue()));
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import com.github.tnerevival.core.collection.paginate.Page;
import com.github.tnerevival.core.collection.paginate.Paginator;
import com.github.tnerevival.user.IDFinder;
import net.tnemc.core.TNE;
import net.tnemc.core.commands.TNECommand;
import net.tnemc.core.common.Message;
import net.tnemc.core.common.WorldVariant;
import net.tnemc.core.common.account.WorldFinder;
import net.tnemc.core.common.api.IDFinder;
import net.tnemc.core.common.transaction.TNETransaction;
import net.tnemc.core.common.utils.MISCUtils;
import org.bukkit.command.CommandSender;
Expand Down
Loading

0 comments on commit bd789e0

Please sign in to comment.