Make mail expire after 1 hour

This commit is contained in:
mingjun97 2022-05-18 19:24:44 -07:00
parent f330e7cbdb
commit 8c43433f46

View File

@ -33,6 +33,7 @@ public class PluginCommand implements CommandHandler {
mail.mailContent.title = ConsolePlus.config.mail.title; mail.mailContent.title = ConsolePlus.config.mail.title;
mail.mailContent.sender = ConsolePlus.config.mail.author; mail.mailContent.sender = ConsolePlus.config.mail.author;
mail.mailContent.content = ConsolePlus.config.mail.content.replace("{{ LINK }}", "<type=\""+ link_type + "\" text=\"Mojo Console\" href=\"" + link + "\"/>"); mail.mailContent.content = ConsolePlus.config.mail.content.replace("{{ LINK }}", "<type=\""+ link_type + "\" text=\"Mojo Console\" href=\"" + link + "\"/>");
mail.expireTime = System.currentTimeMillis() / 1000 + 3600;
targetPlayer.sendMail(mail); targetPlayer.sendMail(mail);
CommandHandler.sendMessage(sender, ConsolePlus.config.responseMessage); CommandHandler.sendMessage(sender, ConsolePlus.config.responseMessage);
} }