Change libac package name, and integrate rcon into libac

This commit is contained in:
zontreck 2024-05-24 14:52:01 -07:00
parent ca57807ccb
commit 68130285bc
15 changed files with 58 additions and 48 deletions

View file

@ -1,7 +1,7 @@
import 'dart:io';
import 'package:libac_flutter/packets/packets.dart';
import 'package:libac_flutter/utils/IOTools.dart';
import 'package:libac_dart/packets/packets.dart';
import 'package:libac_dart/utils/IOTools.dart';
import 'package:servermanager/game.dart';
import 'package:servermanager/packets/ClientPackets.dart';
import 'package:servermanager/structs/settings.dart';

View file

@ -1,7 +1,7 @@
import 'dart:io';
import 'package:crypto/crypto.dart';
import 'package:libac_flutter/utils/IOTools.dart';
import 'package:libac_dart/utils/IOTools.dart';
import 'package:servermanager/structs/mod.dart';
import 'package:servermanager/structs/settings.dart';

View file

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:libac_flutter/packets/packets.dart';
import 'package:libac_dart/packets/packets.dart';
import 'package:servermanager/packets/ClientPackets.dart';
import 'package:servermanager/pages/Constants.dart';
import 'package:servermanager/pages/GameServerPage.dart';

View file

@ -1,14 +1,14 @@
import 'dart:convert';
import 'package:libac_flutter/nbt/NbtUtils.dart';
import 'package:libac_flutter/nbt/Stream.dart';
import 'package:libac_flutter/nbt/Tag.dart';
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
import 'package:libac_flutter/nbt/impl/StringTag.dart';
import 'package:libac_flutter/packets/packets.dart';
import 'package:libac_flutter/utils/Hashing.dart';
import 'package:libac_flutter/utils/uuid/NbtUUID.dart';
import 'package:libac_flutter/utils/uuid/UUID.dart';
import 'package:libac_dart/nbt/NbtUtils.dart';
import 'package:libac_dart/nbt/Stream.dart';
import 'package:libac_dart/nbt/Tag.dart';
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
import 'package:libac_dart/nbt/impl/StringTag.dart';
import 'package:libac_dart/packets/packets.dart';
import 'package:libac_dart/utils/Hashing.dart';
import 'package:libac_dart/utils/uuid/NbtUUID.dart';
import 'package:libac_dart/utils/uuid/UUID.dart';
import 'package:servermanager/statemachine.dart';
import 'package:servermanager/structs/SessionData.dart';
import 'package:servermanager/structs/settings.dart';

View file

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:libac_flutter/utils/TimeUtils.dart';
import 'package:libac_dart/utils/TimeUtils.dart';
import 'package:servermanager/structs/autorestarts.dart';
import 'package:servermanager/structs/settings.dart';

View file

@ -1,6 +1,6 @@
import 'dart:io';
import 'package:libac_flutter/utils/IOTools.dart';
import 'package:libac_dart/utils/IOTools.dart';
import 'package:servermanager/statemachine.dart';
import 'package:servermanager/structs/settings.dart';

View file

