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 committed 2026-05-03 15:43:25 +03:00
1 parent d1cf63433f
commit 083ccbd4e9
3 files changed
+260 -48

No files matched your search

+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());
}