From 1a5f9683c2154c6a5c9052429f64bd07729d29b0 Mon Sep 17 00:00:00 2001 From: Luck Date: Thu, 12 Oct 2017 20:21:49 +0100 Subject: [PATCH] Fix build (whoops) --- .../common/commands/impl/misc/InfoCommand.java | 15 ++++++--------- .../luckperms/common/plugin/LuckPermsPlugin.java | 4 ++-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/InfoCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/InfoCommand.java index 98ff1c2e..11d6135f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/InfoCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/InfoCommand.java @@ -40,7 +40,6 @@ import me.lucko.luckperms.common.plugin.LuckPermsPlugin; import me.lucko.luckperms.common.utils.DateUtil; import me.lucko.luckperms.common.utils.Predicates; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -83,14 +82,12 @@ public class InfoCommand extends SingleCommand { plugin.getCalculatorFactory().getActiveProcessors().stream().collect(Collectors.joining(", ")) ); - LinkedHashMap platformInfo = plugin.getExtraInfo(); - if (platformInfo == null || platformInfo.isEmpty()) { - return CommandResult.SUCCESS; - } - - Message.EMPTY.send(sender, "&f- &bPlatform Info:"); - for (Map.Entry e : platformInfo.entrySet()) { - Message.EMPTY.send(sender, "&f- &3" + e.getKey() + ": " + formatValue(e.getValue().toString())); + Map platformInfo = plugin.getExtraInfo(); + if (!platformInfo.isEmpty()) { + Message.EMPTY.send(sender, "&f- &bPlatform Info:"); + for (Map.Entry e : platformInfo.entrySet()) { + Message.EMPTY.send(sender, "&f- &3" + e.getKey() + ": " + formatValue(e.getValue().toString())); + } } return CommandResult.SUCCESS; diff --git a/common/src/main/java/me/lucko/luckperms/common/plugin/LuckPermsPlugin.java b/common/src/main/java/me/lucko/luckperms/common/plugin/LuckPermsPlugin.java index 32d9c155..c2a545bf 100644 --- a/common/src/main/java/me/lucko/luckperms/common/plugin/LuckPermsPlugin.java +++ b/common/src/main/java/me/lucko/luckperms/common/plugin/LuckPermsPlugin.java @@ -376,10 +376,10 @@ public interface LuckPermsPlugin { /** * Gets a map of extra information to be shown in the info command * - * @return a map of options, or null + * @return a map of options */ default Map getExtraInfo() { - return null; + return Collections.emptyMap(); } /**