From 2376e8f4fd8a051a95db1edd88160e441999a628 Mon Sep 17 00:00:00 2001 From: Pepich Date: Sun, 11 Jun 2017 19:54:34 +0200 Subject: [PATCH] Fixed getMotd throwing NPE --- src/com/redstoner/modules/motd/Motd.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/redstoner/modules/motd/Motd.java b/src/com/redstoner/modules/motd/Motd.java index 95e578f..a365413 100644 --- a/src/com/redstoner/modules/motd/Motd.java +++ b/src/com/redstoner/modules/motd/Motd.java @@ -12,7 +12,7 @@ import com.redstoner.misc.Utils; import com.redstoner.modules.Module; @AutoRegisterListener -@Version(major = 2, minor = 0, revision = 1, compatible = 2) +@Version(major = 2, minor = 0, revision = 2, compatible = 2) public class Motd implements Module { private String default_motd, motd; @@ -31,7 +31,7 @@ public class Motd implements Module @Command(hook = "getmotd") public boolean getMotd(CommandSender sender) { - Utils.sendMessage(sender, null, motd, '&'); + Utils.sendMessage(sender, null, motd == null ? default_motd : motd, '&'); return true; }