java shit idfk

This commit is contained in:
Parker2991
2024-08-04 23:04:28 -04:00
parent 7c85c53eb1
commit bca181e8ec
30 changed files with 474 additions and 751 deletions
@@ -1,5 +0,0 @@
public class Main {
public static void main(String[] args) {
}
}
@@ -0,0 +1,47 @@
package land.chipmunk.parker2991.fnfboyfriendbot;
import land.chipmunk.parker2991.fnfboyfriendbot.*;
import com.github.steveice10.mc.auth.data.GameProfile;
import com.github.steveice10.mc.protocol.MinecraftProtocol;
import com.github.steveice10.mc.protocol.data.game.entity.player.HandPreference;
import com.github.steveice10.mc.protocol.data.game.setting.ChatVisibility;
import com.github.steveice10.mc.protocol.data.game.setting.SkinPart;
import com.github.steveice10.mc.protocol.packet.common.serverbound.ServerboundClientInformationPacket;
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
import com.github.steveice10.mc.protocol.packet.login.clientbound.ClientboundGameProfilePacket;
import com.github.steveice10.packetlib.Session;
import com.github.steveice10.packetlib.event.session.*;
import com.github.steveice10.packetlib.packet.Packet;
import com.github.steveice10.packetlib.tcp.TcpClientSession;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class Bot {
private final ArrayList<ClientListener> listeners = new ArrayList<>();
public final String host;
public final int port;
public final List<Bot> bots;
public final Options.bots options;
public Bot (Options.bots options, List<Bot> bots) {
this.host = options.host;
this.port = options.port;
this.options = options;
}
public static void main(String[] args) {
}
public class ClientListener {
}
}
@@ -0,0 +1,36 @@
package land.chipmunk.parker2991.fnfboyfriendbot;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import org.yaml.snakeyaml.Yaml;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import java.io.*;
import java.util.List;
import java.util.Set;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
Bot config = null;
Path configPath = Paths.get("config.yml");
try {
Yaml yaml = new Yaml();
config = yaml.load(Files.readString(configPath));
System.out.println(config);
} catch (IOException e) {
System.out.println(e.toString());
}
List<Bots> bots = new ArrayList<>();
for (Options options : config.bots) {
final Bot client = new Bot(options, bots);
bots.add(client);
}
}
private static class Options {
}
}
@@ -0,0 +1,9 @@
package land.chipmunk.parker2991.fnfboyfriendbot;
public class Options {
public static class bots {
public String host = "127.0.0.1";
public int port = 25565;
public long reconnectDelay;
}
}
@@ -0,0 +1,6 @@
package land.chipmunk.parker2991.fnfboyfriendbot.commands;
public class SayCommand {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class BruhifyModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class ChatCommandHandlerModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class ChatModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class CommandCoreModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class CommandLoopManagerModule {
}
@@ -0,0 +1,7 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class CommandManagerModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class ConsoleModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class DiscordModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class PlayerListModule {
}
@@ -0,0 +1,7 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class SelfcareModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class ValidationModule {
}
@@ -0,0 +1,35 @@
package land.chipmunk.parker2991.fnfboyfriendbot;
import java.net.InetAddress;
import java.net.UnknownHostException;
public class servershit {
public static void main(String[] args) {
try {
InetAddress inetAddress = InetAddress.getLocalHost();
System.out.println("Hostname \u203a " + inetAddress.getHostName());
} catch (UnknownHostException e) {
e.printStackTrace();
}
System.out.println("Working Directory \u203a " + System.getProperty("user.dir"));
System.out.println(System.getProperty("os.arch"));
System.out.println("OS \u203a " + System.getProperty("os.name"));
System.out.println("OS Version/distro \u203a " + System.getProperty("os.version"));
System.out.println("Kernel Version \u203a " + System.getProperty("os.kernel.version"));
System.out.println("Cores \u203a " + Runtime.getRuntime().availableProcessors());
System.out.println("CPU \u203a " + System.getProperty("sun.cpu.isalist"));
System.out.println("Server Free memory " + (Runtime.getRuntime().freeMemory() / 1048576) + " MiB " +
Runtime.getRuntime().totalMemory() / 1048576 + " MiB");
System.out.println("Device uptime \u203a " + formatUptime(System.currentTimeMillis() / 1000L));
System.out.println("Java version \u203a " + System.getProperty("java.version"));
}
private static String formatUptime(long uptime) {
long days = uptime / 86400;
long hours = (uptime % 86400) / 3600;
long minutes = ((uptime % 86400) % 3600) / 60;
long seconds = ((uptime % 86400) % 3600) % 60;
return days + "d " + hours + "h " + minutes + "m " + seconds + "s";
}
}
@@ -0,0 +1,27 @@
package land.chipmunk.parker2991.fnfboyfriendbot;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
public class serverterminal {
public static void main(String[] args) {
try {
ProcessBuilder processBuilder = new ProcessBuilder(Arrays.asList("ash", "-c", "ls"));
Process process = processBuilder.start();
InputStream inputStream = process.getInputStream();
byte[] buffer = new byte[1024];
int bytesRead;
while ((bytesRead = inputStream.read(buffer)) != -1) {
System.out.println(new String(buffer, 0, bytesRead));
}
int exitCode = process.waitFor();
System.out.println("Child process close all stdio with code " + exitCode);
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
}
@@ -0,0 +1,8 @@
Commands:
prefixes:
- "~"
- "fnfbfbot "
- "&"
- "\ufffc"
- "\u202e"
- "\u2588"