Added RCON support

This commit is contained in:
Snowiiii committed 2024-08-10 23:53:32 +02:00
1 parent 50dcbfeb6d
commit 414cf3190c
12 files changed
+386 -16

No files matched your search

+2 -2
View File
@@ -1,9 +1,9 @@
use std::{collections::HashMap, net::IpAddr, time::Duration};
use std::{collections::HashMap, net::IpAddr};
use base64::{engine::general_purpose, Engine};
use num_bigint::BigInt;
use pumpkin_protocol::Property;
use reqwest::{header::CONTENT_TYPE, StatusCode, Url};
use reqwest::{StatusCode, Url};
use serde::{Deserialize, Serialize};
use thiserror::Error;
use uuid::Uuid;
+4 -3
View File
@@ -8,8 +8,9 @@ use pumpkin_protocol::{
server::play::{
SChatCommand, SChatMessage, SConfirmTeleport, SPlayerCommand, SPlayerPosition,
SPlayerPositionRotation, SPlayerRotation, SSwingArm,
}, VarInt,
};
},
VarInt,
};
use pumpkin_text::TextComponent;
use crate::{
@@ -156,7 +157,7 @@ impl Client {
}
pub fn handle_chat_command(&mut self, _server: &mut Server, command: SChatCommand) {
handle_command(&mut CommandSender::Player(self), command.command);
handle_command(&mut CommandSender::Player(self), &command.command);
}
pub fn handle_player_command(&mut self, _server: &mut Server, command: SPlayerCommand) {