Fix more thanks and booster occurrences
This commit is contained in:
parent
73183af9bf
commit
e855a866c7
@ -84,10 +84,10 @@ public class ClaimTipsButton implements GuiItem, Listener
|
||||
|
||||
if (getPlayer().getOpenInventory() != null)
|
||||
{
|
||||
new TimedMessageWindow(getPlugin(), getPlayer(), ItemStackFactory.Instance.CreateStack(Material.STAINED_GLASS_PANE, DyeColor.LIME.getData(), 1, ChatColor.GREEN + "Amplifier Tips Collected"), "Tips Collected", 6*9, 20*3, getGui()).openInventory();
|
||||
new TimedMessageWindow(getPlugin(), getPlayer(), ItemStackFactory.Instance.CreateStack(Material.STAINED_GLASS_PANE, DyeColor.LIME.getData(), 1, ChatColor.GREEN + "Amplifier Thanks Collected"), "Thanks Collected", 6*9, 20*3, getGui()).openInventory();
|
||||
}
|
||||
|
||||
UtilPlayer.message(getPlayer(), F.main("Carl", "You collected " + F.currency(CurrencyType.TREASURE_SHARD, claimed) + " from Amplifier Tips!"));
|
||||
UtilPlayer.message(getPlayer(), F.main("Carl", "You collected " + F.currency(CurrencyType.TREASURE_SHARD, claimed) + " from Amplifiers!"));
|
||||
// Pending explosions are strange.. Not sure why we are using strings. Either way, lets display a rank reward effect
|
||||
_bonusManager.addPendingExplosion(getPlayer(), "RANK");
|
||||
getPlayer().playSound(getPlayer().getLocation(), Sound.NOTE_PLING, 1, 1.6f);
|
||||
@ -97,10 +97,10 @@ public class ClaimTipsButton implements GuiItem, Listener
|
||||
// No tips to claim
|
||||
if (getPlayer().getOpenInventory() != null)
|
||||
{
|
||||
new TimedMessageWindow(getPlugin(), getPlayer(), ItemStackFactory.Instance.CreateStack(Material.STAINED_GLASS_PANE, DyeColor.RED.getData(), 1, ChatColor.RED + "No Tips to Claim!"), "You have no tips to claim!", 6*9, 20*3, getGui()).openInventory();
|
||||
new TimedMessageWindow(getPlugin(), getPlayer(), ItemStackFactory.Instance.CreateStack(Material.STAINED_GLASS_PANE, DyeColor.RED.getData(), 1, ChatColor.RED + "No Thanks to Claim!"), "You have no thanks to claim!", 6*9, 20*3, getGui()).openInventory();
|
||||
}
|
||||
|
||||
UtilPlayer.message(getPlayer(), F.main("Carl", "You have no tips to claim!"));
|
||||
UtilPlayer.message(getPlayer(), F.main("Carl", "You have no thanks to claim!"));
|
||||
getPlayer().playSound(getPlayer().getLocation(), Sound.ENDERDRAGON_GROWL, 1, 10);
|
||||
}
|
||||
else
|
||||
@ -108,10 +108,10 @@ public class ClaimTipsButton implements GuiItem, Listener
|
||||
// Failed to claim
|
||||
if (getPlayer().getOpenInventory() != null)
|
||||
{
|
||||
new TimedMessageWindow(getPlugin(), getPlayer(), ItemStackFactory.Instance.CreateStack(Material.STAINED_GLASS_PANE, DyeColor.RED.getData(), 1, ChatColor.RED + "Error collecting tips. Try again later."), "Error", 6*9, 20*3, getGui()).openInventory();
|
||||
new TimedMessageWindow(getPlugin(), getPlayer(), ItemStackFactory.Instance.CreateStack(Material.STAINED_GLASS_PANE, DyeColor.RED.getData(), 1, ChatColor.RED + "Error collecting rewards. Try again later."), "Error", 6*9, 20*3, getGui()).openInventory();
|
||||
}
|
||||
|
||||
UtilPlayer.message(getPlayer(), F.main("Carl", "Error collecting tips. Try again later."));
|
||||
UtilPlayer.message(getPlayer(), F.main("Carl", "Error collecting rewards. Try again later."));
|
||||
getPlayer().playSound(getPlayer().getLocation(), Sound.ENDERDRAGON_GROWL, 1, 10);
|
||||
}
|
||||
|
||||
@ -133,9 +133,9 @@ public class ClaimTipsButton implements GuiItem, Listener
|
||||
if (isAvailable())
|
||||
{
|
||||
material = Material.EMERALD;
|
||||
itemName = C.cGreen + C.Bold + "Amplifier Tips";
|
||||
itemName = C.cGreen + C.Bold + "Amplifier Thanks";
|
||||
lore.add(" ");
|
||||
lore.add(C.cYellow + "Your Tips");
|
||||
lore.add(C.cYellow + "Your Thanks");
|
||||
lore.add(" " + C.cWhite + getTips() + " Treasure Shards");
|
||||
lore.add(" ");
|
||||
lore.add(ChatColor.RESET + "Click to Claim!");
|
||||
@ -143,7 +143,7 @@ public class ClaimTipsButton implements GuiItem, Listener
|
||||
else
|
||||
{
|
||||
material = Material.REDSTONE_BLOCK;
|
||||
itemName = C.cRed + C.Bold + "Amplifier Tips";
|
||||
itemName = C.cRed + C.Bold + "Amplifier Thanks";
|
||||
|
||||
lore.add(" ");
|
||||
lore.add(C.Reset + "Activate Game Amplifiers to receive tips");
|
||||
|
@ -25,7 +25,7 @@ public class BoosterTipManager extends MiniDbClientPlugin<PlayerTipData>
|
||||
|
||||
public BoosterTipManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager)
|
||||
{
|
||||
super("Booster Tips", plugin, clientManager);
|
||||
super("Amplifier Thanks", plugin, clientManager);
|
||||
|
||||
_donationManager = donationManager;
|
||||
_repository = new BoosterTipRepository(plugin);
|
||||
@ -33,7 +33,7 @@ public class BoosterTipManager extends MiniDbClientPlugin<PlayerTipData>
|
||||
|
||||
public void addTip(Player player, Booster booster, Callback<TipAddResult> callback)
|
||||
{
|
||||
if (!Recharge.Instance.use(player, "Amplifier Tip", 1000 * 60, true, false))
|
||||
if (!Recharge.Instance.use(player, "Amplifier Thanks", 1000 * 60 * 10, true, false))
|
||||
{
|
||||
callback.run(TipAddResult.ON_COOLDOWN);
|
||||
return;
|
||||
|
@ -5,9 +5,9 @@ package mineplex.core.boosters.tips;
|
||||
*/
|
||||
public enum TipAddResult
|
||||
{
|
||||
ALREADY_TIPPED_BOOSTER("You have already tipped!"),
|
||||
ALREADY_TIPPED_BOOSTER("You have already thanked this booster!"),
|
||||
INVALID_ACCOUNT_ID("Uh oh, something went wrong. Try relogging"),
|
||||
CANNOT_TIP_SELF("You can't tip yourself, silly!"),
|
||||
CANNOT_TIP_SELF("You can't thank yourself, silly!"),
|
||||
ON_COOLDOWN(null),
|
||||
SUCCESS(null);
|
||||
|
||||
|
@ -55,21 +55,21 @@ public class GameBoosterManager extends MiniPlugin
|
||||
|
||||
if (active == null)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Tip", "There is no active booster to tip!"));
|
||||
UtilPlayer.message(player, F.main("Thanks", "There is no active booster to Thank!"));
|
||||
return;
|
||||
}
|
||||
|
||||
_boosterManager.getTipManager().addTip(player, active, result -> {
|
||||
if (result == TipAddResult.SUCCESS)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Tip", "You tipped " + F.name(active.getPlayerName()) + " " + F.currency(CurrencyType.TREASURE_SHARD, BoosterTipManager.TIP_FOR_SPONSOR) + " and you got "
|
||||
UtilPlayer.message(player, F.main("Tip", "You thanked " + F.name(active.getPlayerName()) + ". They earned " + F.currency(CurrencyType.TREASURE_SHARD, BoosterTipManager.TIP_FOR_SPONSOR) + " and you got "
|
||||
+ F.currency(CurrencyType.TREASURE_SHARD, BoosterTipManager.TIP_FOR_TIPPER)) + " in return!");
|
||||
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1f, 1f);
|
||||
} else
|
||||
{
|
||||
if (result.getFriendlyMessage() != null)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Tip", result.getFriendlyMessage()));
|
||||
UtilPlayer.message(player, F.main("Thanks", result.getFriendlyMessage()));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -81,10 +81,10 @@ public class GameBoosterManager extends MiniPlugin
|
||||
Booster booster = event.getBooster();
|
||||
if (event.getBoosterGroup().equals(_boosterGroup))
|
||||
{
|
||||
Bukkit.broadcastMessage(F.main("Booster", F.name(booster.getPlayerName()) + " has activated a booster for " + booster.getMultiplier() + "x Gems!"));
|
||||
Bukkit.broadcastMessage(F.main("Amplifier", F.name(booster.getPlayerName()) + " has activated an Amplifier for " + booster.getMultiplier() + "x Gems!"));
|
||||
} else
|
||||
{
|
||||
Bukkit.broadcastMessage(F.main("Booster", F.name(booster.getPlayerName()) + " has activated a booster on " + F.elem(event.getBoosterGroup())));
|
||||
Bukkit.broadcastMessage(F.main("Amplifier", F.name(booster.getPlayerName()) + " has activated an Amplifier on " + F.elem(event.getBoosterGroup())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user