From cc9c14329b65aecae796b90c54968eea46be07a3 Mon Sep 17 00:00:00 2001 From: Hamza Ali Date: Wed, 1 Apr 2020 14:12:54 +0700 Subject: [PATCH] fix AOOBE with return statement if no arguments provided --- src/main/kotlin/pw/hamzantal/bloodmoon/BloodMoon.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/pw/hamzantal/bloodmoon/BloodMoon.kt b/src/main/kotlin/pw/hamzantal/bloodmoon/BloodMoon.kt index 6d7812a..ae14121 100644 --- a/src/main/kotlin/pw/hamzantal/bloodmoon/BloodMoon.kt +++ b/src/main/kotlin/pw/hamzantal/bloodmoon/BloodMoon.kt @@ -40,8 +40,8 @@ class BloodMoon : JavaPlugin(), Listener { command("bloodmoon") { sender, args -> if (args.isEmpty()) - if (BMData.running) sender.msg("&c&lThe Blood Moon is Active!\n&7${BMData.ticksLeft() / 20} seconds left.") - else sender.msg("&a&lThe Blood Moon is not currently active.") + return@command (if (BMData.running) sender.msg("&c&lThe Blood Moon is Active!\n&7${BMData.ticksLeft() / 20} seconds left.") + else sender.msg("&a&lThe Blood Moon is not currently active.")) if (!sender.hasPermission("bloodmoon.admin") && !sender.isOp) { sender.msg("&cNo permission!")