mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-16 07:15:24 +01:00
fix wrong import; note we don't need to consider legacy import inside the packets module since this packet just got added before the structure changed
This commit is contained in:
parent
ab71aeeb7d
commit
0c64623696
7
start.py
7
start.py
@ -8,8 +8,9 @@ from minecraft import authentication
|
||||
from minecraft.exceptions import YggdrasilError
|
||||
from minecraft.networking.connection import Connection
|
||||
from minecraft.networking.packets import (
|
||||
ChatMessagePacket, ChatPacket, ServerClientStatus
|
||||
ChatMessagePacket, ChatPacket
|
||||
)
|
||||
from minecraft.networking.packets.serverbound.play import ClientStatusPacket
|
||||
from minecraft.compat import input
|
||||
|
||||
|
||||
@ -81,8 +82,8 @@ def main():
|
||||
text = input()
|
||||
if text == "/respawn":
|
||||
print("respawning...")
|
||||
packet = ServerClientStatus()
|
||||
packet.action_id = ServerClientStatus.RESPAWN
|
||||
packet = ClientStatusPacket()
|
||||
packet.action_id = ClientStatusPacket.RESPAWN
|
||||
connection.write_packet(packet)
|
||||
else:
|
||||
packet = ChatPacket()
|
||||
|
Loading…
Reference in New Issue
Block a user