Fix build (whoops)

This commit is contained in:
Luck 2017-10-12 20:21:49 +01:00
parent 3b74d55442
commit 1a5f9683c2
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 8 additions and 11 deletions

View File

@ -40,7 +40,6 @@ import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
import me.lucko.luckperms.common.utils.DateUtil; import me.lucko.luckperms.common.utils.DateUtil;
import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.common.utils.Predicates;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -83,15 +82,13 @@ public class InfoCommand extends SingleCommand {
plugin.getCalculatorFactory().getActiveProcessors().stream().collect(Collectors.joining(", ")) plugin.getCalculatorFactory().getActiveProcessors().stream().collect(Collectors.joining(", "))
); );
LinkedHashMap<String, Object> platformInfo = plugin.getExtraInfo(); Map<String, Object> platformInfo = plugin.getExtraInfo();
if (platformInfo == null || platformInfo.isEmpty()) { if (!platformInfo.isEmpty()) {
return CommandResult.SUCCESS;
}
Message.EMPTY.send(sender, "&f- &bPlatform Info:"); Message.EMPTY.send(sender, "&f- &bPlatform Info:");
for (Map.Entry<String, Object> e : platformInfo.entrySet()) { for (Map.Entry<String, Object> e : platformInfo.entrySet()) {
Message.EMPTY.send(sender, "&f- &3" + e.getKey() + ": " + formatValue(e.getValue().toString())); Message.EMPTY.send(sender, "&f- &3" + e.getKey() + ": " + formatValue(e.getValue().toString()));
} }
}
return CommandResult.SUCCESS; return CommandResult.SUCCESS;
} }

View File

@ -376,10 +376,10 @@ public interface LuckPermsPlugin {
/** /**
* Gets a map of extra information to be shown in the info command * 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<String, Object> getExtraInfo() { default Map<String, Object> getExtraInfo() {
return null; return Collections.emptyMap();
} }
/** /**