Probably finished /discord command

This commit is contained in:
Norbi Peti 2016-10-29 22:22:45 +02:00
parent e6829fb7c9
commit 7cd3a9c85e
2 changed files with 3 additions and 21 deletions

View file

@ -1,11 +1,7 @@
package buttondevteam.discordplugin.mccommands; package buttondevteam.discordplugin.mccommands;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import buttondevteam.discordplugin.DiscordPlayer;
import buttondevteam.discordplugin.commands.ConnectCommand; import buttondevteam.discordplugin.commands.ConnectCommand;
import buttondevteam.lib.TBMCPlayer;
public class DeclineMCCommand extends DiscordMCCommandBase { public class DeclineMCCommand extends DiscordMCCommandBase {

View file

@ -1,11 +1,7 @@
package buttondevteam.discordplugin.mccommands; package buttondevteam.discordplugin.mccommands;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import buttondevteam.lib.chat.TBMCChatAPI;
import buttondevteam.discordplugin.DiscordPlayer;
import buttondevteam.discordplugin.commands.ConnectCommand;
import buttondevteam.lib.TBMCPlayer;
import buttondevteam.lib.chat.TBMCCommandBase; import buttondevteam.lib.chat.TBMCCommandBase;
public class DiscordMCCommand extends TBMCCommandBase { public class DiscordMCCommand extends TBMCCommandBase {
@ -17,12 +13,7 @@ public class DiscordMCCommand extends TBMCCommandBase {
@Override @Override
public String[] GetHelpText(String alias) { public String[] GetHelpText(String alias) {
return new String[] { // TODO return TBMCChatAPI.GetSubCommands(this);
"§6---- Decline Discord connection ----", //
"Decline a pending connection between your Discord and Minecraft account.", //
"To start the connection process, do §b@ChromaBot connect <MCname>§r in the #bot channel on Discord", //
"Usage: /" + alias + " decline" //
};
} }
@Override @Override
@ -37,12 +28,7 @@ public class DiscordMCCommand extends TBMCCommandBase {
@Override @Override
public boolean OnCommand(CommandSender sender, String alias, String[] args) { public boolean OnCommand(CommandSender sender, String alias, String[] args) {
String did = ConnectCommand.WaitingToConnect.remove(sender.getName()); return false;
if (did == null) {
sender.sendMessage("§cYou don't have a pending connection to Discord.");
return true;
}
return true;
} }
} }