- Joined
- Jul 11, 2020
- Messages
- 0
- Reaction score
- 26
- Points
- 0
Is there any way to display GuiScreen's in a command? i have tried Minecraft.getMinecraft().setIngameFocus();
and other methods but they do not work.
and other methods but they do not work.
Code:
public boolean processCommand(String rawMessage) {
if (!rawMessage.startsWith(prefix)) {
return false;
}
boolean safe = rawMessage.split(prefix).length > 1;
if (safe) {
String beheaded = rawMessage.split(prefix)[1];
String[] args = beheaded.split(" ");
Command command = getCommand(args[0]);
if (command != null) {
if (!command.run(args)) {
Client.INSTANCE.sendChatMessage(command.usage());
}
} else {
Client.INSTANCE.sendChatMessage("Try -help.");
}
} else {
Client.INSTANCE.sendChatMessage("Try -help.");
}
return true;
}