Fixes #1794: Hides error message if no MOTD present (#1811)

* Fixes #1794
This commit is contained in:
Johnny Cao 2018-01-31 17:01:51 -08:00 committed by Trent Hensler
parent fb5ebdb0c2
commit e4a8222d48
1 changed files with 1 additions and 1 deletions

View File

@ -334,7 +334,7 @@ public class EssentialsPlayerListener implements Listener {
final IText input = tempInput;
if (input != null && user.isAuthorized("essentials.motd")) {
if (input != null && !input.getLines().isEmpty() && user.isAuthorized("essentials.motd")) {
final IText output = new KeywordReplacer(input, user.getSource(), ess);
final TextPager pager = new TextPager(output, true);
pager.showPage("1", null, "motd", user.getSource());