CommandHandler.sendMessage(sender,"The user with an id of '"+args.get(0)+"' does not exist");
return;
}
}
mailBeingConstructed.put(senderId,mailBuilder);
CommandHandler.sendMessage(sender,"Starting composition of message.\nPlease use `/sendmail <title>` to continue.\nYou can use `/sendmail stop` at any time");
CommandHandler.sendMessage(sender,"Message sent to all users!");
}
mailBeingConstructed.remove(senderId);
}else{
CommandHandler.sendMessage(sender,"Message composition not at final stage.\nPlease use `/sendmail "+getConstructionArgs(mailBuilder.constructionStage)+"` or `/sendmail stop` to cancel");
}
return;
case"help":
CommandHandler.sendMessage(sender,"Please use `/sendmail "+getConstructionArgs(mailBuilder.constructionStage)+"`");
CommandHandler.sendMessage(sender,String.format("Attached %s of %s (level %s) to the message.\nContinue adding more items or use `/sendmail finish` to send the message.",amount,item,lvl));
}
break;
}
}else{
CommandHandler.sendMessage(sender,"Invalid arguments \n Please use `/sendmail "+getConstructionArgs(mailBuilder.constructionStage));
if(message.stateValue==1){// Make sure it isn't a gift
if(message.stateValue==1){// Make sure it isn't a gift
if(message.expireTime<Instant.now().getEpochSecond()){// Make sure the message isn't expired (The game won't show expired mail, but I don't want to send unnecessary information).
Grasscutter.getLogger().info("a");
if(message.expireTime>(int)Instant.now().getEpochSecond()){// Make sure the message isn't expired (The game won't show expired mail, but I don't want to send unnecessary information).
Grasscutter.getLogger().info("b");
if(mailDataList.size()<=1000){// Make sure that there isn't over 1000 messages in the mailbox. (idk what will happen if there is but the game probably won't like it.)
if(mailDataList.size()<=1000){// Make sure that there isn't over 1000 messages in the mailbox. (idk what will happen if there is but the game probably won't like it.)