def silent_give_item(self, connection, item): packet = ServerUpdate() packet.reset() action = PickupAction() action.entity_id = connection.entity_id action.item_data = item packet.pickups.append(action) connection.send_packet(packet)
def on_drop(self, event): if self.is_item_illegal(event.item): pack = ServerUpdate() pack.reset() action = PickupAction() action.entity_id = self.connection.entity_id action.item_data = event.item pack.pickups.append(action) self.connection.send_packet(pack) self.remove_cheater("illegal item dropped") return False
def on_drop(self, event): if self.is_item_illegal(event.item): pack = ServerUpdate() pack.reset() action = PickupAction() action.entity_id = self.connection.entity_id action.item_data = event.item pack.pickups.append(action) self.connection.send_packet(pack) self.remove_cheater('illegal item dropped') return False
def give_item(self, item): action = PickupAction() action.entity_id = self.entity_id action.item_data = item self.server.update_packet.pickups.append(action)