Beispiel #1
0
    def player_joined(self):
        ServerProtocol.player_joined(self)

        self.ip = self.remote_addr.host
        self.eid = dats.getFreeId()
        self.fquid = self.username + "[/" + self.ip + "](" + str(self.uuid) + ")"
        self.base_scba_split = list("PyMINESERVER")
        self.anim_i = 0
        eobj_byid[self.eid] = self
        self.logger.info("UUID of player Dragon5232 is " + str(self.uuid))
        
        p.game(self, self.eid, 1, 0, 1, options.maxplayers, "default", False)
        p.spawn_pos(self, 0, 66, 0)
        p.abilities(self, True, True, True, True, 0.2, 0.2)
        p.pos_look(self, 0, 66, 0, 0, 0, False)
        p.rain(self, True)
        p.empty_chunk(self, 0, 0)
        p.block_change(self, 0, 64, 0, 1)
        if self.protocol_version == 47: p.plist_head_foot(self, u"§6P§2yMINESERVER§r", u"§eEnjoy the Test§r")
        if self.protocol_version == 47: self.tasks.add_loop(1.0/20, self.anim_frame_scb)
        relayPlayerList()
        self.logger.info(self.username + "[/" + self.ip + "] logged in with entity id " + str(self.eid) + " at ([nonexistent](0.0, 64.0, 0.0))")
        
        # Schedule 6-second sending of keep-alive packets.
        self.tasks.add_loop(6, self.keepalive_send)
        
        self.eobj_byid = eobj_byid
        pushChat(self, "\u00A7e" + self.username + " has joined the game\u00A7r", 1)
        
        # Send welcome title and subtitle
        p.title(self, options.wtitle)
        p.subtitle(self, options.wst)
        
        p.chat_json(self, dats.join_json(self), 1)
Beispiel #2
0
    def player_joined(self):
        global eobj_byid
        ServerProtocol.player_joined(self)

        self.ip = self.remote_addr.host
        self.eid = dats.getFreeId()
        self.fquid = self.username + "[/" + self.ip + "](" + str(self.uuid) + ")"
        eobj_byid[self.eid] = self
        self.logger.info("UUID of player Dragon5232 is " + str(self.uuid))
        
        p.game(self, self.eid, 1, 0, 1, options.maxplayers, "default", False)
        p.spawn_pos(self, 0, 64, 0)
        p.abilities(self, True, True, True, True, 0.2, 0.2)
        p.pos_look(self, 0, 64, 0, 0, 0, False)
        p.rain(self, True)
        p.empty_chunk(self, 0, 0)
        self.logger.info(self.username + "[/" + self.ip + "] logged in with entity id " + str(self.eid) + " at ([nonexistent](0.0, 64.0, 0.0))")
        
        # Schedule 6-second sending of keep-alive packets.
        self.tasks.add_loop(6, self.keepalive_send)
        
        pushChat(eobj_byid, "\u00A7e" + self.username + " has joined the game\u00A7r", 1)
        
        # Send welcome title and subtitle
        p.title(self, options.wtitle)
        p.subtitle(self, options.wst)
        
        p.chat_json(self, dats.join_json(self), 1)
Beispiel #3
0
 def packet_chat_message(self, buff):
     _atmp = buff.unpack_string()
     self.eobj_byid = eobj_byid
     cmd.handle(self, _atmp) if _atmp[0] == "/" else pushChat(self, "<" + self.username + "> " + _atmp.replace("\u00A7", ""), 0)
Beispiel #4
0
 def packet_chat_message(self, buff):
     global eobj_byid
     _atmp = buff.unpack_string()
     cmd.handle(self, _atmp) if _atmp[0] == "/" else pushChat(eobj_byid, "<" + self.username + "> " + _atmp.replace("\u00A7", ""), 0)