3 Commits
Author SHA1 Message Date
pixtaded bdf7e6bbae bump version to 1.0.2 2025-01-11 19:52:17 +03:00
pixtaded 7a116c6789 Make CRAB work much more smoother (clear screen only after receiving new logs) 2025-01-11 19:51:38 +03:00
pixtaded 6dace63cb0 Fix some vladcode 2025-01-11 16:28:43 +03:00
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ plugins {
}
group = 'net.pixtaded'
version = '1.0.1'
version = '1.0.2'
repositories {
mavenCentral()
@@ -68,7 +68,7 @@ public class CrabClient implements Crab {
System.out.print("Enter your nickname (leave empty for no nickname): ");
nickname = scanner.nextLine();
if (nickname != "")
if (!nickname.isEmpty())
nickname = "<" + nickname + "> ";
}
@@ -82,9 +82,7 @@ public class CrabClient implements Crab {
private void communicate() throws IOException {
Scanner scanner = new Scanner(System.in);
String message;
while (true) {
System.out.print("\033[H\033[2J");
getLogs();
System.out.print("Enter a message (or type '/exit' to exit): ");
message = scanner.nextLine();
@@ -114,6 +112,7 @@ public class CrabClient implements Crab {
lastBufferLength = Integer.parseInt(new String(buffer).trim());
} case LOGS -> {
byte[] bytes = socket.getInputStream().readNBytes(lastBufferLength);
System.out.print("\033[H\033[2J");
System.out.print(Sanitizer.sanitizeString(new String(bytes, StandardCharsets.UTF_8), false));
} default -> {
}