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:
@@ -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());
|
||||
}
|
||||
Reference in New Issue
Block a user