Improve exception handling

This commit is contained in:
2020-09-08 19:52:50 -06:00
parent a76d02d53c
commit e444cf6677
3 changed files with 21 additions and 8 deletions
+4 -2
View File
@@ -18,8 +18,6 @@ def handle_join_game(packet, g):
def handle_block_change(packet, g):
l = g.local_state
print('block change:')
print(packet)
if packet.block_state_id == 3887:
try:
@@ -92,6 +90,10 @@ def handle_chat(message, g):
if command == 'afk':
reply = '/afk'
if command == 'error':
reply = 'ok'
raise
if reply:
print(reply)
g.chat.send(reply)