Allow customer support to track freedom chests and improve error information to prevent forging/confusion

This commit is contained in:
AlexTheCoder 2017-07-01 14:38:03 -04:00 committed by cnr
parent fd660f95a0
commit d61e067b86
2 changed files with 47 additions and 22 deletions

View File

@ -424,6 +424,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
caller.sendMessage(C.cBlue + "Love Chests Received: " + C.cYellow + loveChestsReceived);
caller.sendMessage(C.cBlue + "St Patrick's Chests Received: " + C.cYellow + stPatricksChestReceived);
caller.sendMessage(C.cBlue + "Spring Chests Received: " + C.cYellow + springChestsReceived);
caller.sendMessage(C.cBlue + "Freedom Chests Received: " + C.cYellow + freedomChestsReceived);
caller.sendMessage(C.cBlue + "Game Amplifiers Received: " + C.cYellow + boostersReceived);
caller.sendMessage(C.cBlue + "Rune Amplifiers (20 min/60 min) Received: " + C.cYellow + runeAmplifier20 + "/" + runeAmplifier60);
caller.sendMessage(C.cBlue + "Clans Dye Boxes Received: " + C.cYellow + clansDyeBoxesReceived + " " + C.cBlue + "Clans Builder Boxes Received: " + C.cYellow + clansBuilderBoxesReceived);

View File

@ -1,10 +1,21 @@
package nautilus.game.arcade.game.games.battleroyale;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import mineplex.core.common.currency.GlobalCurrency;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.server.util.TransactionResponse;
import mineplex.core.treasure.TreasureType;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
@ -16,15 +27,6 @@ import nautilus.game.arcade.game.games.moba.kit.KitPlayer;
import nautilus.game.arcade.game.modules.CustomScoreboardModule;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.scoreboard.GameScoreboard;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class BattleRoyaleSolo extends BattleRoyale
{
@ -214,33 +216,55 @@ public class BattleRoyaleSolo extends BattleRoyale
if (wins > 1)
{
Manager.getInventoryManager().addItemToInventory(success ->
Manager.GetDonation().purchaseUnknownSalesPackage(player, TreasureType.MYTHICAL.getItemName(), GlobalCurrency.GEM, 0, false, data ->
{
if (success)
if (data == TransactionResponse.Success)
{
player.sendMessage(F.main("Game", "Unlocked 1 " + C.cAqua + "Mythical Chest" + C.mBody + "."));
Manager.getInventoryManager().addItemToInventory(success ->
{
if (success)
{
player.sendMessage(F.main("Game", "Unlocked 1 " + C.cAqua + "Mythical Chest" + C.mBody + "."));
}
else
{
player.sendMessage(F.main("Game", "Failed to give you your Mythical Chest, you should take a screenshot of this and make a support ticket!"));
player.sendMessage(C.cGray + "Error Verification Code: " + C.cGreen + new StringBuilder(player.getUniqueId().toString().split("-")[1]).reverse().toString());
}
}, player, TreasureType.MYTHICAL.getItemName(), 1);
}
else
{
player.sendMessage(F.main("Game", "Failed to give you your Mythical Chest, you should inform a staff member!"));
player.sendMessage(F.main("Game", "Failed to give you your Mythical Chest, you should take a screenshot of this and make a support ticket!"));
player.sendMessage(C.cGray + "Error Verification Code: " + C.cGreen + new StringBuilder(player.getUniqueId().toString().split("-")[1]).reverse().toString());
}
}, player, TreasureType.MYTHICAL.getItemName(), 1);
});
}
else
{
Manager.getInventoryManager().addItemToInventory(success ->
Manager.GetDonation().purchaseUnknownSalesPackage(player, TreasureType.FREEDOM.getItemName(), GlobalCurrency.GEM, 0, false, data ->
{
if (success)
if (data == TransactionResponse.Success)
{
player.sendMessage(F.main("Game", "Unlocked 1 " + C.cRed + "Freedom Chest" + C.mBody + "."));
Manager.getInventoryManager().addItemToInventory(success ->
{
if (success)
{
player.sendMessage(F.main("Game", "Unlocked 1 " + C.cRed + "Freedom Chest" + C.mBody + "."));
}
else
{
player.sendMessage(F.main("Game", "Failed to give you your Freedom Chest, you should take a screenshot of this and make a support ticket!"));
player.sendMessage(C.cGray + "Error Verification Code: " + C.cGreen + new StringBuilder(player.getUniqueId().toString().split("-")[1]).reverse().toString());
}
}, player, TreasureType.FREEDOM.getItemName(), 1);
}
else
{
player.sendMessage(F.main("Game", "Failed to give you your Freedom Chest, you should inform a staff member!"));
player.sendMessage(F.main("Game", "Failed to give you your Freedom Chest, you should take a screenshot of this and make a support ticket!"));
player.sendMessage(C.cGray + "Error Verification Code: " + C.cGreen + new StringBuilder(player.getUniqueId().toString().split("-")[1]).reverse().toString());
}
}, player, TreasureType.FREEDOM.getItemName(), 1);
});
}
AddGems(places.get(0), 20, "1st Place", false, false);