Codacy stuff

This commit is contained in:
GregTCLTK 2020-01-29 08:30:59 +01:00
parent 0b4cc1e792
commit cdff88174f
No known key found for this signature in database
GPG key ID: A91BADE5C070FF67
3 changed files with 4 additions and 5 deletions

View file

@ -41,7 +41,7 @@ public class BlacklistCommand implements Command {
if (args.length == 3) {
String blacklisted = e.getRethinkUser().getBlacklisted();
List<String> commands = new ArrayList<>();
if (!(null == blacklisted)) commands.addAll(Arrays.asList(blacklisted.split(",")));
if (null != blacklisted) commands.addAll(Arrays.asList(blacklisted.split(",")));
commands.addAll(Arrays.asList(args[1].split(",")));
LinkedHashSet<String> hashSet = new LinkedHashSet<>(commands);
@ -61,7 +61,7 @@ public class BlacklistCommand implements Command {
if (args.length == 3) {
String blacklisted = e.getRethinkUser().getBlacklisted();
List<String> commands = new ArrayList<>();
if (!(null == blacklisted)) commands.addAll(Arrays.asList(blacklisted.split(",")));
if (null != blacklisted) commands.addAll(Arrays.asList(blacklisted.split(",")));
commands.removeAll(Arrays.asList(args[1].split(",")));
LinkedHashSet<String> hashSet = new LinkedHashSet<>(commands);
@ -82,7 +82,7 @@ public class BlacklistCommand implements Command {
for (User user : e.getJDA().getUsers()) {
if (!user.getId().equals(e.getJDA().getSelfUser().getId())) {
String blacklisted = e.getRethinkUser().getBlacklisted();
if (!(null == blacklisted)) {
if (null != blacklisted) {
stringBuilder.append(user.getAsTag()).append(" (").append(user.getId()).append(") - ").append(blacklisted).append("\n");
}
}

View file

@ -19,7 +19,6 @@ package com.bbn.hadder.commands.settings;
import com.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.EmbedBuilder;
public class LanguageCommand implements Command {

View file

@ -69,7 +69,7 @@ public class CommandHandler {
boolean run = true;
String blacklisted = rethinkUser.getBlacklisted();
if (!(null == blacklisted)) {
if (null != blacklisted) {
for (String BLLabel : blacklisted.split(",")) {
if (Arrays.asList(cmd.labels()).contains(BLLabel)) {
run = false;