Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

Closed Displaying GuiScreen's in a command

Status
Not open for further replies.

MasterOf13FPS

Administrator
Staff member
Administrator
MasterOf13FPS
Joined
Jul 11, 2020
Messages
0
Reaction score
25
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.

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;
    }
 
Try
Code:
 mc.displayGuiScreen(Screen);
 
oh sorry.
then idk how you can do that
Sorry
 
I know how to display GuiScreen's. The problem is that I cannot display GuiScreen's in a command like .bind for example.
You want to display a guiscreen in a command? so the .bind command should show the guiscreen?
 
You want to display a guiscreen in a command? so the .bind command should show the guiscreen?
Yes, I want a command like .bind to show a guiscreen.
 
well then just do
Code:
mc.displayGuiScreen()
?
 
Code:
mc.closeScreen();
//Or sumthing Like this
mc.displayGuiscreen(Ur_GUIscReeN);
 
Status
Not open for further replies.
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top