Fixed empty inbox

This commit is contained in:
boy0001 2015-05-12 01:48:22 +10:00
parent e325abbc17
commit b8a3395d1d
2 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,10 @@ public class Inbox extends SubCommand {
}
public void displayComments(PlotPlayer player, List<PlotComment> oldComments, int page) {
if (oldComments == null || oldComments.size() == 0) {
MainUtil.sendMessage(player, C.INBOX_EMPTY);
return;
}
PlotComment[] comments = oldComments.toArray(new PlotComment[oldComments.size()]);
if (page < 0) {
page = 0;

View File

@ -119,6 +119,7 @@ public enum C {
COMMENT_REMOVED("$4Successfully deleted comment/s:n$2 - '$3%s$2'", "Comment"),
COMMENT_ADDED("$4A comment has been left", "Comment"),
COMMENT_HEADER("$2====== Comments ======", "Comment"),
INBOX_EMPTY("$2No comments","Comment"),
/*
* Console
*/