package com.example.commands;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import net.minecraft.command.CommandSource;
import net.minecraft.server.command.ServerCommandSource;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import org.jetbrains.annotations.NotNull;
import thunder.hack.ThunderHack;
import thunder.hack.cmd.Command;
import java.util.concurrent.atomic.AtomicBoolean;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
public abstract class ExampleCommand extends Command {
public ExampleCommand() {
super("help");
}
@Override
public void executeBuild(@NotNull LiteralArgumentBuilder<CommandSource> builder) {
builder.executes(context -> {
sendMessage("Commands: \n");
AtomicBoolean flip = new AtomicBoolean(false);
ThunderHack.commandManager.getCommands().forEach(command -> {
context.getSource().getPlayer().sendMessage(Text.of(
(flip.get() ? Formatting.LIGHT_PURPLE : Formatting.DARK_PURPLE)
+ ThunderHack.commandManager.getPrefix()
+ (flip.get() ? Formatting.AQUA : Formatting.DARK_AQUA)
+ command.getName()
+ (command.getAliases().isEmpty() ? "" : " (" + command.getAliases() + ")")
+ Formatting.DARK_GRAY + " -> "
+ (flip.get() ? Formatting.WHITE : Formatting.GRAY)
+ command.getDescription()
));
flip.set(!flip.get());
}
);
return SINGLE_SUCCESS;
});
}
}
#Type erasure issues
22 messages · Page 1 of 1 (latest)
I have this command
and its superclass
Command
is from a different mod
heres the code for the superclass
hey one quick question, is this code supposed to be for some kind of hacked client? just curious
Utility mod 😉
We do not support hacked clients, cheats, or modifications that are intended to give you the upper hand in a server, competitive or otherwise.
See rule 1 in #welcome and the Discord TOS: https://discordapp.com/terms
sorry man
🤷♂️
I dont think that rule applies for this
there is no part of this that gives you and upper hand
its just a command
oh cmon