Make Power Play status clearer on support server
This commit is contained in:
parent
8ebad90f52
commit
8e7ae7f55f
@ -2,7 +2,9 @@ package mineplex.staffServer.customerSupport;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.YearMonth;
|
||||
import java.time.format.TextStyle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashSet;
|
||||
@ -124,9 +126,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
||||
_repository.loadBonusLogForAccountId(client.getAccountId(), instance);
|
||||
|
||||
PowerPlayData powerPlayData = _powerPlayRepo.loadData(client.getAccountId()).join();
|
||||
boolean powerPlaySub = powerPlayData.isSubscribed();
|
||||
boolean powerPlayClaim = powerPlaySub && !powerPlayData.getUnclaimedMonths().contains(YearMonth.now());
|
||||
|
||||
|
||||
runSync(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
@ -338,8 +338,14 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
||||
caller.sendMessage(C.cBlue + "Clan Banner Usage: " + getLockedFreedomStr(client.getUniqueId(), "Clan Banner Usage"));
|
||||
caller.sendMessage(C.cBlue + "Clan Banner Editor: " + getLockedFreedomStr(client.getUniqueId(), "Clan Banner Editor"));
|
||||
caller.sendMessage(C.cDGreen + C.Strike + "=============================================");
|
||||
caller.sendMessage(C.cBlue + "Power Play Subscription (" + Calendar.getInstance().getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.getDefault()) + "): " + (powerPlaySub ? C.cGreen + "Active" : C.cRed + "Inactive"));
|
||||
caller.sendMessage(C.cBlue + "Power Play Monthly Reward (" + Calendar.getInstance().getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.getDefault()) + "): " + (powerPlayClaim ? C.cRed + "Unavailable" : C.cGreen + "Available"));
|
||||
YearMonth yearMonth = YearMonth.now();
|
||||
caller.sendMessage(C.cBlue + "Power Play Subscription (" + yearMonth.getMonth().getDisplayName(TextStyle.FULL, Locale.US) + ") " + (powerPlayData.isSubscribed() ? C.cGreen + "Active" : C.cRed + "Inactive"));
|
||||
if (powerPlayData.isSubscribed())
|
||||
{
|
||||
caller.sendMessage(C.cBlue + "Power Play Chest/Amplifiers (" + yearMonth.getMonth().getDisplayName(TextStyle.FULL, Locale.US) + ") " + (powerPlayData.getUnclaimedMonths().contains(YearMonth.now()) ? C.cGreen + "Unclaimed" : C.cRed + "Claimed"));
|
||||
LocalDate nextClaimDate = powerPlayData.getNextClaimDate().get(); // Guaranteed by isSubscribed()
|
||||
caller.sendMessage(C.cBlue + "Power Play Next Claim Date " + C.cYellow + nextClaimDate.getMonth().getDisplayName(TextStyle.FULL, Locale.US) + " " + nextClaimDate.getDayOfMonth());
|
||||
}
|
||||
|
||||
_accountBonusLog.remove(client.getAccountId());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user