map.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:PyPlanet 作者: PyPlanet 项目源码 文件源码
def list_action_remove(self, player, values, map_dictionary, view, **kwargs):
        # Check permission.
        if not await self.instance.permission_manager.has_permission(player, 'admin:remove_map'):
            await self.instance.chat(
                '$f00You don\'t have the permission to perform this action!',
                player
            )
            return

        # Ask for confirmation.
        cancel = bool(await ask_confirmation(player, 'Are you sure you want to remove the map \'{}\'$z$s from the server?'.format(
            map_dictionary['name']
        ), size='sm'))
        if cancel is True:
            return

        # Simulate command.
        await self.remove_map(player, Namespace(nr=map_dictionary['id']))

        # Reload parent view.
        await view.refresh(player)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号