Fix enjin listener else bug

This commit is contained in:
Shaun Bennett 2016-09-03 00:56:36 -04:00
parent c2344a0494
commit 0ea1d3eca2

View File

@ -103,34 +103,37 @@ public class Enjin extends MiniPlugin implements CommandExecutor
uuid = _clientManager.loadUUIDFromDB(name);
if (uuid == null)
uuid = UUIDFetcher.getUUIDOf(name);
}
if (uuid == null)
{
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + ", no UUID.");
return;
}
final UUID playerUUID = uuid;
_cachedUUIDs.put(name, new AbstractMap.SimpleEntry<UUID, Long>(playerUUID, System.currentTimeMillis() + 240000));
if (!checkForClansPurchase(args, name, client))
{
if (!checkForBoosterPurchase(args, name, playerUUID, client))
{
System.out.println("[" + _dateFormat.format(new Date()) + "] ERROR processing " + name + ", no UUID.");
return;
}
final UUID playerUUID = uuid;
_cachedUUIDs.put(name, new AbstractMap.SimpleEntry<UUID, Long>(playerUUID, System.currentTimeMillis() + 240000));
if (!checkForClansPurchase(args, name, client))
{
if (!checkForBoosterPurchase(args, name, playerUUID, client))
if (!checkForCoinPurchase(args, name, playerUUID, client))
{
if (!checkForCoinPurchase(args, name, playerUUID, client))
if (!checkForRankPurchase(args, name, playerUUID, client))
{
if (!checkForRankPurchase(args, name, playerUUID, client))
if (!checkForPurchase(args, name, client))
{
if (!checkForPurchase(args, name, client))
StringBuilder sb = new StringBuilder();
for (String arg : args)
{
StringBuilder sb = new StringBuilder();
for (String arg : args)
{
sb.append(arg + " ");
}
System.out.println("Received Command : " + sb.toString());
sb.append(arg + " ");
}
System.out.println("Received Command : " + sb.toString());
}
}
}
@ -165,7 +168,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
final Rank rank = mineplex.core.common.Rank.valueOf(args[2]);
final boolean perm = Boolean.parseBoolean(args[3]);
_clientManager.loadClientByName(name, loadedClient ->
{
if (rank == Rank.ALL || loadedClient.GetRank() == Rank.ALL || !loadedClient.GetRank().has(rank) || loadedClient.GetRank() == rank)
@ -188,7 +191,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor
{
if (args.length < 3 || !args[0].equalsIgnoreCase("purchase"))
return false;
final int amount = Integer.parseInt(args[2]);
String tempName = args[4];