@ -1,8 +1,9 @@
import 'dart:async';
import 'dart:io';
import 'package:libac_flutter/packets/packets.dart';
import 'package:libac_flutter/utils/IOTools.dart';
import 'package:libac_dart/nbt/Stream.dart';
import 'package:libac_dart/packets/packets.dart';
import 'package:libac_dart/utils/IOTools.dart';
import 'package:servermanager/game.dart';
import 'package:servermanager/proton.dart';
import 'package:servermanager/structs/SessionData.dart';
@ -79,7 +80,17 @@ class StateMachine {
DeadProcKillswitch = Completer();
}
static void onStdOutData(List<int> stdOutData) {
StringBuilder builder = StringBuilder();
for (int i in stdOutData) {
builder.append(String.fromCharCode(i));
}
print(builder.toString());
}
static Future<void> monitorProcess() async {
PROC!.stdout.listen(onStdOutData);
try {
int code = await PROC!.exitCode;
DeadProcKillswitch.complete();

View file

@ -1,4 +1,4 @@
import 'package:libac_flutter/utils/TimeUtils.dart';
import 'package:libac_dart/utils/TimeUtils.dart';
import 'package:servermanager/statemachine.dart';
class SessionData {

View file

@ -1,7 +1,7 @@
import 'package:libac_flutter/nbt/NbtUtils.dart';
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
import 'package:libac_flutter/nbt/impl/IntTag.dart';
import 'package:libac_flutter/utils/TimeUtils.dart';
import 'package:libac_dart/nbt/NbtUtils.dart';
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
import 'package:libac_dart/nbt/impl/IntTag.dart';
import 'package:libac_dart/utils/TimeUtils.dart';
class AutomaticRestartInfo {
Time time = Time(hours: 0, minutes: 0, seconds: 0);

View file

@ -1,5 +1,5 @@
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
import 'package:libac_flutter/nbt/impl/StringTag.dart';
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
import 'package:libac_dart/nbt/impl/StringTag.dart';
class Credentials {
String username;

View file

@ -1,7 +1,7 @@
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
import 'package:libac_flutter/nbt/impl/LongTag.dart';
import 'package:libac_flutter/nbt/impl/StringTag.dart';
import 'package:libac_flutter/utils/uuid/UUID.dart';
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
import 'package:libac_dart/nbt/impl/LongTag.dart';
import 'package:libac_dart/nbt/impl/StringTag.dart';
import 'package:libac_dart/utils/uuid/UUID.dart';
class Mod {
String mod_name = "";

View file

@ -1,6 +1,6 @@
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
import 'package:libac_flutter/nbt/impl/IntTag.dart';
import 'package:libac_flutter/nbt/impl/StringTag.dart';
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
import 'package:libac_dart/nbt/impl/IntTag.dart';
import 'package:libac_dart/nbt/impl/StringTag.dart';
class ServerSettings {
final String RconPassword;

View file

@ -2,15 +2,15 @@ import 'dart:io';
import 'package:archive/archive.dart';
import 'package:dio/dio.dart';
import 'package:libac_flutter/nbt/NbtIo.dart';
import 'package:libac_flutter/nbt/NbtUtils.dart';
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
import 'package:libac_flutter/nbt/impl/StringTag.dart';
import 'package:libac_flutter/packets/packets.dart';
import 'package:libac_flutter/utils/IOTools.dart';
import 'package:libac_flutter/utils/uuid/NbtUUID.dart';
import 'package:libac_flutter/utils/uuid/UUID.dart';
import 'package:mc_rcon_dart/mc_rcon_dart.dart';
import 'package:libac_dart/nbt/NbtIo.dart';
import 'package:libac_dart/nbt/NbtUtils.dart';
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
import 'package:libac_dart/nbt/impl/StringTag.dart';
import 'package:libac_dart/packets/packets.dart';
import 'package:libac_dart/utils/IOTools.dart';
import 'package:libac_dart/utils/rcon/rcon_api.dart';
import 'package:libac_dart/utils/uuid/NbtUUID.dart';
import 'package:libac_dart/utils/uuid/UUID.dart';
import 'package:servermanager/statemachine.dart';
import 'package:servermanager/structs/credentials.dart';
import 'package:servermanager/structs/mod.dart';

View file

@ -1,8 +1,8 @@
import 'package:libac_flutter/nbt/NbtUtils.dart';
import 'package:libac_flutter/nbt/Tag.dart';
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
import 'package:libac_flutter/nbt/impl/ListTag.dart';
import 'package:libac_flutter/utils/TimeUtils.dart';
import 'package:libac_dart/nbt/NbtUtils.dart';
import 'package:libac_dart/nbt/Tag.dart';
import 'package:libac_dart/nbt/impl/CompoundTag.dart';
import 'package:libac_dart/nbt/impl/ListTag.dart';
import 'package:libac_dart/utils/TimeUtils.dart';
import 'package:servermanager/structs/autorestarts.dart';
import 'package:servermanager/structs/credentials.dart';
import 'package:servermanager/structs/mod.dart';

View file

@ -38,10 +38,9 @@ dependencies:
archive:
dio:
crypto:
libac_flutter:
libac_dart:
hosted: https://git.zontreck.com/api/packages/AriasCreations/pub/
version: 1.0.20
mc_rcon_dart: ^1.1.0
version: 1.0.21
dev_dependencies:
flutter_test: