improved .heads
This commit is contained in:
@@ -61,7 +61,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
|
||||
commands.add(new AntiAntiXrayCommand());
|
||||
commands.add(new GiveCommand());
|
||||
commands.add(new SaveSkinCommand());
|
||||
commands.add(new ScreenCommand());
|
||||
commands.add(new HeadsCommand());
|
||||
commands.add(new ServerCommand());
|
||||
commands.add(new SetBlockCommand());
|
||||
commands.add(new TeleportCommand());
|
||||
|
||||
@@ -9,19 +9,20 @@ import minegame159.meteorclient.MeteorClient;
|
||||
import minegame159.meteorclient.gui.GuiThemes;
|
||||
import minegame159.meteorclient.systems.commands.Command;
|
||||
|
||||
public class ScreenCommand extends Command {
|
||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||
|
||||
public ScreenCommand() {
|
||||
super("screen", "Displays different screens", "gui");
|
||||
public class HeadsCommand extends Command {
|
||||
|
||||
public HeadsCommand() {
|
||||
super("heads", "Display heads gui");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
||||
builder.then(literal("heads").executes(ctx -> {
|
||||
builder.executes(ctx -> {
|
||||
MeteorClient.INSTANCE.screenToOpen = new HeadScreen(GuiThemes.get());
|
||||
|
||||
return 1;
|
||||
}));
|
||||
return SINGLE_SUCCESS;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -98,6 +98,11 @@ public class HeadScreen extends WindowScreen {
|
||||
give.action = () -> {
|
||||
addItem(head);
|
||||
};
|
||||
WButton equip = t.add(theme.button("Equip")).widget();
|
||||
equip.tooltip = "Equip client-side.";
|
||||
equip.action = () -> {
|
||||
mc.player.getInventory().armor.set(3, head);
|
||||
};
|
||||
t.row();
|
||||
}
|
||||
set();
|
||||
|
||||
Reference in New Issue
Block a user