mirror of
https://github.com/Coloryr/AllMusic.git
synced 2026-11-26 17:22:55 +00:00
1 parent
fe18a2b64a
commit
3a705fa351
32 files changed
+215
-107
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package com.coloryr.allmusic.server.core.command.sub;
|
||||
|
||||
import com.coloryr.allmusic.server.core.AllMusic;
|
||||
import com.coloryr.allmusic.server.core.command.ICommand;
|
||||
import com.coloryr.allmusic.server.core.sql.Cache;
|
||||
import com.coloryr.allmusic.server.core.sql.DataSql;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class CommandUnbanPlayer implements ICommand {
|
||||
@Override
|
||||
public void execute(Object sender, String name, String[] args) {
|
||||
if (args.length != 2) {
|
||||
AllMusic.side.sendMessage(sender, AllMusic.getMessage().command.error);
|
||||
return;
|
||||
}
|
||||
DataSql.removeBanPlayer(args[1]);
|
||||
AllMusic.side.sendMessage(sender, "§d[AllMusic3]§2已解封玩家" + args[1] + "点歌");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> tab(Object player, String name, String[] args, int index) {
|
||||
if (args.length == index || (args.length == index + 1 )) {
|
||||
return new ArrayList<>(Cache.banPlayers);
|
||||
}
|
||||
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user