def reply(self, info, msg, is_plugin_call=True): if is_plugin_call: self.logger.debug('Plugin called reply("{}", "{}")'.format(info, msg)) if info.is_player: self.tell(info.player, msg, is_plugin_call=False) else: for line in msg.splitlines(): self.__server.logger.info(tool.clean_minecraft_color_code(line))
def reply(self, info, text): """ Reply to the source of the Info If the Info is from a player then use tell to reply the player Otherwise use logger.info to output to the console :param info: the Info you want to reply to :param text: a str or a STextBase, the message you want to send :param kwargs: :return: None """ if info.is_player: self.tell(info.player, text, is_plugin_call=False) else: for line in str(text).splitlines(): self.logger.info(tool.clean_minecraft_color_code(line))
def cleaned_info(info): processed_info = copy.deepcopy(info) processed_info.content = tool.clean_minecraft_color_code( processed_info.content) return processed_info
def formatMessage(self, record): text = super().formatMessage(record) text = RColor.convert_minecraft_color_code(text) # minecraft code -> console code text = tool.clean_minecraft_color_code(text) # clean the rest of minecraft codes return text
def load_plugins(self): msg = tool.clean_minecraft_color_code( self.plugin_manager.refresh_all_plugins()) self.logger.info(msg)
def load_plugins(self): msg = tool.clean_minecraft_color_code(self.plugin_manager.load_plugins()) self.logger.info(msg) return msg
def parse_player_left(self, info): # §eSteve left the game§r processed_info = copy.deepcopy(info) processed_info.content = tool.clean_minecraft_color_code( processed_info.content) return super().parse_player_left(processed_info)