mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-16 07:15:24 +01:00
Fix a bug in PacketListener wherein all instances shared the same listener list.
This commit is contained in:
parent
79ee31c44e
commit
6797a59a70
@ -35,10 +35,9 @@ class PacketBuffer(object):
|
||||
|
||||
|
||||
class PacketListener(object):
|
||||
packets_to_listen = []
|
||||
|
||||
def __init__(self, callback, *args):
|
||||
self.callback = callback
|
||||
self.packets_to_listen = []
|
||||
for arg in args:
|
||||
if issubclass(arg, Packet):
|
||||
self.packets_to_listen.append(arg)
|
||||
|
Loading…
Reference in New Issue
Block a user