Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Cheese 2015-10-08 12:05:51 +11:00
commit f28d83cbd7
3 changed files with 56 additions and 56 deletions

View File

@ -132,8 +132,8 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
private int _visualTick;
// Streak
private StreakRecord _dailyStreak;
private StreakRecord _voteStreak;
// private StreakRecord _dailyStreak;
// private StreakRecord _voteStreak;
private ArrayList<String> _voteList;
@ -220,7 +220,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
new VoteHandler(this));
updateOffSet();
updateStreakRecord();
// updateStreakRecord();
}
@Override
@ -240,45 +240,45 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
updateOffSet();
}
@EventHandler
public void updateStreak(UpdateEvent event)
{
if (event.getType() != UpdateType.MIN_16)
return;
updateStreakRecord();
}
private void updateStreakRecord()
{
_repository.getDailyStreakRecord(new Callback<StreakRecord>()
{
@Override
public void run(StreakRecord data)
{
_dailyStreak = data;
}
});
_repository.getVoteStreakRecord(new Callback<StreakRecord>()
{
@Override
public void run(StreakRecord data)
{
_voteStreak = data;
}
});
}
public StreakRecord getDailyStreak()
{
return _dailyStreak;
}
public StreakRecord getVoteStreak()
{
return _voteStreak;
}
// @EventHandler
// public void updateStreak(UpdateEvent event)
// {
// if (event.getType() != UpdateType.MIN_16)
// return;
//
// updateStreakRecord();
// }
//
// private void updateStreakRecord()
// {
// _repository.getDailyStreakRecord(new Callback<StreakRecord>()
// {
// @Override
// public void run(StreakRecord data)
// {
// _dailyStreak = data;
// }
// });
//
// _repository.getVoteStreakRecord(new Callback<StreakRecord>()
// {
// @Override
// public void run(StreakRecord data)
// {
// _voteStreak = data;
// }
// });
// }
//
// public StreakRecord getDailyStreak()
// {
// return _dailyStreak;
// }
//
// public StreakRecord getVoteStreak()
// {
// return _voteStreak;
// }
public void handleVote(final Player player, final int gemsReceived)
{

View File

@ -160,13 +160,13 @@ public class DailyBonusButton implements GuiItem, Listener
}
}
StreakRecord streakRecord = _bonusManager.getDailyStreak();
if (streakRecord != null)
{
lore.add(" ");
lore.add(C.cYellow + "Record: " + C.cWhite + streakRecord.getPlayerName());
lore.add(C.cYellow + "Streak: " + C.cWhite + streakRecord.getStreak());
}
// StreakRecord streakRecord = _bonusManager.getDailyStreak();
// if (streakRecord != null)
// {
// lore.add(" ");
// lore.add(C.cYellow + "Record: " + C.cWhite + streakRecord.getPlayerName());
// lore.add(C.cYellow + "Streak: " + C.cWhite + streakRecord.getStreak());
// }
_item = new ShopItem(material, itemName, lore.toArray(new String[0]), 1, false, false);

View File

@ -145,13 +145,13 @@ public class VoteButton implements GuiItem, Listener {
lore.add(" ");
lore.add(C.cYellow + "Highest Streak: " + C.cWhite + client.getMaxVoteStreak());
StreakRecord streakRecord = _bonusManager.getVoteStreak();
if (streakRecord != null)
{
lore.add(" ");
lore.add(C.cYellow + "Record: " + C.cWhite + streakRecord.getPlayerName());
lore.add(C.cYellow + "Streak: " + C.cWhite + streakRecord.getStreak());
}
// StreakRecord streakRecord = _bonusManager.getVoteStreak();
// if (streakRecord != null)
// {
// lore.add(" ");
// lore.add(C.cYellow + "Record: " + C.cWhite + streakRecord.getPlayerName());
// lore.add(C.cYellow + "Streak: " + C.cWhite + streakRecord.getStreak());
// }
_item = new ShopItem(material, itemName, lore.toArray(new String[0]), 1, false, false);
}