blob: 61e7c5290c15dcc11d4443ef46bf7a43a14257cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
package de.torui.coflsky;
import java.io.IOException;
import java.util.Arrays;
import java.util.Base64;
import java.util.List;
import de.torui.coflsky.commands.Command;
import de.torui.coflsky.commands.CommandType;
import de.torui.coflsky.commands.JsonStringCommand;
import de.torui.coflsky.commands.RawCommand;
import de.torui.coflsky.minecraft_integration.CoflSessionManager;
import de.torui.coflsky.minecraft_integration.CoflSessionManager.CoflSession;
import de.torui.coflsky.network.QueryServerCommands;
import de.torui.coflsky.network.WSClient;
import de.torui.coflsky.minecraft_integration.PlayerDataProvider;
import net.minecraft.client.Minecraft;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.event.ClickEvent;
import net.minecraft.event.ClickEvent.Action;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
public class FlipperChatCommand extends CoflSkyCommand {
@Override
public String getCommandName() {
return "fc";
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "Shorthand for /cofl chat";
}
@Override
public void processCommand(ICommandSender sender, String[] args) throws CommandException {
new Thread(()->{
String[] newArgs = new String[args.length +1];
System.arraycopy(args, 0, newArgs, 1, args.length);
newArgs[0] = "chat";
SendCommandToServer(newArgs, sender);
}).start();
}
}
|