feat(PlayerConnection): better implementation of /tp and /time

feat(PlayerConnection): better implementation of /time

fix(PlayerConnection): /tp

fix(PlayerConnection): /tp

fix(PlayerConnection): /time

fix(PlayerConnection): /time

fix(PlayerConnection): /time

fix(PlayerConnection): /time

fix(PlayerConnection): /tp

fix(PlayerConnection): /tp
This commit is contained in:
neoapps-dev
2026-05-03 15:43:25 +03:00
parent d1cf63433f
commit 083ccbd4e9
3 changed files with 260 additions and 48 deletions
+10
View File
@@ -81,5 +81,15 @@ shared_ptr<GameCommandPacket> TimeCommand::preparePacket(bool night)
dos.writeBoolean(night);
return std::make_shared<GameCommandPacket>(eGameCommand_Time, baos.toByteArray());
}
shared_ptr<GameCommandPacket> TimeCommand::preparePacket(int ticks)
{
ByteArrayOutputStream baos;
DataOutputStream dos(&baos);
dos.writeInt(ticks);
return std::make_shared<GameCommandPacket>(eGameCommand_Time, baos.toByteArray());
}