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)
评论列表
文章目录