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