public class VipCommand extends Command
{
private static final String VIP_FORMAT = "Multiplication factor: %d; Total accumulated days of current VIP: %d; Last drawing claimed of current VIP: %s (No.%d); Remaining time of current VIP: %s";
+ private static final String PERMANENT_VIP_FORMAT = "Congratulations, your colored vhost is permanent! Last drawing claimed of current VIP: %s (No.%d)";
public VipCommand()
{
return;
}
- Duration remaining = Duration.between(LocalDateTime.now(), user.getObtained().plusDays(user.getDays()));
- String remainingTime = Util.fTime((int) remaining.getSeconds());
+ if (user.isPermanent())
+ {
+ Acidictive.reply(source, to, c, String.format(
+ PERMANENT_VIP_FORMAT,
+ user.getObtained(),
+ user.getObtainedId()));
+ }
+ else
+ {
+ Duration remaining = Duration.between(LocalDateTime.now(), user.getObtained().plusDays(user.getDays()));
+ String remainingTime = Util.fTime((int) remaining.getSeconds());
- Acidictive.reply(source, to, c, String.format(
- VIP_FORMAT,
- user.getMultiplier(),
- user.getDays(),
- user.getObtained(),
- user.getObtainedId(),
- remainingTime));
+ Acidictive.reply(source, to, c, String.format(
+ VIP_FORMAT,
+ user.getMultiplier(),
+ user.getDays(),
+ user.getObtained(),
+ user.getObtainedId(),
+ remainingTime));
+ }
}
}