Enable tips in bonus gui
This commit is contained in:
parent
8bf26dbc11
commit
08e47b4b1b
@ -122,7 +122,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
|
||||
private RewardManager _rewardManager;
|
||||
private StatsManager _statsManager;
|
||||
private FacebookManager _facebookManager;
|
||||
// private BoosterManager _boosterManager;
|
||||
private BoosterManager _boosterManager;
|
||||
public boolean _enabled;
|
||||
private Npc _carlNpc;
|
||||
private AnimationCarl _animation;
|
||||
@ -161,7 +161,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
|
||||
updateOffSet();
|
||||
}
|
||||
|
||||
public BonusManager(JavaPlugin plugin, CoreClientManager clientManager, ServerStatusManager statusManager, DonationManager donationManager, PollManager pollManager, NpcManager npcManager, HologramManager hologramManager, StatsManager statsManager, InventoryManager inventoryManager, PetManager petManager, FacebookManager facebookManager, GadgetManager gadgetManager)
|
||||
public BonusManager(JavaPlugin plugin, CoreClientManager clientManager, ServerStatusManager statusManager, DonationManager donationManager, PollManager pollManager, NpcManager npcManager, HologramManager hologramManager, StatsManager statsManager, InventoryManager inventoryManager, PetManager petManager, FacebookManager facebookManager, GadgetManager gadgetManager, BoosterManager boosterManager)
|
||||
{
|
||||
super("Bonus", plugin);
|
||||
_repository = new BonusRepository(plugin, this, donationManager);
|
||||
@ -170,6 +170,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
|
||||
_npcManager = npcManager;
|
||||
_hologramManager = hologramManager;
|
||||
_inventoryManager = inventoryManager;
|
||||
_boosterManager = boosterManager;
|
||||
|
||||
_rewardManager = new RewardManager(_clientManager, _donationManager, _inventoryManager, petManager, statsManager, gadgetManager);
|
||||
|
||||
@ -823,7 +824,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
|
||||
if (entity.equals(_carlNpc.getEntity()))
|
||||
{
|
||||
updateDailyStreak(event.getPlayer());
|
||||
new BonusGui(_plugin, event.getPlayer(), this, _rewardManager, _facebookManager).openInventory();
|
||||
new BonusGui(_plugin, event.getPlayer(), this, _rewardManager, _facebookManager, _boosterManager).openInventory();
|
||||
}
|
||||
}
|
||||
|
||||
@ -839,7 +840,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
|
||||
if (event.getEntity().equals(_carlNpc.getEntity()))
|
||||
{
|
||||
updateDailyStreak(player);
|
||||
new BonusGui(_plugin, player, this, _rewardManager, _facebookManager).openInventory();
|
||||
new BonusGui(_plugin, player, this, _rewardManager, _facebookManager, _boosterManager).openInventory();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -905,7 +906,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
|
||||
if (canDaily(player)) availableRewards++;
|
||||
if (getPollManager().getNextPoll(_pollManager.Get(player), _clientManager.Get(player).GetRank()) != null) availableRewards++;
|
||||
if (!_facebookManager.hasRedeemed(player)) availableRewards++;
|
||||
// if (_boosterManager.getTipManager().Get(player).getTips() > 0) availableRewards++;
|
||||
if (_boosterManager.getTipManager().Get(player).getTips() > 0) availableRewards++;
|
||||
|
||||
Hologram hologram;
|
||||
|
||||
@ -1183,4 +1184,9 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
|
||||
{
|
||||
return "SELECT * FROM bonus WHERE accountId = '" + accountId + "';";
|
||||
}
|
||||
|
||||
public BoosterManager getBoosterManager()
|
||||
{
|
||||
return _boosterManager;
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@ public class GuiCommand extends CommandBase<BonusManager>
|
||||
@Override
|
||||
public void Execute(Player caller, String[] args)
|
||||
{
|
||||
new BonusGui(Plugin.getPlugin(), caller, Plugin, Plugin.getRewardManager(), Plugin.getFacebookManager()).openInventory();
|
||||
new BonusGui(Plugin.getPlugin(), caller, Plugin, Plugin.getRewardManager(), Plugin.getFacebookManager(), Plugin.getBoosterManager()).openInventory();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,23 +15,23 @@ public class BonusGui extends SimpleGui
|
||||
|
||||
private BonusManager manager;
|
||||
|
||||
public BonusGui(Plugin plugin, Player player, BonusManager manager, RewardManager rewardManager, FacebookManager facebookManager)
|
||||
public BonusGui(Plugin plugin, Player player, BonusManager manager, RewardManager rewardManager, FacebookManager facebookManager, BoosterManager boosterManager)
|
||||
{
|
||||
super(plugin, player, player.getName() + "'s Bonuses", 5 * 9);
|
||||
|
||||
this.manager = manager;
|
||||
|
||||
setItem(9, new VoteButton(plugin, player, this, manager));
|
||||
setItem(10, new VoteButton(plugin, player, this, manager));
|
||||
|
||||
setItem(11, new RankBonusButton(getPlugin(), player, this, manager));
|
||||
setItem(12, new RankBonusButton(getPlugin(), player, this, manager));
|
||||
|
||||
setItem(13, new DailyBonusButton(getPlugin(), player, this, manager));
|
||||
setItem(14, new DailyBonusButton(getPlugin(), player, this, manager));
|
||||
|
||||
setItem(15, new PollButton(getPlugin(), player, manager.getPollManager(), manager.getClientManager(), this, manager));
|
||||
setItem(16, new PollButton(getPlugin(), player, manager.getPollManager(), manager.getClientManager(), this, manager));
|
||||
|
||||
setItem(17, new FacebookButton(player, facebookManager));
|
||||
setItem(20, new FacebookButton(player, facebookManager));
|
||||
|
||||
// setItem(19, new ClaimTipsButton(getPlugin(), player, this, manager, boosterManager));
|
||||
setItem(24, new ClaimTipsButton(getPlugin(), player, this, manager, boosterManager));
|
||||
|
||||
setItem(31, new CarlSpinButton(getPlugin(), player, manager, rewardManager));
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
_gadgetManager = new GadgetManager(_plugin, clientManager, donationManager, _inventoryManager, _mountManager, petManager, preferences, disguiseManager, blockRestore, new ProjectileManager(plugin), achievementManager, packetHandler, hologramManager);
|
||||
|
||||
FacebookManager facebookManager = new FacebookManager(plugin, clientManager, donationManager, inventoryManager);
|
||||
_bonusManager = new BonusManager(plugin, clientManager, serverStatusManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager, facebookManager, _gadgetManager);
|
||||
_bonusManager = new BonusManager(plugin, clientManager, serverStatusManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager, facebookManager, _gadgetManager, boosterManager);
|
||||
|
||||
_treasureManager = new TreasureManager(_plugin, clientManager, serverStatusManager, donationManager, _inventoryManager, petManager, _blockRestore, hologramManager, statsManager, _bonusManager.getRewardManager());
|
||||
new CosmeticManager(_plugin, clientManager, donationManager, _inventoryManager, _gadgetManager, _mountManager, petManager, _treasureManager, boosterManager);
|
||||
|
@ -307,7 +307,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
_gameTournamentManager = new GameTournamentManager(this);
|
||||
new GameStatManager(this);
|
||||
FacebookManager facebookManager = new FacebookManager(plugin, clientManager, donationManager, inventoryManager);
|
||||
_bonusManager = new BonusManager(plugin, clientManager, serverStatusManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager, facebookManager, _cosmeticManager.getGadgetManager());
|
||||
_bonusManager = new BonusManager(plugin, clientManager, serverStatusManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager, facebookManager, _cosmeticManager.getGadgetManager(), boosterManager);
|
||||
new GameLootManager(this, petManager, _bonusManager.getRewardManager());
|
||||
new GameSpectatorManager(this);
|
||||
_gameWorldManager = new GameWorldManager(this);
|
||||
|
Loading…
Reference in New Issue
Block a user