Начинающий
- Статус
- Оффлайн
- Регистрация
- 25 Сен 2024
- Сообщения
- 30
- Реакции
- 0
- Выберите загрузчик игры
- Forge
- Fabric
знаю легко написать но сливаю для чайников
BindCommponent:
package fun.mendix.base.comand.impl;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import fun.mendix.Mendix;
import fun.mendix.base.comand.api.CommandAbstract;
import fun.mendix.client.modules.api.Module;
import fun.mendix.utility.game.other.MessageUtil;
import net.minecraft.command.CommandSource;
import net.minecraft.util.Formatting;
import ru.nexusguard.protection.annotations.Native;
public class BindCommand extends CommandAbstract {
public BindCommand() {
super("bind");
}
@Native
public void execute(LiteralArgumentBuilder<CommandSource> builder) {
builder.then(literal("clear").executes((context) -> {
int clearedCount = 0;
for (Module module : Mendix.getInstance().getModuleManager().getModules()) {
if (module.getKeyCode() != -1) {
module.setKeyCode(-1);
clearedCount++;
}
}
String var10000 = String.valueOf(Formatting.GRAY);
MessageUtil.displayInfo(var10000 + "Очистил бинды: " + String.valueOf(Formatting.WHITE) + clearedCount);
return 1;
}));
}
}