onConnect notification for plugins

This commit is contained in:
Ammar Askar committed 2012-12-26 20:23:47 +05:00
1 parent 83ad822bad
commit 6025e97932
3 files changed
+12 -3

No files matched your search

+3 -3
View File
@@ -137,11 +137,11 @@ def readSlotData(FileObject):
'ItemCount': ItemCount,
'Damage': Damage,
'Data': NBTData
}
}
return {'BlockID': BlockID,
'ItemCount': ItemCount,
'Damage': Damage
}
}
return {'BlockID': -1,
'ItemCount': 0
}
}
+2
View File
@@ -96,6 +96,7 @@ class ServerConnection(threading.Thread):
#Send out a a packet FC to the server
PacketSenderManager.sendFC(self.socket, encryptedSharedSecret, encryptedSanityToken)
self.pluginLoader.notify("onConnect")
except Exception, e:
traceback.print_exc()
@@ -113,6 +114,7 @@ class ServerConnection(threading.Thread):
#Send out a a packet FC to the server
PacketSenderManager.sendFC(self.socket, encryptedSharedSecret, encryptedSanityToken)
self.pluginLoader.notify("onConnect")
except Exception, e:
print "Connection to server failed"
traceback.print_exc()