Fix blacklist model to reflect db changes
This commit is contained in:
1 parent
3bccd6ce5a
commit
6e1f4c2027
7 files changed
+9
-20
No files matched your search
@@ -13,6 +13,11 @@ import netneutrality.MusicBot;
|
||||
|
||||
public abstract class AbstractMusicCommand extends AbstractCommand {
|
||||
|
||||
@Override
|
||||
public boolean needAdmin() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandType getType() {
|
||||
return CommandType.MUSIC;
|
||||
|
||||
@@ -14,10 +14,6 @@ import netneutrality.command.Visibility;
|
||||
import netneutrality.music.MusicManager;
|
||||
|
||||
public class BitconnectCommand extends AbstractMusicCommand {
|
||||
@Override
|
||||
public boolean needAdmin() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
|
||||
@@ -14,10 +14,6 @@ import netneutrality.command.Visibility;
|
||||
import netneutrality.music.MusicManager;
|
||||
|
||||
public class JoinCommand extends AbstractMusicCommand {
|
||||
@Override
|
||||
public boolean needAdmin() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
|
||||
@@ -14,10 +14,6 @@ import netneutrality.command.Visibility;
|
||||
import netneutrality.music.MusicManager;
|
||||
|
||||
public class PlayCommand extends AbstractMusicCommand {
|
||||
@Override
|
||||
public boolean needAdmin() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
|
||||
@@ -10,10 +10,6 @@ import netneutrality.command.AbstractMusicCommand;
|
||||
import netneutrality.command.Visibility;
|
||||
|
||||
public class VoteSkipCommand extends AbstractMusicCommand {
|
||||
@Override
|
||||
public boolean needAdmin() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
|
||||
@@ -36,13 +36,13 @@ public abstract class AbstractEntity implements EntityInterface {
|
||||
|
||||
|
||||
String sql = "SELECT * FROM " + getTableName() + " WHERE " + whereClause;
|
||||
System.out.println(sql + " - pk: " + primaryKey);
|
||||
MusicBot.logger.debug(sql + " - pk: " + primaryKey);
|
||||
|
||||
if (this.primaryKeys.length > 0)
|
||||
this.table = DBController.get().prepareAndExecuteAsync(sql, this.primaryKey, this.primaryKeys).blocking();
|
||||
else
|
||||
this.table = DBController.get().prepareAndExecuteAsync(sql, this.primaryKey).blocking();
|
||||
System.out.println(table);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,10 +17,10 @@ public class MBlacklist {
|
||||
}
|
||||
|
||||
public MBlacklist(List<Object> row) {
|
||||
this.word = (String) row.get(0);
|
||||
this.word = (String) row.get(1);
|
||||
this.enabled = (Boolean) row.get(2);
|
||||
this.creatorId = (String) row.get(3);
|
||||
this.serverId = (String) row.get(1);
|
||||
this.serverId = (String) row.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user